diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-10 08:28:39 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-10 11:17:46 +0100 |
commit | e88caecc21119d35c035020756923b6e02503d48 (patch) | |
tree | 5a351307cd858e18ee795687e5a72854e68289ba /tests | |
parent | 48a9e1e1553d37067ea2199e00aa51a356e7fa68 (diff) |
igt/gem_ctx_threads: Repeat threads until timeout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_ctx_thrash.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c index e9708471..44b3b985 100644 --- a/tests/gem_ctx_thrash.c +++ b/tests/gem_ctx_thrash.c @@ -342,11 +342,13 @@ static void *thread(void *data) ctx = malloc(t->num_ctx * sizeof(uint32_t)); igt_assert(ctx); memcpy(ctx, t->all_ctx, t->num_ctx * sizeof(uint32_t)); - igt_permute_array(ctx, t->num_ctx, xchg_int); - for (unsigned n = 0; n < t->num_ctx; n++) { - execbuf.rsvd1 = ctx[n]; - gem_execbuf(t->fd, &execbuf); + igt_until_timeout(150) { + igt_permute_array(ctx, t->num_ctx, xchg_int); + for (unsigned n = 0; n < t->num_ctx; n++) { + execbuf.rsvd1 = ctx[n]; + gem_execbuf(t->fd, &execbuf); + } } free(ctx); |