mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-23 15:56:33 +00:00
lib/igt.cocci: De-opencode ioctls
Use do_ioctl and do_ioctl_err where possible. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
c8cec6b885
commit
668c053e6a
@ -213,3 +213,21 @@ expression list E;
|
||||
@@
|
||||
-func(E);
|
||||
+igt_assert_neq(func(E), -1);
|
||||
|
||||
// replace open-coded do_ioctl
|
||||
@@
|
||||
expression a, b, c, e;
|
||||
@@
|
||||
(
|
||||
-do_or_die(drmIoctl(a, b, c));
|
||||
+do_ioctl(a, b, c);
|
||||
|
|
||||
-igt_assert(drmIoctl(a, b, c) == 0);
|
||||
+do_ioctl(a, b, c);
|
||||
|
|
||||
-igt_assert(drmIoctl(a, b, c) == -1 && errno == e);
|
||||
+do_ioctl_err(a, b, c, e);
|
||||
|
|
||||
-igt_assert(drmIoctl(a, b, c) < 0 && errno == e);
|
||||
+do_ioctl_err(a, b, c, e);
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user