diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-11-22 23:46:32 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-11-27 16:20:09 +0200 |
commit | 3d371a7284798c96bb033a449acbad7cc29c2e29 (patch) | |
tree | 30adcac88d6a48fe4540c8aa57c85cb36e8d9eb3 /tests | |
parent | e1e5856b3ce09e9d8b0899e10cf7e3ef724679d5 (diff) |
kms_cursor_crc: Fix crc readout after a subtest failure
If a subtest fails, it'll leave the pipe CRC file open, which will
prevent subsequent subtests from opening the file. Make sure the file
is cloesed before trying to open it again.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_cursor_crc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 4ecc9c82..74da32eb 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -238,6 +238,9 @@ static bool prepare_crtc(test_data_t *test_data, uint32_t connector_id) connector_set_mode(data, &connector, &connector.config.default_mode); + igt_pipe_crc_free(data->pipe_crc[test_data->crtc_idx]); + data->pipe_crc[test_data->crtc_idx] = NULL; + pipe_crc = create_crc(data, test_data->crtc_idx); if (!pipe_crc) { printf("auto crc not supported on this connector with crtc %i\n", @@ -299,6 +302,7 @@ static void run_test(data_t *data, enum cursor_type cursor_type, bool onscreen) igt_subtest_name(), test_data.crtc_id, connector_id); igt_pipe_crc_free(data->pipe_crc[test_data.crtc_idx]); + data->pipe_crc[test_data.crtc_idx] = NULL; } } |