[Intel-gfx] [PATCH igt 3/8] lib/igt.cocci: Add greater-than to igt_assert_lt*

Daniel Stone daniels at collabora.com
Thu Oct 1 09:34:03 PDT 2015


Change m >= n patterns to igt_assert_lte(n, m), and ditto for strict
greater-than.

Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 lib/igt.cocci | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/igt.cocci b/lib/igt.cocci
index 3aee72f..b4f8ee4 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -161,6 +161,12 @@ int E3, E4;
 - igt_assert(E1 < E2);
 + igt_assert_lt_u32(E1, E2);
 |
+- igt_assert(E1 >= E2);
++ igt_assert_lte_u32(E2, E1);
+|
+- igt_assert(E1 > E2);
++ igt_assert_lt_u32(E2, E1);
+|
 - igt_assert(E3 == E4);
 + igt_assert_eq(E3, E4);
 |
@@ -172,6 +178,12 @@ int E3, E4;
 |
 - igt_assert(E3 < E4);
 + igt_assert_lt(E3, E4);
+|
+- igt_assert(E3 >= E4);
++ igt_assert_lte(E4, E3);
+|
+- igt_assert(E3 > E4);
++ igt_assert_lt(E4, E3);
 )
 
 // avoid unused-result warnings when compiling with _FORTIFY_SOURCE defined
-- 
2.5.0



More information about the Intel-gfx mailing list