tests: use drmtest_skip() in caching ioctl helpers

This way we can rip out all the skip handling from the test control flow,
and additionally (by using drmtest_retval()) even get correct exit codes.

The only tricky part is that when we only want ot skip parts of a test
(like for gem_pread and gem_pwrite) we need to split out those parts as
subtests. But no addition of control-flow is required, the set/longjmp
magic in the helpers all makes it happen.

Also we make extensive use of the behaviour of drmtest_skip to skip
all subsequent subtests if it is called outside of a subtest. This allows
us to re-flatten the control flow a lot.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-08-12 10:43:59 +02:00
parent a4038d3853
commit 7553ad6e10
9 changed files with 177 additions and 170 deletions
+2 -2
View File
@@ -30,8 +30,10 @@ TESTS_progs_M = \
gem_linear_blits \
gem_mmap_gtt \
gem_partial_pwrite_pread \
gem_pread \
gem_pread_after_blit \
gem_prw_concurrent_blit \
gem_pwrite \
gem_pwrite_pread \
gem_ringfill \
gem_set_tiling_vs_blt \
@@ -73,8 +75,6 @@ TESTS_progs = \
gem_mmap_offset_exhaustion \
gem_pin \
gem_pipe_control_store_loop \
gem_pread \
gem_pwrite \
gem_readwrite \
gem_reg_read \
gem_reloc_overflow \