Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Subject: [PATCH i-g-t 1/2] tests/kms_feature_discovery: make display test dynamic
Date: Mon, 29 Jan 2024 21:55:34 +0530	[thread overview]
Message-ID: <20240129162535.1462795-2-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20240129162535.1462795-1-kunal1.joshi@intel.com>

currently kms_feature_discovery@display checks for number
of display from 1 to 4, make it dynamic to check from 1 to n
also reducing unwanted skips.

anyone who needs to check number of displays for a particular
config can check kms_feature_discovery@display test result.

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/kms_feature_discovery.c | 35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)

diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index 5bca9ad76..e45c30ece 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -47,10 +47,6 @@
  * SUBTEST: display
  * Description: Make sure that we have display support.
  *
- * SUBTEST: display-%dx
- * Description: Make sure that we have display support with %arg[1]
- * 		outputs connected.
- *
  * SUBTEST: chamelium
  * Description: Make sure that Chamelium is configured and reachable.
  * Functionality: feature_discovery, chamelium
@@ -69,8 +65,6 @@
  * Description: Make sure that we have DP-MST configuration.
  * Functionality: feature_discovery, mst
  * Test category: functionality test
- *
- * arg[1].values: 1, 2, 3, 4
  */
 
 static igt_display_t display;
@@ -92,11 +86,6 @@ igt_main {
 			igt_display_require(&display, fd);
 		}
 
-		igt_describe("Make sure that we have display support.");
-		igt_subtest("display") {
-			/* will skip because of the fixture */
-		}
-
 		igt_subtest_group {
 			volatile int output_count = 0;
 			igt_output_t *output;
@@ -119,24 +108,12 @@ igt_main {
 				}
 			}
 
-			igt_describe("Make sure that we can use at least 1 output at the same time.");
-			igt_subtest("display-1x") {
-				igt_require(output_count >= 1);
-			}
-
-			igt_describe("Make sure that we can use at least 2 outputs at the same time.");
-			igt_subtest("display-2x") {
-				igt_require(output_count >= 2);
-			}
-
-			igt_describe("Make sure that we can use at least 3 outputs at the same time.");
-			igt_subtest("display-3x") {
-				igt_require(output_count >= 3);
-			}
-
-			igt_describe("Make sure that we can use at least 4 outputs at the same time.");
-			igt_subtest("display-4x") {
-				igt_require(output_count >= 4);
+			igt_describe("Make sure that we can use at least n output at the same time.");
+			igt_subtest_with_dynamic("display") {
+				int i;
+				for(i = 1; i <= output_count; i++)
+					igt_dynamic_f("-%dx", i)
+						igt_require(output_count >= i);
 			}
 		}
 
-- 
2.25.1


  reply	other threads:[~2024-01-29 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 16:25 [PATCH i-g-t 0/2] make display test dynamic Kunal Joshi
2024-01-29 16:25 ` Kunal Joshi [this message]
2024-01-29 16:25 ` [PATCH i-g-t 2/2] HAX: please do not merge Kunal Joshi
2024-01-29 17:07 ` ✓ CI.xeBAT: success for make display test dynamic Patchwork
2024-01-29 17:28 ` ✗ Fi.CI.BAT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-01-30  5:37 [PATCH i-g-t 0/2] " Kunal Joshi
2024-01-30  5:37 ` [PATCH i-g-t 1/2] tests/kms_feature_discovery: " Kunal Joshi
2024-02-05  7:58   ` B, Jeevan

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=20240129162535.1462795-2-kunal1.joshi@intel.com \
    --to=kunal1.joshi@intel.com \
    --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