public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/2] tests/kms_ccs: Skip with a more meaningful message
Date: Thu,  4 Jul 2019 16:30:40 +0300	[thread overview]
Message-ID: <20190704133041.15162-1-arkadiusz.hiler@intel.com> (raw)

If CCS is not supported, i.e. we have executed no test for it, let's
skip with a message saying so instead of mysterious requirement on
test_output().

A lot of people get confused by current output thinking that there is
something wrong with output/modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110580
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/kms_ccs.c | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 2f08a837..5a1f940e 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -297,7 +297,7 @@ static int test_ccs(data_t *data)
 	return valid_tests;
 }
 
-static int test_output(data_t *data)
+static int __test_output(data_t *data)
 {
 	igt_display_t *display = &data->display;
 	int i, valid_tests = 0;
@@ -322,6 +322,12 @@ static int test_output(data_t *data)
 	return valid_tests;
 }
 
+static void test_output(data_t *data)
+{
+	int valid_tests = __test_output(data);
+	igt_require_f(valid_tests > 0, "CCS not supported, skipping");
+}
+
 static data_t data;
 
 igt_main
@@ -345,19 +351,18 @@ igt_main
 
 		data.flags = TEST_BAD_PIXEL_FORMAT;
 		igt_subtest_f("pipe-%s-bad-pixel-format", pipe_name)
-			igt_require(test_output(&data));
 
 		data.flags = TEST_BAD_ROTATION_90;
 		igt_subtest_f("pipe-%s-bad-rotation-90", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 
 		data.flags = TEST_CRC;
 		igt_subtest_f("pipe-%s-crc-primary-basic", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 
 		data.flags = TEST_CRC | TEST_ROTATE_180;
 		igt_subtest_f("pipe-%s-crc-primary-rotation-180", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 
 		data.flags = TEST_CRC;
 		igt_subtest_f("pipe-%s-crc-sprite-planes-basic", pipe_name) {
@@ -368,25 +373,25 @@ igt_main
 			for_each_plane_on_pipe(&data.display, data.pipe, data.plane) {
 				if (data.plane->type == DRM_PLANE_TYPE_PRIMARY)
 					continue;
-				valid_tests += test_output(&data);
+				valid_tests += __test_output(&data);
 			}
 
-			igt_require(valid_tests);
+			igt_require_f(valid_tests > 0, "CCS not supported, skipping");
 		}
 
 		data.plane = NULL;
 
 		data.flags = TEST_NO_AUX_BUFFER;
 		igt_subtest_f("pipe-%s-missing-ccs-buffer", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 
 		data.flags = TEST_BAD_CCS_HANDLE;
 		igt_subtest_f("pipe-%s-ccs-on-another-bo", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 
 		data.flags = TEST_BAD_AUX_STRIDE;
 		igt_subtest_f("pipe-%s-bad-aux-stride", pipe_name)
-			igt_require(test_output(&data));
+			test_output(&data);
 	}
 
 	igt_fixture
-- 
2.21.0

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

             reply	other threads:[~2019-07-04 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 13:30 Arkadiusz Hiler [this message]
2019-07-04 13:30 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_ccs: Clean up output selection Arkadiusz Hiler
2019-07-04 14:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] tests/kms_ccs: Skip with a more meaningful message Patchwork
2019-07-05  6:26   ` Arkadiusz Hiler
2019-07-10  7:42 ` [igt-dev] [PATCH v2 i-g-t 1/2] " Arkadiusz Hiler

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=20190704133041.15162-1-arkadiusz.hiler@intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=dhinakaran.pandiyan@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