[05/33] cocci: ignore abort() call in __igt_fail_assert()

Submitted by Lyude Paul on June 7, 2019, 11:07 p.m.

Details

Message ID 20190607230821.4488-5-lyude@redhat.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in IGT - Trybot

Not browsing as part of any series.

Commit Message

Lyude Paul June 7, 2019, 11:07 p.m.
From: Lyude Paul <lyude@redhat.com>

This is the only valid call to abort() in igt

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 lib/igt.cocci | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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/*
+@ignore_internal_abort@
+position p;
 @@
+void __igt_fail_assert(...) { <... abort@p(); ...> }
+
+@@
+position p != ignore_internal_abort.p;
 @@
--abort();
+-abort@p();
 +igt_fail(IGT_EXIT_FAILURE);
 
 @@