All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Subject: [igt-dev] [PATCH i-g-t] tests/debugfs: use igt_display_require
Date: Thu,  4 Oct 2018 21:07:18 +0200	[thread overview]
Message-ID: <20181004190718.20326-1-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20181004132128.6412-1-daniel.vetter@ffwll.ch>

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

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/debugfs_test.c | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 2e87e4420b15..eb32932ed686 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -87,23 +87,14 @@ 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") {
 		/* try to light all pipes */
@@ -152,6 +143,27 @@ 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_group
+		kms_tests(fd, debugfs);
+
 	igt_subtest("emon_crash") {
 		int i;
 		/*
@@ -174,7 +186,6 @@ igt_main
 	}
 
 	igt_fixture {
-		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
-- 
2.19.0.rc2

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

  parent reply	other threads:[~2018-10-04 19:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 13:21 [igt-dev] [PATCH i-g-t 1/4] tests/debugfs: use igt_display_require Daniel Vetter
2018-10-04 13:21 ` [igt-dev] [PATCH i-g-t 2/4] tests: Use igt_display_require Daniel Vetter
2018-10-04 15:06   ` Chris Wilson
2018-10-04 19:04     ` Daniel Vetter
2018-10-05  8:30       ` Daniel Vetter
2018-10-04 13:21 ` [igt-dev] [PATCH i-g-t 3/4] lib/kms: Drop igt_display_init Daniel Vetter
2018-10-04 13:21 ` [igt-dev] [PATCH i-g-t 4/4] lib/kms: warn if we commit without outputs Daniel Vetter
2018-10-05 15:07   ` Daniel Vetter
2018-10-05 15:40     ` Chris Wilson
2018-10-05 18:48       ` Daniel Vetter
2018-10-12 12:02         ` Arkadiusz Hiler
2018-10-12 12:32           ` Daniel Vetter
2018-10-12 12:57             ` Arkadiusz Hiler
2018-10-17  9:57               ` Arkadiusz Hiler
2018-10-04 14:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/debugfs: use igt_display_require Patchwork
2018-10-04 15:03 ` [igt-dev] [PATCH i-g-t 1/4] " Chris Wilson
2018-10-04 19:07 ` Daniel Vetter [this message]
2018-10-04 19:55 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] tests/debugfs: use igt_display_require (rev2) Patchwork
2018-10-04 23:43 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/4] tests/debugfs: use igt_display_require Patchwork
2018-10-05  3:09 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t] tests/debugfs: use igt_display_require (rev2) Patchwork
2018-11-02  9:57 [igt-dev] [PATCH i-g-t 2/5] tests/debugfs: use igt_display_require Daniel Vetter
2018-11-06 22:09 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181004190718.20326-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.