summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-03-19 15:04:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-03-19 15:21:28 +0000
commit1abbd6974013a5ed1f6db1bbcdd492fef610af02 (patch)
treec77695c5ba55649cd27175165de29ee987f7ed25 /tests
parent22674ae88bb1302a3d6326d908f593e46e3564c1 (diff)
igt/gem_softpin: Convert to igt_interruptible
Convert the fixed time interruptible tests to igt_interruptible() for a speed improvement. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_softpin.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index 62d22cee..1a9ef02b 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -491,41 +491,22 @@ igt_main
igt_subtest("noreloc")
test_noreloc(fd, NOSLEEP);
+ igt_subtest("noreloc-interruptible")
+ igt_interruptible(true) test_noreloc(fd, NOSLEEP);
igt_subtest("noreloc-S3")
test_noreloc(fd, SUSPEND);
igt_subtest("noreloc-S4")
test_noreloc(fd, HIBERNATE);
- igt_subtest("evict-active")
- test_evict_active(fd);
- igt_subtest("evict-snoop")
- test_evict_snoop(fd);
+ for (int signal = 0; signal <= 1; signal++) {
+ igt_subtest_f("evict-active%s", signal ? "-interruptible" : "")
+ igt_interruptible(signal) test_evict_active(fd);
+ igt_subtest_f("evict-snoop%s", signal ? "-interruptible" : "")
+ igt_interruptible(signal) test_evict_snoop(fd);
+ }
igt_subtest("evict-hang")
test_evict_hang(fd);
- igt_fork_signal_helper();
- igt_subtest("noreloc-interruptible") {
- struct timespec start = {};
- while (igt_seconds_elapsed(&start) < 20)
- test_noreloc(fd, NOSLEEP);
- }
- igt_subtest("evict-active-interruptible") {
- struct timespec start = {};
- while (igt_seconds_elapsed(&start) < 20)
- test_evict_active(fd);
- }
- igt_subtest("evict-snoop-interruptible") {
- struct timespec start = {};
- while (igt_seconds_elapsed(&start) < 20)
- test_evict_snoop(fd);
- }
- igt_subtest("evict-hang-interruptible") {
- struct timespec start = {};
- while (igt_seconds_elapsed(&start) < 20)
- test_evict_hang(fd);
- }
- igt_stop_signal_helper();
-
igt_fixture
close(fd);
}