[igt-dev] [PATCH i-g-t] test/i915: gem_ctx_exec: Drop engine in invalid context subtest
Venkata Sandeep Dhanalakota
venkata.s.dhanalakota at intel.com
Thu Nov 21 07:13:31 UTC 2019
Make invalid context subtest independent of engines, as the intent
of the subtest is to verify if using an invalid context returns
an error.
Cc: Andi Shyti <andi.shyti at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota at intel.com>
---
tests/i915/gem_ctx_exec.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 6c2cd922..817552e2 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -113,8 +113,7 @@ static void big_exec(int fd, uint32_t handle, int ring)
gem_sync(fd, handle);
}
-static void invalid_context(int fd, const struct intel_execution_engine2 *e,
- uint32_t handle)
+static void invalid_context(int fd, uint32_t handle)
{
struct drm_i915_gem_exec_object2 obj = {
.handle = handle,
@@ -122,7 +121,6 @@ static void invalid_context(int fd, const struct intel_execution_engine2 *e,
struct drm_i915_gem_execbuffer2 execbuf = {
.buffers_ptr = to_user_pointer(&obj),
.buffer_count = 1,
- .flags = e->flags,
};
unsigned int i;
uint32_t ctx;
@@ -133,7 +131,7 @@ static void invalid_context(int fd, const struct intel_execution_engine2 *e,
ctx = gem_context_create(fd);
i915_execbuffer2_set_context_id(execbuf, ctx);
- gem_execbuf(fd, &execbuf);
+ igt_assert_eq(__gem_execbuf(fd, &execbuf), 0);
gem_context_destroy(fd, ctx);
@@ -248,7 +246,6 @@ static void nohangcheck_hostile(int i915)
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
- const struct intel_execution_engine2 *e;
uint32_t handle;
uint32_t ctx_id;
int fd;
@@ -278,9 +275,8 @@ igt_main
gem_sync(fd, handle);
}
- __for_each_physical_engine(fd, e)
- igt_subtest_f("basic-invalid-context-%s", e->name)
- invalid_context(fd, e, handle);
+ igt_subtest("basic-invalid-context")
+ invalid_context(fd, handle);
igt_subtest("eviction")
big_exec(fd, handle, 0);
--
2.21.0.5.gaeb582a983
More information about the igt-dev
mailing list