From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_flip: Skip test only for invalid combination
Date: Tue, 21 Jun 2022 01:28:41 +0530 [thread overview]
Message-ID: <20220620195841.18245-1-jeevan.b@intel.com> (raw)
currently the entire test is skipping. adding this fix to skip test
only for invalid cases and run on other valid display combination.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_flip.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index c5b5741a..b443a7be 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -949,8 +949,8 @@ static void get_compatible_modes(drmModeModeInfo *a, drmModeModeInfo *b,
return;
}
}
-
- igt_skip("Compatible mode not found.\n");
+ *a = c1->modes[0];
+ *b = c2->modes[0];
}
return;
@@ -1318,6 +1318,25 @@ static int sort_drm_modes(const void *a, const void *b)
return (mode2->clock < mode1->clock) - (mode1->clock < mode2->clock);
}
+static void compatible_mode_check(struct test_output *o)
+{
+ drmModeModeInfo mode[2];
+ int i;
+
+ for (i = 0; i < RUN_PAIR; i++) {
+ qsort(o->kconnector[i]->modes,
+ o->kconnector[i]->count_modes,
+ sizeof(drmModeModeInfo),
+ sort_drm_modes);
+ }
+
+ get_compatible_modes(&mode[0], &mode[1],
+ o->kconnector[0], o->kconnector[1]);
+
+ if (mode[0].hdisplay != mode[1].hdisplay && mode[0].vdisplay != mode[1].vdisplay)
+ igt_skip("Compatible mode not found.\n");
+}
+
static void get_suitable_modes(struct test_output *o)
{
drmModeModeInfo mode[2];
@@ -1351,6 +1370,7 @@ static void __run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
uint64_t modifier;
int i, ret;
+ compatible_mode_check(o);
restart:
last_connector = o->kconnector[0];
--
2.36.0
next reply other threads:[~2022-06-20 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 19:58 Jeevan B [this message]
2022-06-20 22:24 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_flip: Skip test only for invalid combination 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=20220620195841.18245-1-jeevan.b@intel.com \
--to=jeevan.b@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