diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 13:47:47 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 13:47:47 +0200 |
commit | 6234658063b4080778c34228a444e96eb901279f (patch) | |
tree | 90bae911b39c7f00ea625fc0ba9b6ff3856afa99 /tests/gem_partial_pwrite_pread.c | |
parent | 1532af19d9bf962412bb150393aa10d13fae91d6 (diff) |
tests: add igt_subtest_f for snprintf'ing testnames
Useful when stitching together combinatorial testnames.
v2:
- ## rules are just fun. We need 2 indirections to actually get
__LINE__ to properly expand.
- Kill stray ; which botched the logic.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_partial_pwrite_pread.c')
-rw-r--r-- | tests/gem_partial_pwrite_pread.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c index ce2f1c81..814c552b 100644 --- a/tests/gem_partial_pwrite_pread.c +++ b/tests/gem_partial_pwrite_pread.c @@ -254,21 +254,16 @@ static void test_partial_read_writes(void) static void do_tests(int cache_level, const char *suffix) { - char name[80]; - if (cache_level != -1) gem_set_caching(fd, scratch_bo->handle, cache_level); - snprintf(name, sizeof(name), "reads%s", suffix); - igt_subtest(name) + igt_subtest_f("reads%s", suffix) test_partial_reads(); - snprintf(name, sizeof(name), "writes%s", suffix); - igt_subtest(name) + igt_subtest_f("write%s", suffix) test_partial_writes(); - snprintf(name, sizeof(name), "writes-after-reads%s", suffix); - igt_subtest(name) + igt_subtest_f("writes-after-reads%s", suffix) test_partial_read_writes(); } |