summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2024-08-01 12:51:28 -0700
committerAshutosh Dixit <ashutosh.dixit@intel.com>2024-08-06 12:49:43 -0700
commitd4a4a26162e6dd1940c73d9ae1c6c8537884ef7f (patch)
treed715bf24b1452e21239667ab80d15f81262b85d7
parent851e62faf9716b9841d36193a73921f6151a2e3b (diff)
tests/intel/xe_query: Fail on unknown hwconfig entries
There is a test that the hwconfig table is valid. However, if there was an unknown entry (corrupted table or out of date test) all it did was print a debug message of "please fix"! So the test would still pass and CI would not notice the problem. Add in some actual asserts that the enum value is within the valid range and that it is not missing from the switch statement. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
-rw-r--r--tests/intel/xe_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/intel/xe_query.c b/tests/intel/xe_query.c
index c6d88b258..6ebf5e4b6 100644
--- a/tests/intel/xe_query.c
+++ b/tests/intel/xe_query.c
@@ -137,7 +137,8 @@ const char* get_hwconfig_name(int param)
CASE_STRINGIFY(MIN_MESH_URB_ENTRIES);
CASE_STRINGIFY(MAX_MESH_URB_ENTRIES);
}
- return "?? Please fix "__FILE__;
+ igt_assert_lt(param, __INTEL_HWCONFIG_KEY_LIMIT);
+ igt_assert(!"Missing config table enum");
}
#undef CASE_STRINGIFY