public inbox for igt-dev@lists.freedesktop.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 3/5] tests: Use igt_display_require
Date: Fri,  2 Nov 2018 10:57:24 +0100	[thread overview]
Message-ID: <20181102095726.9052-3-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20181102095726.9052-1-daniel.vetter@ffwll.ch>

Remaining tests that have been overlooked and don't need any
invasive changes to limit the skipping to only the relevant parts.

v2: read-all-entries was supposed to be the original non-KMS test.
Split them up for clarity.

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_chamelium.c               | 2 +-
 tests/debugfs_test.c              | 5 ++++-
 tests/kms_atomic_interruptible.c  | 4 ++--
 tests/kms_force_connector_basic.c | 2 +-
 tests/kms_getfb.c                 | 2 +-
 tests/kms_plane_alpha_blend.c     | 2 +-
 tests/perf_pmu.c                  | 2 +-
 tests/pm_backlight.c              | 2 +-
 tests/prime_mmap_kms.c            | 2 +-
 9 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a80ead163846..d136fb04c342 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -1547,7 +1547,7 @@ static void chamelium_exit_handler(int sig)
 /**
  * chamelium_init:
  * @chamelium: The Chamelium instance to use
- * @drm_fd: a display initialized with #igt_display_init
+ * @drm_fd: a display initialized with #igt_display_require
  *
  * Sets up a connection with a chamelium, using the URL specified in the
  * Chamelium configuration. This must be called first before trying to use the
diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index eb32932ed686..6a87d90afd0e 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -96,7 +96,7 @@ static void kms_tests(int fd, int debugfs)
 	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;
@@ -161,6 +161,9 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 	}
 
+	igt_subtest("read_all_entries")
+		read_and_discard_sysfs_entries(debugfs, 0);
+
 	igt_subtest_group
 		kms_tests(fd, debugfs);
 
diff --git a/tests/kms_atomic_interruptible.c b/tests/kms_atomic_interruptible.c
index 8e9d4cb69c4d..be688638973f 100644
--- a/tests/kms_atomic_interruptible.c
+++ b/tests/kms_atomic_interruptible.c
@@ -85,8 +85,8 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t
 
 	/*
 	 * Make sure we start with everything disabled to force a real modeset.
-	 * igt_display_init only sets sw state, and assumes the first test doesn't care
-	 * about hw state.
+	 * igt_display_require only sets sw state, and assumes the first test
+	 * doesn't care about hw state.
 	 */
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index e9325dec9305..b8246e669939 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
 
 		/* attempt to use the display */
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, drm_fd);
+		igt_display_require(&display, drm_fd);
 		igt_display_commit(&display);
 		igt_display_fini(&display);
 
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 07ffd79c4613..ca0b01c05e5c 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -116,7 +116,7 @@ static uint32_t get_any_prop_id(int fd)
 {
 	igt_display_t display;
 
-	igt_display_init(&display, fd);
+	igt_display_require(&display, fd);
 	for (int i = 0; i < display.n_outputs; i++) {
 		igt_output_t *output = &display.outputs[i];
 		if (output->props[IGT_CONNECTOR_DPMS] != 0)
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 3fab118ae0e1..1d9d8933d7e2 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -565,7 +565,7 @@ igt_main
 	igt_fixture {
 		data.gfx_fd = drm_open_driver(DRIVER_ANY);
 		igt_require_pipe_crc(data.gfx_fd);
-		igt_display_init(&data.display, data.gfx_fd);
+		igt_display_require(&data.display, data.gfx_fd);
 		igt_require(data.display.is_atomic);
 	}
 
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index b34bc66ce2c4..21292bf3a2fe 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -811,7 +811,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e)
 	igt_skip_on(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
 
 	kmstest_set_vt_graphics_mode();
-	igt_display_init(&data.display, gem_fd);
+	igt_display_require(&data.display, gem_fd);
 
 	/**
 	 * We will use the display to render event forwarind so need to
diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index 32808cdf6ca4..054300f6e2e1 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -214,7 +214,7 @@ igt_main
 		 * try to enable all.
 		 */
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+		igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
 
 		/* should be ../../cardX-$output */
 		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
diff --git a/tests/prime_mmap_kms.c b/tests/prime_mmap_kms.c
index faace4afd478..fdc37214d96d 100644
--- a/tests/prime_mmap_kms.c
+++ b/tests/prime_mmap_kms.c
@@ -248,7 +248,7 @@ igt_main
 
 		igt_require_pipe_crc(gpu.drm_fd);
 
-		igt_display_init(&gpu.display, gpu.drm_fd);
+		igt_display_require(&gpu.display, gpu.drm_fd);
 	}
 
 	igt_subtest("buffer-sharing")
-- 
2.19.1

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

  parent reply	other threads:[~2018-11-02  9:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02  9:57 [igt-dev] [PATCH i-g-t 1/5] tests/sw_sync: use igt_fork_helper Daniel Vetter
2018-11-02  9:57 ` [igt-dev] [PATCH i-g-t 2/5] tests/debugfs: use igt_display_require Daniel Vetter
2018-11-02 11:16   ` Chris Wilson
2018-11-06 17:18   ` Antonio Argenziano
2018-11-06 22:05     ` Daniel Vetter
2018-11-06 22:09   ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2018-11-02  9:57 ` Daniel Vetter [this message]
2018-11-06 22:09   ` [igt-dev] [PATCH i-g-t] tests: Use igt_display_require Daniel Vetter
2018-11-02  9:57 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: Drop igt_display_init Daniel Vetter
2018-11-02  9:57 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: warn if we commit without outputs Daniel Vetter
2018-11-02 12:11   ` Maarten Lankhorst
2018-11-20 10:21     ` Daniel Vetter
2018-11-20 11:09     ` Maarten Lankhorst
2018-11-21 12:23   ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2018-11-02 10:36 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/sw_sync: use igt_fork_helper Patchwork
2018-11-02 12:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-11-02 12:26 ` [igt-dev] [PATCH i-g-t 1/5] " Robert Foss
2018-11-07 19:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/sw_sync: use igt_fork_helper (rev3) Patchwork
2018-11-08  7:23 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-11-21 15:01 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/5] tests/sw_sync: use igt_fork_helper (rev4) Patchwork

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=20181102095726.9052-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox