[06/33] cocci: Only process abort() rules for tests

Submitted by Lyude Paul on June 10, 2019, 3:02 p.m.

Details

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

Not browsing as part of any series.

Commit Message

Lyude Paul June 10, 2019, 3:02 p.m.
From: Lyude Paul <lyude@redhat.com>

abort() is fine for internal library checks, but not for tests.

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

Patch hide | download patch | download mbox

diff --git a/lib/igt.cocci b/lib/igt.cocci
index 985019bd..d6d564d7 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -70,12 +70,12 @@  expression list[n] Ep;
 
 // No abort for tests, really. Should only be used for internal library checks
 // in lib/*
-@ignore_internal_abort@
+@ignore_internal_abort depends on file in "tests/"@
 position p;
 @@
 void __igt_fail_assert(...) { <... abort@p(); ...> }
 
-@@
+@depends on file in "tests/"@
 position p != ignore_internal_abort.p;
 @@
 -abort@p();