mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 22:02:57 +00:00
tests: Use igt macros more
Often just folding together of the common if (cond) printf; abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out more since the igt macros will already print the condition and errno. A few tests where more work (like ripping out return codes en masse) is needed left as-is. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
+2
-10
@@ -169,16 +169,8 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define _fail(x) ((x) == -ENOENT)
|
||||
#define ASSERT(x, y) do { \
|
||||
if (!(x)) { \
|
||||
fprintf(stderr, "%s:%d failed, errno=%d\n", \
|
||||
__FUNCTION__, __LINE__, -y); \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
#define fail(x) ASSERT(_fail(x), x)
|
||||
#define pass(x) ASSERT(!_fail(x), x)
|
||||
#define fail(x) igt_assert((x) == -ENOENT)
|
||||
#define pass(x) igt_assert((x) == 0)
|
||||
|
||||
igt_simple_main
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user