diff options
| author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-07-10 10:42:34 +0300 |
|---|---|---|
| committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-08-06 13:02:15 +0300 |
| commit | 5a86cf2ddc112fb6f148fdfbc03d57f1b9f40e19 (patch) | |
| tree | ba10023c7340c7e222f8b99e9e1051823e7b8056 /tests | |
| parent | 242cb6f2149cb9699ba9b316e5f60b756260e829 (diff) | |
tests/kms_ccs: Skip with a more meaningful message
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.
v2: actually run tests for bad-pixel-format
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>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/kms_ccs.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c index 2f08a837..3b98d626 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,19 @@ igt_main data.flags = TEST_BAD_PIXEL_FORMAT; igt_subtest_f("pipe-%s-bad-pixel-format", pipe_name) - igt_require(test_output(&data)); + 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 +374,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 |
