Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t 1/2] tests/kms_cursor_legacy: Fix CI tiemout issues
@ 2023-02-12  6:27 Bhanuprakash Modem
  2023-02-12  6:27 ` [igt-dev] [i-g-t 2/2] Revert "tests/intel-ci: Rename kms_cursor_legacy subtests in BAT" Bhanuprakash Modem
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Bhanuprakash Modem @ 2023-02-12  6:27 UTC (permalink / raw)
  To: igt-dev, karthik.b.s, juhapekka.heikkila

After introducing the dynamic subtests, tests are getting timedout
on CI. This patch will partially reverts dynamic subtests to avoid
such timeouts.

Fixes: c02f0d48c (tests/kms_cursor_legacy: Convert tests to dynamic)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_cursor_legacy.c | 124 ++++++++++++++++++--------------------
 1 file changed, 58 insertions(+), 66 deletions(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index f1e55906a..feea1ac83 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -1524,7 +1524,6 @@ igt_main
 		"atomic-transitions",
 		"atomic-transitions-varying-size"
 	};
-	const char *prefix[2] = {"basic", "short"};
 
 	igt_fixture {
 		display.drm_fd = drm_open_driver_master(DRIVER_ANY);
@@ -1667,39 +1666,46 @@ igt_main
 			flip_vs_cursor_busy_crc(&display, true);
 	}
 
-	for (i = 0; i < ARRAY_SIZE(prefix); i++) {
-		int j;
-
-		igt_describe("Adds variety of tests:\n"
-			"* varying-size: change the size of cursor b/w 64*64 to maxw x maxh.\n"
-			"* atomic-transition: alternates between a full screen sprite plane "
-				"and full screen primary plane.\n"
-			"* toggle: which toggles cursor visibility and make sure cursor moves between updates.");
-		igt_subtest_group {
-			igt_fixture
-				igt_display_require_output(&display);
-
-			igt_subtest_with_dynamic_f("%s-flip-before-cursor", prefix[i]) {
-				for (j = 0; j <= flip_test_last; j++) {
-					igt_dynamic_f("%s", modes[j])
-						basic_flip_cursor(&display, j, FLIP_BEFORE_CURSOR, 0);
-				}
-			}
+	igt_describe("Adds variety of tests:\n"
+		"* varying-size: change the size of cursor b/w 64*64 to maxw x maxh.\n"
+		"* atomic-transition: alternates between a full screen sprite plane "
+			"and full screen primary plane.\n"
+		"* toggle: which toggles cursor visibility and make sure cursor moves between updates.");
+	igt_subtest_group {
+		struct {
+			const char *name;
+			enum basic_flip_cursor order;
+			unsigned flags;
+		} tests[] = {
+			{ "flip-before-cursor", FLIP_BEFORE_CURSOR, 0 },
+			{ "busy-flip-before-cursor", FLIP_BEFORE_CURSOR, BASIC_BUSY },
+			{ "flip-after-cursor", FLIP_AFTER_CURSOR, 0 },
+		};
+		int t;
 
-			igt_subtest_with_dynamic_f("%s-busy-flip-before-cursor", prefix[i]) {
-				igt_require(!cursor_slowpath(&display, i));
-				igt_require_gem(display.drm_fd);
+		igt_fixture
+			igt_display_require_output(&display);
 
-				for (j = 0; j <= flip_test_last; j++) {
-					igt_dynamic_f("%s", modes[j])
-						basic_flip_cursor(&display, j, FLIP_BEFORE_CURSOR, BASIC_BUSY);
-				}
+		for (i = 0; i <= flip_test_last; i++) {
+			const char *prefix = "short-";
+
+			switch (i) {
+			case flip_test_legacy:
+			case flip_test_varying_size:
+			case flip_test_atomic:
+				prefix = "basic-";
+				break;
+			default: break;
 			}
 
-			igt_subtest_with_dynamic_f("%s-flip-after-cursor", prefix[i]) {
-				for (j = 0; j <= flip_test_last; j++) {
-					igt_dynamic_f("%s", modes[j])
-						basic_flip_cursor(&display, j, FLIP_AFTER_CURSOR, 0);
+			for (t = 0; t < ARRAY_SIZE(tests); t++) {
+				igt_subtest_f("%s%s-%s", prefix, tests[t].name, modes[i]) {
+					if (tests[t].flags == BASIC_BUSY) {
+						igt_require(!cursor_slowpath(&display, i));
+						igt_require_gem(display.drm_fd);
+					}
+
+					basic_flip_cursor(&display, i, tests[t].order, tests[t].flags);
 				}
 			}
 		}
@@ -1708,48 +1714,34 @@ igt_main
 	igt_describe("The essence of the basic test is that neither the cursor nor the "
 		     "nonblocking flip stall the application of the next");
 	igt_subtest_group {
+		struct {
+			const char *name;
+			int cursor_pipe;
+			int flip_pipe;
+			int timeout;
+		} tests[] = {
+			{ "cursorA-vs-flipA", 0, 0, 10 },
+			{ "cursorA-vs-flipB", 0, 1, 10 },
+			{ "cursorB-vs-flipA", 1, 0, 10 },
+			{ "cursorB-vs-flipB", 1, 1, 10 },
+		};
+
 		igt_fixture
 			igt_display_require_output(&display);
 
-		igt_subtest_with_dynamic("flip-vs-cursor") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					flip_vs_cursor(&display, i, 150);
-			}
-		}
+		for (i = 0; i <= flip_test_last; i++) {
+			int j;
 
-		igt_subtest_with_dynamic("cursor-vs-flip") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					cursor_vs_flip(&display, i, 50);
-			}
-		}
+			igt_subtest_f("cursor-vs-flip-%s", modes[i])
+				cursor_vs_flip(&display, i, 50);
 
-		igt_subtest_with_dynamic("cursorA-vs-flipA") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					flip(&display, 0, 0, 10, i);
-			}
-		}
-
-		igt_subtest_with_dynamic("cursorA-vs-flipB") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					flip(&display, 0, 1, 10, i);
-			}
-		}
-
-		igt_subtest_with_dynamic("cursorB-vs-flipA") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					flip(&display, 1, 0, 10, i);
-			}
-		}
+			igt_subtest_f("flip-vs-cursor-%s", modes[i])
+				flip_vs_cursor(&display, i, 150);
 
-		igt_subtest_with_dynamic("cursorB-vs-flipB") {
-			for (i = 0; i <= flip_test_last; i++) {
-				igt_dynamic_f("%s", modes[i])
-					flip(&display, 1, 1, 10, i);
+			for (j = 0; j < ARRAY_SIZE(tests); j++) {
+				igt_subtest_f("%s-%s", tests[j].name, modes[i])
+					flip(&display, tests[j].cursor_pipe,
+					     tests[j].flip_pipe, tests[j].timeout, i);
 			}
 		}
 	}
-- 
2.39.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-23 10:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-12  6:27 [igt-dev] [i-g-t 1/2] tests/kms_cursor_legacy: Fix CI tiemout issues Bhanuprakash Modem
2023-02-12  6:27 ` [igt-dev] [i-g-t 2/2] Revert "tests/intel-ci: Rename kms_cursor_legacy subtests in BAT" Bhanuprakash Modem
2023-02-23 10:26   ` Karthik B S
2023-02-12  7:13 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] tests/kms_cursor_legacy: Fix CI tiemout issues Patchwork
2023-02-13  8:44   ` Modem, Bhanuprakash
2023-02-13 15:58     ` Yedireswarapu, SaiX Nandan
2023-02-13 15:25 ` Patchwork
2023-02-13 15:45 ` Patchwork
2023-02-13 15:57 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-02-13 17:41 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-23 10:25 ` [igt-dev] [i-g-t 1/2] " Karthik B S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox