summaryrefslogtreecommitdiff
path: root/tests/perf_pmu.c
diff options
context:
space:
mode:
authorAntonio Argenziano <antonio.argenziano@intel.com>2018-02-06 16:27:14 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-07 08:26:14 +0000
commit2baf7ece5b6d2faccedc56527ec91623f41a85e4 (patch)
treec2362e443cd7b61e51e6b92f939e16a107734be5 /tests/perf_pmu.c
parent3fd9b578b3138b04178b4ce8ee4a60e74a16ec91 (diff)
lib: Move __gem_context_create to common ioctl wrapper library.
This patch adds a context creation ioctl wrapper that returns the error for the caller to consume. Multiple tests that implemented this already, have been changed to use the new library function. v2: - Add gem_require_contexts() to check for contexts support (Chris) v3: - Add gem_has_contexts to check for contexts support and change gem_require_contexts to skip if contests support is not available. (Chris) v4: - Cosmetic changes and use lib function in gem_ctx_create where possible. (Michal) v5: - Use gem_contexts_require() in tests and fixtures. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r--tests/perf_pmu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 60cff4ee..407ca58c 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -1456,8 +1456,10 @@ igt_main
* Check that reported usage is correct when PMU is
* enabled after two batches are running.
*/
- igt_subtest_f("busy-double-start-%s", e->name)
+ igt_subtest_f("busy-double-start-%s", e->name) {
+ gem_require_contexts(fd);
busy_double_start(fd, e);
+ }
/**
* Check that the PMU can be safely enabled in face of