[igt-dev] [PATCH i-g-t] i915/gem_ringfill: Create dynamic subtest

Nirmoy Das nirmoy.das at intel.com
Mon Sep 26 13:32:33 UTC 2022


This will print engine name for each subtest which
might be useful for debugging a failure.

Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
 tests/i915/gem_ringfill.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
index b68c5ae615..1e98ac8bb7 100644
--- a/tests/i915/gem_ringfill.c
+++ b/tests/i915/gem_ringfill.c
@@ -383,19 +383,20 @@ igt_main
 	}
 
 	igt_describe("Basic check to fill the ring upto maximum on all engines simultaneously.");
-	igt_subtest("basic-all") {
+	igt_subtest_with_dynamic("basic-all") {
 		const struct intel_execution_engine2 *e;
 		intel_allocator_multiprocess_start();
 
 		for_each_ctx_engine(fd, ctx, e) {
 			if (!gem_class_can_store_dword(fd, e->class))
 				continue;
-
-			igt_fork(child, 1)
-				run_test(fd, ctx, e->flags, 0, 1);
+			igt_dynamic_f("%s", e->name) {
+				igt_fork(child, 1)
+					run_test(fd, ctx, e->flags, 0, 1);
+				igt_waitchildren();
+			}
 		}
 
-		igt_waitchildren();
 		intel_allocator_multiprocess_stop();
 	}
 
-- 
2.37.3



More information about the igt-dev mailing list