diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-10 15:18:56 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-10 15:18:56 +0100 |
commit | 6bf29fa1735f7cd2de237f36647500256c296d86 (patch) | |
tree | b56e5f3ee3058ff681fcbfa5ca0760490f9e7ac5 | |
parent | ea124cc3b96a3f30cdfe8c12eaeef8d2f4d89507 (diff) |
v2: Fixes:more-ctx-tests
- args->size is an outparam for get, adjust test.
- Pick an invalid param, not an invalid ioctl number ... tsk.
-rw-r--r-- | tests/gem_ctx_param_basic.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/gem_ctx_param_basic.c b/tests/gem_ctx_param_basic.c index 1a2846a2..8a2534cd 100644 --- a/tests/gem_ctx_param_basic.c +++ b/tests/gem_ctx_param_basic.c @@ -86,8 +86,8 @@ igt_main igt_subtest("invalid-size-get") { ctx_param.context = ctx; ctx_param.size = 8; - TEST_FAIL(LOCAL_IOCTL_I915_GEM_CONTEXT_GETPARAM, EINVAL); - ctx_param.size = 0; + TEST_SUCCESS(LOCAL_IOCTL_I915_GEM_CONTEXT_GETPARAM); + igt_assert(ctx_param.size == 0); } igt_subtest("invalid-size-set") { @@ -98,16 +98,20 @@ igt_main ctx_param.size = 0; } + ctx_param.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD + 1; + igt_subtest("invalid-param-get") { ctx_param.context = ctx; - TEST_FAIL(LOCAL_IOCTL_I915_GEM_CONTEXT_GETPARAM + 1, EINVAL); + TEST_FAIL(LOCAL_IOCTL_I915_GEM_CONTEXT_GETPARAM, EINVAL); } igt_subtest("invalid-param-set") { ctx_param.context = ctx; - TEST_FAIL(LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM + 1, EINVAL); + TEST_FAIL(LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM, EINVAL); } + ctx_param.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; + igt_subtest("non-root-set") { igt_fork(child, 1) { igt_drop_root(); |