[Intel-gfx] [PATCH i-g-t 1/2] lib: Remove i915ism when checking that debugfs is mounted

Tomeu Vizoso tomeu.vizoso at collabora.com
Thu Mar 2 10:08:25 UTC 2017


Instead of checking for "i915_error_state" within dri/N/, check for
"name".

This allows more tests to run against drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
 lib/igt_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index e64d001b71cf..3f4f32da5b4a 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -139,7 +139,7 @@ static bool __igt_debugfs_init(igt_debugfs_t *debugfs)
 	strcpy(debugfs->root, igt_debugfs_mount());
 	for (n = 0; n < 16; n++) {
 		int len = sprintf(debugfs->dri_path, "%s/dri/%d", debugfs->root, n);
-		sprintf(debugfs->dri_path + len, "/i915_error_state");
+		sprintf(debugfs->dri_path + len, "/name");
 		if (stat(debugfs->dri_path, &st) == 0) {
 			debugfs->dri_path[len] = '\0';
 			return true;
-- 
2.9.3



More information about the Intel-gfx mailing list