diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 12:07:44 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 12:17:51 +0200 |
commit | c2d6773b253b7ab15fe8818730aef2f9f7e4a23d (patch) | |
tree | 973890f2ba5e9a5383a2c9aff3ac3032862366e8 /tests | |
parent | 99431a4f06bcaaa8944d1ed8fed118cd2b97078b (diff) |
tests/gem_write_read_ring_switch: use igt_exit and friends
And consolidate the gem_require_ring check a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_write_read_ring_switch.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/tests/gem_write_read_ring_switch.c b/tests/gem_write_read_ring_switch.c index 9da393d2..21eef64a 100644 --- a/tests/gem_write_read_ring_switch.c +++ b/tests/gem_write_read_ring_switch.c @@ -42,7 +42,6 @@ #include "i830_reg.h" #define LOCAL_I915_EXEC_VEBOX (4<<0) -bool skipped_all = true; static drm_intel_bufmgr *bufmgr; struct intel_batchbuffer *batch; @@ -62,7 +61,10 @@ static void run_test(int ring, const char *testname) uint32_t *ptr; int i; - skipped_all = false; + gem_require_ring(fd, ring); + /* Testing render only makes sense with separate blt. */ + if (ring == I915_EXEC_RENDER) + gem_require_ring(fd, I915_EXEC_BLT); printf("running subtest %s\n", testname); @@ -191,26 +193,16 @@ int main(int argc, char **argv) } for (i = 0; i < ARRAY_SIZE(tests); i++) { - igt_subtest(tests[i].name) { - gem_require_ring(fd, tests[i].ring); - /* Testing render only makes sense with separate blt. */ - if (tests[i].ring == I915_EXEC_RENDER) - gem_require_ring(fd, I915_EXEC_BLT); + igt_subtest(tests[i].name) run_test(tests[i].ring, tests[i].name); - } } igt_fork_signal_helper(); for (i = 0; i < ARRAY_SIZE(tests); i++) { char name[180]; snprintf(name, sizeof(name), "%s-interruptible", tests[i].name); - igt_subtest(name) { - gem_require_ring(fd, tests[i].ring); - /* Testing render only makes sense with separate blt. */ - if (tests[i].ring == I915_EXEC_RENDER) - gem_require_ring(fd, I915_EXEC_BLT); + igt_subtest(name) run_test(tests[i].ring, name); - } } igt_stop_signal_helper(); @@ -218,5 +210,5 @@ int main(int argc, char **argv) close(fd); - return skipped_all ? 77 : 0; + igt_exit(); } |