From 82108d96566dfa1210b1fbe2f6deaf6d77d1e34e Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Tue, 11 Feb 2014 17:48:32 +0000 Subject: [PATCH] kms_pipe_crc_basic: Remove igt_display_get_n_pipes() usage in main The fixture won't be run when listing the subtests and thus we can't use igt_display_get_n_pipes() in the list of tests. The alternative here is to list the subtests with the maximum values and skip when not supported on the platform. Signed-off-by: Damien Lespiau --- tests/kms_pipe_crc_basic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index d74a839b..0049d10a 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -65,6 +65,8 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags) int valid_connectors = 0; igt_output_t *output; + igt_skip_on(pipe >= data->display.n_pipes); + for_each_connected_output(display, output) { igt_plane_t *primary; drmModeModeInfo *mode; @@ -155,7 +157,7 @@ igt_main igt_subtest("bad-nb-words-3") test_bad_command(&data, "pipe A none option"); - for (int i = 0; i < igt_display_get_n_pipes(&data.display); i++) { + for (int i = 0; i < 3; i++) { igt_subtest_f("read-crc-pipe-%c", 'A'+i) test_read_crc(&data, i, 0);