From 1abbd6974013a5ed1f6db1bbcdd492fef610af02 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 19 Mar 2016 15:04:24 +0000 Subject: 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 --- tests/gem_softpin.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'tests') 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); } -- cgit v1.2.3