summaryrefslogtreecommitdiff
path: root/lib/igt.cocci
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-15 10:21:37 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-15 10:23:20 +0200
commit428060c555526c988f4120718f8a000e59ac8c7b (patch)
treea9217c40c79dda40207868314bc92d0cc28a5fdf /lib/igt.cocci
parent43784baa1346a36f99a84a06cfc83c11b507c03e (diff)
lib/igt.cocci: Add s/assert/igt_assert/
People use it way too often, and it upsets the test library. The only valid places to use this is of igt infrastructure self-tests where you need to check something _without_ all the other abi use checks igt_fail and friends do. For those tests just #define an internal assert to hide it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt.cocci')
-rw-r--r--lib/igt.cocci7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/igt.cocci b/lib/igt.cocci
index d399496b..adebb31c 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -84,3 +84,10 @@ expression pipe;
+ for_each_pipe (display, pipe) {
...
}
+
+// Tests really shouldn't use plain assert!
+@@
+expression E;
+@@
+- assert(E);
++ igt_assert(E);