[igt-dev] [PATCH 2/2] core_getversion: drop unused assert

Helen Koike helen.koike at collabora.com
Sun Oct 8 22:23:06 UTC 2023


If IGT_FORCE_DRIVER is used, open_device() already checks if the name
matches, so igt_assert_fd(fd) is already enough.

Signed-off-by: Helen Koike <helen.koike at collabora.com>
---
 tests/core_getversion.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/core_getversion.c b/tests/core_getversion.c
index 8c8e0c9a3..9945c3855 100644
--- a/tests/core_getversion.c
+++ b/tests/core_getversion.c
@@ -48,7 +48,6 @@ igt_simple_main
 {
 	int fd;
 	drmVersionPtr v;
-	const char *name = getenv("IGT_FORCE_DRIVER");
 
 	fd = __drm_open_driver(DRIVER_ANY);
 	igt_assert_fd(fd);
@@ -58,11 +57,6 @@ igt_simple_main
 	igt_assert_neq(strlen(v->desc), 0);
 	if (is_i915_device(fd))
 		igt_assert_lte(1, v->version_major);
-	if (name) {
-		igt_assert_f(!strcmp(name, v->name),
-			     "Expected driver \"%s\" but got \"%s\"\n",
-			     name, v->name);
-	}
 
 	drmFree(v);
 	drm_close_driver(fd);
-- 
2.34.1



More information about the igt-dev mailing list