mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 05:13:47 +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:
@@ -52,13 +52,8 @@ igt_simple_main
|
||||
fd = drm_open_any_render();
|
||||
|
||||
ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create);
|
||||
if (ret != 0 && (errno == ENODEV || errno == EINVAL)) {
|
||||
igt_skip("Kernel is too old, or contexts not supported: %s\n",
|
||||
strerror(errno));
|
||||
} else if (ret != 0) {
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
igt_fail(1);
|
||||
}
|
||||
igt_skip_on(ret != 0 && (errno == ENODEV || errno == EINVAL));
|
||||
igt_assert(ret == 0);
|
||||
igt_assert(create.ctx_id != 0);
|
||||
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user