[igt-dev] [PATCH i-g-t 1/7] lib/drmtest: Use igt_assert_eq() for do_or_die()
Lyude
lyude at redhat.com
Wed Mar 17 22:49:43 UTC 2021
From: Lyude Paul <lyude at redhat.com>
Noticed this while working on some nouveau tests, if we use igt_assert_eq()
here we'll output both the expected and returned value instead of just the
expected value.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Martin Peres <martin.peres at free.fr>
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: Jeremy Cline <jcline at redhat.com>
---
lib/drmtest.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/drmtest.h b/lib/drmtest.h
index d393dbf1..789452ea 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -113,7 +113,7 @@ bool is_vc4_device(int fd);
* that in any failure case the return value is non-zero and a precise error is
* logged into errno. Uses igt_assert() internally.
*/
-#define do_or_die(x) igt_assert((x) == 0)
+#define do_or_die(x) igt_assert_eq((x), 0)
/**
* do_ioctl:
--
2.29.2
More information about the igt-dev
mailing list