diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-09-25 09:16:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-09-25 09:18:29 +0100 |
commit | a7520973a210b7268c3039902789f433ee0f5ef7 (patch) | |
tree | 1fc51a7dad3a9bca035de81fce217402a9a47782 /tests/i915/gem_ppgtt.c | |
parent | 0ec962017c8131de14e0cb038f7f76b1f17ed637 (diff) |
i915/gem_ppgtt: Require contexts for context tests
Using the libdrm interface, failure to allocate a context upon demand
was ignored. Switching to libigt, such failures are reported.
Unfortunately, some machines lack context support and now fail instead
of skipping a test they cannot perform.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2493
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Zbigniew KempczyĆski <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/i915/gem_ppgtt.c')
-rw-r--r-- | tests/i915/gem_ppgtt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c index 949601ac..e81620ac 100644 --- a/tests/i915/gem_ppgtt.c +++ b/tests/i915/gem_ppgtt.c @@ -262,6 +262,18 @@ static void flink_and_close(void) close(fd2); } +static bool has_contexts(void) +{ + bool result; + int fd; + + fd = drm_open_driver(DRIVER_INTEL); + result = gem_has_contexts(fd); + close(fd); + + return result; +} + #define N_CHILD 8 igt_main { @@ -290,6 +302,8 @@ igt_main igt_subtest("blt-vs-render-ctxN") { struct intel_buf *bcs[1], *rcs[N_CHILD]; + igt_require(has_contexts()); + fork_rcs_copy(30, 0x8000 / N_CHILD, rcs, N_CHILD, CREATE_CONTEXT); fork_bcs_copy(30, 0x4000, bcs, 1); |