[PATCH i-g-t 1/2] lib: Add u32 variants of igt_assert_{lt,lte}

Matt Roper matthew.d.roper at intel.com
Mon Jul 29 22:02:50 UTC 2024


igt.cocci assumes that u32 variants of the comparison assertions exist,
so add the two that were missing.

Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
---
 lib/igt_core.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/igt_core.h b/lib/igt_core.h
index 084d94da7..82f474c5f 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -915,6 +915,15 @@ void igt_describe_f(const char *fmt, ...);
  */
 #define igt_assert_lte(n1, n2) igt_assert_cmpint(n1, <=, >, n2)
 
+/**
+ * igt_assert_lte_u32:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_lte(), but for uint32_t.
+ */
+#define igt_assert_lte_u32(n1, n2) igt_assert_cmpuint(n1, <=, >, n2)
+
 /**
  * igt_assert_lte_u64:
  * @n1: first integer
@@ -954,6 +963,15 @@ void igt_describe_f(const char *fmt, ...);
  */
 #define igt_assert_lt(n1, n2) igt_assert_cmpint(n1, <, >=, n2)
 
+/**
+ * igt_assert_lt_u32:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_lt(), but for uint32_t.
+ */
+#define igt_assert_lt_u32(n1, n2) igt_assert_cmpuint(n1, <, >=, n2)
+
 /**
  * igt_assert_lt_u64:
  * @n1: first integer
-- 
2.45.2



More information about the igt-dev mailing list