summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-25 13:49:11 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-25 16:18:19 +0300
commitf8e5a3fc7e92f67cea7c1832e786cbb344aefd5e (patch)
tree1bd1e2c065c72da47a60bfdfc17e29ad4dbd2941 /tests/kms_cursor_crc.c
parentf6e869732cfa054bfa218aa465b989c85a0ba489 (diff)
kms_cursor_crc: Wrap cursor fb creating into igt_fixture
We don't want to attempt creating the cursor fb when enumerating subtests. So wrap it into igt_fixture. Also destroy the cursor fb after the tests. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r--tests/kms_cursor_crc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 5e697eaa..ddcdb7d7 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -354,7 +354,8 @@ static void run_test_generic(data_t *data, int cursor_max_size)
igt_require(cursor_max_size >= cursor_size);
sprintf(c_size, "%d", cursor_size);
- create_cursor_fb(data, cursor_size, cursor_size);
+ igt_fixture
+ create_cursor_fb(data, cursor_size, cursor_size);
/* Using created cursor FBs to test cursor support */
igt_subtest_f("cursor-%s-onscreen", c_size)
@@ -365,8 +366,10 @@ static void run_test_generic(data_t *data, int cursor_max_size)
run_test(data, test_crc_sliding, cursor_size, cursor_size);
igt_subtest_f("cursor-%s-random", c_size)
run_test(data, test_crc_random, cursor_size, cursor_size);
- }
+ igt_fixture
+ igt_remove_fb(data->drm_fd, &data->fb);
+ }
}
uint64_t cursor_width, cursor_height;