[igt-dev] [PATCH v5 3/3] tests/i915/i915_pm_backlight: Create dynamic subtests

Nidhi Gupta nidhi1.gupta at intel.com
Thu Nov 17 11:44:58 UTC 2022


Modified the test to include dynamic subtests.

Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
---
 tests/i915/i915_pm_backlight.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index 1dcfc7e..8296066 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -307,7 +307,7 @@ igt_main
 
 	for (i = 0; i < ARRAY_SIZE(tests); i++) {
 		igt_describe(tests[i].desc);
-		igt_subtest(tests[i].name) {
+		igt_subtest_with_dynamic(tests[i].name) {
 			for (int j = 0; j < (dual_edp ? 2 : 1); j++) {
 				test_setup(display, &contexts->output[j]);
 
@@ -317,8 +317,10 @@ igt_main
 				if (tests[i].flags == TEST_SUSPEND)
 					check_suspend(contexts[j].output);
 
-				tests[i].test_t(&contexts[j]);
-				test_cleanup(&display, contexts[j].output);
+				igt_dynamic_f("%s", igt_output_name(contexts[j].output)) {
+					tests[i].test_t(&contexts[j]);
+					test_cleanup(&display, contexts[j].output);
+				}
 			}
 		}
 	}
-- 
1.9.1



More information about the igt-dev mailing list