[igt-dev] [PATCH 1/2] tests/i915/kms_draw_crc: Convert tests to dynamic

Nidhi Gupta nidhi1.gupta at intel.com
Tue Aug 2 06:53:49 UTC 2022


Convert the existing subtests to dynamic subtests.

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

diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index 33fefed4..5c9feac9 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -335,18 +335,20 @@ igt_main
 	igt_fixture
 		setup_environment();
 
-	for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
-	for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
-	for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
-		igt_describe("This subtest verfies igt_draw library works "
-			     "with different modifiers, DRM_FORMATS, DRAW_METHODS.");
-		igt_subtest_f("draw-method-%s-%s-%s",
+	igt_describe("This subtest verfies igt_draw library works "
+		     "with different modifiers, DRM_FORMATS, DRAW_METHODS.");
+	igt_subtest_with_dynamic("draw-method") {
+		for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
+		for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
+		for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
+		igt_dynamic_f("draw-method-%s-%s-%s",
 			      format_str(format_idx),
 			      igt_draw_get_method_name(method),
 			      modifier_str(modifier_idx))
 			draw_method_subtest(method, format_idx,
 					    modifiers[modifier_idx]);
 	} } }
+	}
 
 	igt_describe("This subtest verifies CRC after filling fb with x-tiling "
 		     "or none.");
-- 
2.26.2



More information about the igt-dev mailing list