[igt-dev] [PATCH 1/2] lib/drmtest: add igt_debug when forced and dev_name doesn't match
Helen Koike
helen.koike at collabora.com
Sun Oct 8 22:23:05 UTC 2023
Make it easier to understand what was the expected string.
Signed-off-by: Helen Koike <helen.koike at collabora.com>
---
lib/drmtest.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index e1da66c87..98910a84c 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -260,8 +260,11 @@ static int open_device(const char *name, unsigned int chipset)
goto err;
forced = forced_driver();
- if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name))
+ if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name)) {
+ igt_debug("Expected driver \"%s\" but got \"%s\"\n",
+ forced, dev_name);
goto err;
+ }
for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
int mid = start + (end - start) / 2;
--
2.34.1
More information about the igt-dev
mailing list