All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] kms_flip_event_leak: Create dynamic subtests
@ 2022-08-16 11:51 Jeevan B
  0 siblings, 0 replies; only message in thread
From: Jeevan B @ 2022-08-16 11:51 UTC (permalink / raw)
  To: igt-dev; +Cc: nidhi1.gupta

Converting the existing subtests to dynamic subtests.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_flip_event_leak.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index ac201293..0acf93c3 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -89,21 +89,28 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)
 	igt_remove_fb(data->drm_fd, &fb[0]);
 }
 
-igt_simple_main
+igt_main
 {
 	data_t data = {};
 	igt_output_t *output;
 	int valid_tests = 0;
 	enum pipe pipe;
 
-	data.drm_fd = drm_open_driver_master(DRIVER_ANY);
-	kmstest_set_vt_graphics_mode();
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.drm_fd);
+	}
 
-	igt_display_require(&data.display, data.drm_fd);
 
-	for_each_pipe_with_valid_output(&data.display, pipe, output) {
-		test(&data, pipe, output);
-		valid_tests++;
+	igt_subtest_with_dynamic("kms_flip_event_leak") {
+		for_each_pipe_with_valid_output(&data.display, pipe, output) {
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe)) {
+				test(&data, pipe, output);
+				valid_tests++;
+			}
+		}
 	}
 
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
-- 
2.36.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-16 11:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 11:51 [igt-dev] [PATCH i-g-t 1/2] kms_flip_event_leak: Create dynamic subtests Jeevan B

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.