[PATCH i-g-t 05/33] cocci: ignore abort() call in __igt_fail_assert()
Lyude
lyude at redhat.com
Fri Jun 7 23:07:53 UTC 2019
From: Lyude Paul <lyude at redhat.com>
This is the only valid call to abort() in igt
Signed-off-by: Lyude Paul <lyude at redhat.com>
---
lib/igt.cocci | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/igt.cocci b/lib/igt.cocci
index 8de871ca..985019bd 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -70,9 +70,15 @@ expression list[n] Ep;
// No abort for tests, really. Should only be used for internal library checks
// in lib/*
+ at ignore_internal_abort@
+position p;
@@
+void __igt_fail_assert(...) { <... abort at p(); ...> }
+
+@@
+position p != ignore_internal_abort.p;
@@
--abort();
+-abort at p();
+igt_fail(IGT_EXIT_FAILURE);
@@
--
2.21.0
More information about the Intel-gfx-trybot
mailing list