summaryrefslogtreecommitdiff
path: root/tests/gem_ctx_thrash.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_ctx_thrash.c')
-rw-r--r--tests/gem_ctx_thrash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c
index c0740b9f..b5d334f4 100644
--- a/tests/gem_ctx_thrash.c
+++ b/tests/gem_ctx_thrash.c
@@ -124,6 +124,8 @@ static void single(const char *name, bool all_engines)
igt_require_gem(fd);
igt_require(gem_can_store_dword(fd, 0));
+ gem_require_contexts(fd);
+
gen = intel_gen(intel_get_drm_devid(fd));
num_engines = 0;
@@ -371,6 +373,10 @@ static void threads(void)
struct thread data;
data.fd = drm_open_driver_render(DRIVER_INTEL);
+ igt_require_gem(data.fd);
+
+ gem_require_contexts(data.fd);
+
data.num_ctx = get_num_contexts(data.fd, false);
data.all_ctx = malloc(data.num_ctx * sizeof(uint32_t));
igt_assert(data.all_ctx);