Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, swati2.sharma@intel.com
Subject: [igt-dev] [i-g-t 1/2] tests/kms_feature_discovery: Fix display subtest
Date: Tue, 21 Nov 2023 13:24:50 +0530	[thread overview]
Message-ID: <20231121075451.2012768-1-bhanuprakash.modem@intel.com> (raw)

Instead of doing nothing, check the connected platform really
supports the display or not.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_feature_discovery.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index 428f97ffe..81064aa0e 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -30,8 +30,7 @@
  *		anything else means we have a serious problem.
  *
  * SUBTEST: display
- * Description: Make sure that we have display support with
- * 		some outputs connected.
+ * Description: Make sure that we have display support.
  * Driver requirement: i915, xe
  * Functionality: feature_discovery
  * Mega feature: General Display Features
@@ -97,18 +96,25 @@ igt_main {
 	igt_fixture {
 		fd = drm_open_driver_master(DRIVER_ANY);
 		debugfs_fd = igt_debugfs_dir(fd);
+
+		errno = 0;
 	}
 
 	igt_subtest_group {
-		igt_fixture {
-			igt_display_require(&display, fd);
-		}
-
-		igt_describe("Make sure that we have display support with some outputs connected.");
+		igt_describe("Make sure that we have display support.");
 		igt_subtest("display") {
-			/* will skip because of the fixture */
+			drmModeResPtr resources = drmModeGetResources(fd);
+
+			/* Operation not supported on non-display platforms. */
+			if (!resources)
+				igt_assert_eq(errno, EOPNOTSUPP);
+
+			drmModeFreeResources(resources);
 		}
 
+		igt_fixture
+			igt_display_require(&display, fd);
+
 		igt_subtest_group {
 			volatile int output_count = 0;
 			igt_output_t *output;
-- 
2.40.0

             reply	other threads:[~2023-11-21  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  7:54 Bhanuprakash Modem [this message]
2023-11-21  7:54 ` [igt-dev] [i-g-t 2/2] tests/kms_feature_discovery: update display-1x Bhanuprakash Modem
2023-11-23  8:33   ` Kamil Konieczny
2023-11-21 11:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_feature_discovery: Fix display subtest Patchwork
2023-11-21 11:30 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-22  5:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-11-23  6:19 ` [igt-dev] [i-g-t 1/2] " Sharma, Swati2
2023-11-27 13:01   ` Modem, Bhanuprakash

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=20231121075451.2012768-1-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@intel.com \
    /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