summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-01-14 09:13:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-01-14 09:51:38 +0000
commitd9cd03c887a5f46bc002280d70a6716bb2bf8d43 (patch)
treef4edfec28329998013b7ff4c457dfb1c5600b339 /tests
parent71cea1269599f18b6f9a20da1e88f64dcf6e556c (diff)
i915/gem_exec_whisper: Limit to a maximum of 150s
Each individual pass is as effective at spotting an error using the Chinese whisper as any other, so the effectiveness of adding more passes rapidly diminishes. To keep the tests bounded within time, limit a subtest to a mere 150s! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108592 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/i915/gem_exec_whisper.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c
index 81303f84..277b678c 100644
--- a/tests/i915/gem_exec_whisper.c
+++ b/tests/i915/gem_exec_whisper.c
@@ -189,12 +189,12 @@ static void whisper(int fd, unsigned engine, unsigned flags)
unsigned engines[16];
unsigned nengine;
uint32_t batch[16];
- int i, n, pass, loc;
unsigned int relocations = 0;
unsigned int reloc_migrations = 0;
unsigned int reloc_interruptions = 0;
unsigned int eb_migrations = 0;
uint64_t old_offset;
+ int i, n, loc;
int debugfs;
if (flags & PRIORITY) {
@@ -323,7 +323,9 @@ static void whisper(int fd, unsigned engine, unsigned flags)
}
igt_while_interruptible(flags & INTERRUPTIBLE) {
- for (pass = 0; pass < 1024; pass++) {
+ unsigned int pass = 0;
+
+ igt_until_timeout(150) {
uint64_t offset;
if (!(flags & FORKED))
@@ -384,10 +386,10 @@ static void whisper(int fd, unsigned engine, unsigned flags)
handle[1] = batches[n].handle;
batches[n-1].handle =
gem_open(this_fd,
- gem_flink(fd, handle[0]));
+ gem_flink(fd, handle[0]));
batches[n].handle =
gem_open(this_fd,
- gem_flink(fd, handle[1]));
+ gem_flink(fd, handle[1]));
if (flags & PRIORITY)
ctx_set_random_priority(this_fd, 0);
}
@@ -462,7 +464,11 @@ static void whisper(int fd, unsigned engine, unsigned flags)
store = tmp[1];
scratch = tmp[0];
+
+ if (++pass == 1024)
+ break;
}
+ igt_debug("Completed %d/1024 passes\n", pass);
}
igt_info("Number of migrations for execbuf: %d\n", eb_migrations);
igt_info("Number of migrations for reloc: %d, interrupted %d, patched %d\n", reloc_migrations, reloc_interruptions, relocations);