diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-01-26 09:23:51 -0800 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-02-17 11:24:04 +0000 |
commit | 89201c5328280a00c027fba404459de91b546a80 (patch) | |
tree | 2ee8aafce7c9fb74db8a58c202b573558df883f9 /tests/kms_universal_plane.c | |
parent | e8e28931b1c1c7b412474963d7a89bc307636950 (diff) |
tests/kms_universal_plane: Fix subtest enumeration
We shouldn't use the contents of data.display to determine which pipes
to run subtests on since this structure is initialized in an igt_fixture
and won't contain any useful data when enumerating subtests (i.e.,
--list-subtests won't return anything).
Instead, just assume we have three pipes in the main loop and ensure
that each subtest will skip if we don't really have that many.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/kms_universal_plane.c')
-rw-r--r-- | tests/kms_universal_plane.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c index 58e46915..04ff8402 100644 --- a/tests/kms_universal_plane.c +++ b/tests/kms_universal_plane.c @@ -359,6 +359,8 @@ sanity_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output) drmModeModeInfo *mode; int i, ret = 0; + igt_skip_on(pipe >= data->display.n_pipes); + igt_output_set_pipe(output, pipe); mode = igt_output_get_mode(output); @@ -471,6 +473,8 @@ pageflip_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output) fd_set fds; int ret = 0; + igt_skip_on(pipe >= data->display.n_pipes); + igt_output_set_pipe(output, pipe); pageflip_test_init(&test, output, pipe); @@ -552,8 +556,6 @@ static data_t data; igt_main { - int num_pipes; - igt_skip_on_simulation(); igt_fixture { @@ -567,8 +569,7 @@ igt_main igt_require(data.display.has_universal_planes); } - num_pipes = igt_display_get_n_pipes(&data.display); - for (int pipe = 0; pipe < num_pipes; pipe++) + for (int pipe = 0; pipe < 3; pipe++) run_tests_for_pipe(&data, pipe); igt_fixture { |