public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require
@ 2018-11-22  9:36 Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:36 UTC (permalink / raw)
  To: IGT development

Need to extract into a test subgroup to make sure we only skip the
tests that need display support.

v2: Chris pointed out that "read-all-entries" was the original non-kms
tests, and we don't want to skip that if there's no output. Make a
seperate test for this.

Also, that kind of where libraries magically second-guess what the
test might have wanted when it supplies an invalid request is exactly
why I want to fix the igt_display_init API regression.

v3: Actually squash in the hunk that was supposed to do v2 into this
patch (Antonio).

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/debugfs_test.c | 42 ++++++++++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 2e87e4420b15..6a87d90afd0e 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -87,25 +87,16 @@ static void read_and_discard_sysfs_entries(int path_fd, int indent)
 	closedir(dir);
 }
 
-igt_main
+static void kms_tests(int fd, int debugfs)
 {
-	int fd = -1, debugfs;
 	igt_display_t display;
 	struct igt_fb fb[IGT_MAX_PIPES];
 	enum pipe pipe;
 
-	igt_skip_on_simulation();
-
-	igt_fixture {
-		fd = drm_open_driver_master(DRIVER_INTEL);
-		igt_require_gem(fd);
-		debugfs = igt_debugfs_dir(fd);
-
-		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, fd);
-	}
+	igt_fixture
+		igt_display_require(&display, fd);
 
-	igt_subtest("read_all_entries") {
+	igt_subtest("read_all_entries_display_on") {
 		/* try to light all pipes */
 		for_each_pipe(&display, pipe) {
 			igt_output_t *output;
@@ -152,6 +143,30 @@ igt_main
 		read_and_discard_sysfs_entries(debugfs, 0);
 	}
 
+	igt_fixture
+		igt_display_fini(&display);
+}
+
+igt_main
+{
+	int fd = -1, debugfs;
+
+	igt_skip_on_simulation();
+
+	igt_fixture {
+		fd = drm_open_driver_master(DRIVER_INTEL);
+		igt_require_gem(fd);
+		debugfs = igt_debugfs_dir(fd);
+
+		kmstest_set_vt_graphics_mode();
+	}
+
+	igt_subtest("read_all_entries")
+		read_and_discard_sysfs_entries(debugfs, 0);
+
+	igt_subtest_group
+		kms_tests(fd, debugfs);
+
 	igt_subtest("emon_crash") {
 		int i;
 		/*
@@ -174,7 +189,6 @@ igt_main
 	}
 
 	igt_fixture {
-		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-11-29 17:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 3/5] lib/kms: Drop igt_display_init Daniel Vetter
2018-11-26 21:37   ` Antonio Argenziano
2018-11-27  8:46     ` Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: warn if we commit without outputs Daniel Vetter
2018-11-26 12:33   ` Arkadiusz Hiler
2018-11-22  9:37 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: Enable outputs by default in igt_require_display Daniel Vetter
2018-11-29 17:18   ` Daniel Vetter
2018-11-23 11:53 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require Patchwork
2018-11-23 13:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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