lib/drmtest: Add drmtest_subtest_block macro

Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-08-12 09:04:24 +02:00
parent 40ea6f4ea8
commit 9f6365e4ea
30 changed files with 123 additions and 118 deletions
+12 -12
View File
@@ -400,9 +400,9 @@ int main(int argc, char **argv)
if (gem_set_caching(fd, src, 0) == 0 &&
gem_set_caching(fd, dst, 0) == 0) {
if (drmtest_run_subtest("uncached-copy-correctness"))
drmtest_subtest_block("uncached-copy-correctness")
test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("uncached-copy-performance")) {
drmtest_subtest_block("uncached-copy-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;
@@ -417,9 +417,9 @@ int main(int argc, char **argv)
}
}
if (drmtest_run_subtest("uncached-pwrite-blt-gtt_mmap-correctness"))
drmtest_subtest_block("uncached-pwrite-blt-gtt_mmap-correctness")
test_as_gtt_mmap(fd, src, dst, object_size);
if (drmtest_run_subtest("uncached-pwrite-blt-gtt_mmap-performance")) {
drmtest_subtest_block("uncached-pwrite-blt-gtt_mmap-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;
@@ -437,9 +437,9 @@ int main(int argc, char **argv)
if (gem_set_caching(fd, src, 1) == 0 &&
gem_set_caching(fd, dst, 1) == 0) {
if (drmtest_run_subtest("snooped-copy-correctness"))
drmtest_subtest_block("snooped-copy-correctness")
test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("snooped-copy-performance")) {
drmtest_subtest_block("snooped-copy-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;
@@ -454,9 +454,9 @@ int main(int argc, char **argv)
}
}
if (drmtest_run_subtest("snooped-pwrite-blt-cpu_mmap-correctness"))
drmtest_subtest_block("snooped-pwrite-blt-cpu_mmap-correctness")
test_as_cpu_mmap(fd, src, dst, object_size);
if (drmtest_run_subtest("snooped-pwrite-blt-cpu_mmap-performance")) {
drmtest_subtest_block("snooped-pwrite-blt-cpu_mmap-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;
@@ -474,9 +474,9 @@ int main(int argc, char **argv)
if (gem_set_caching(fd, src, 2) == 0 &&
gem_set_caching(fd, dst, 2) == 0) {
if (drmtest_run_subtest("display-copy-correctness"))
drmtest_subtest_block("display-copy-correctness")
test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("display-copy-performance")) {
drmtest_subtest_block("display-copy-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;
@@ -491,9 +491,9 @@ int main(int argc, char **argv)
}
}
if (drmtest_run_subtest("display-pwrite-blt-gtt_mmap-correctness"))
drmtest_subtest_block("display-pwrite-blt-gtt_mmap-correctness")
test_as_gtt_mmap(fd, src, dst, object_size);
if (drmtest_run_subtest("display-pwrite-blt-gtt_mmap-performance")) {
drmtest_subtest_block("display-pwrite-blt-gtt_mmap-performance") {
for (count = 1; count <= 1<<17; count <<= 1) {
struct timeval start, end;