summaryrefslogtreecommitdiff
path: root/tests/gem_exec_whisper.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-03-23 10:48:32 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-03-23 10:49:21 +0000
commitfe97e037eb9940f0f246a09ad9f1f7474265ea84 (patch)
treec9fbaa96a2f87febb51bb9378e9651e18bf2042d /tests/gem_exec_whisper.c
parentb1fa6c81a59862510a0fbbb9af758ae60ca1f459 (diff)
igt/gem_exec_whisper: Do context requirement check in parent
Don't do igt_require() from child processes, igt doesn't like that. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_whisper.c')
-rw-r--r--tests/gem_exec_whisper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/gem_exec_whisper.c b/tests/gem_exec_whisper.c
index 04ccc7f0..53988103 100644
--- a/tests/gem_exec_whisper.c
+++ b/tests/gem_exec_whisper.c
@@ -231,6 +231,11 @@ static void whisper(int fd, unsigned engine, unsigned flags)
}
igt_require(nengine);
+ if (flags & CONTEXTS) {
+ igt_require(__gem_context_create(fd, &contexts[0]) == 0);
+ gem_context_destroy(fd, contexts[0]);
+ }
+
if (flags & HANG)
init_hang(&hang);
@@ -289,8 +294,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
batch[++i] = MI_BATCH_BUFFER_END;
if (flags & CONTEXTS) {
- igt_require(__gem_context_create(fd, &contexts[0]) == 0);
- for (n = 1; n < 64; n++)
+ for (n = 0; n < 64; n++)
contexts[n] = gem_context_create(fd);
}
if (flags & FDS) {