mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-25 16:56:35 +00:00
lib/drmtest: Use igt_assert in the do_ioctl/do_or_die helpers
abort results in "crash" test results in the piglit runner, igt gives us neater output. The downside is that we can now only use these in igt tests, but that's already the case (and given their placement in drmtest.h their intended use-case, too). Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
610630622b
commit
79abed393f
@ -287,17 +287,8 @@ const char *kmstest_connector_type_str(int type);
|
||||
|
||||
uint32_t drm_format_to_bpp(uint32_t drm_format);
|
||||
|
||||
inline static void _do_or_die(const char *function, int line, int ret)
|
||||
{
|
||||
if (ret == 0)
|
||||
return;
|
||||
|
||||
fprintf(stderr, "%s:%d failed, ret=%d, errno=%d\n",
|
||||
function, line, ret, errno);
|
||||
abort();
|
||||
}
|
||||
#define do_or_die(x) _do_or_die(__FUNCTION__, __LINE__, x)
|
||||
#define do_ioctl(fd, ptr, sz) do_or_die(drmIoctl((fd), (ptr), (sz)))
|
||||
#define do_or_die(x) igt_assert((x) == 0)
|
||||
#define do_ioctl(fd, ptr, sz) igt_assert(drmIoctl((fd), (ptr), (sz)) == 0)
|
||||
|
||||
typedef void (*igt_exit_handler_t)(int sig);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user