diff options
author | Mika Kuoppala <mika.kuoppala@intel.com> | 2016-11-08 12:31:06 +0200 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2016-11-11 16:33:10 +0200 |
commit | 773ac7cc60357b91a5747217b926cca7ef71a5c1 (patch) | |
tree | fdb1a68a15b3fd816e70838a747c23bc92bcb545 /tests | |
parent | 1af5605a35a82932c13711675bfa5f034f7920fa (diff) |
lib: substitute cxt BAN_PERIOD with BANNABLE
Context BAN_PERIOD will get depracated so subsitute it with BANNABLE
property. Make ctx param test to accept both variants for now
until kernel changes have landed, to not break BAT.
v2: check against - EINVAL on get/set ban as it can return -EPERM
v3: better naming for get/set (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_ctx_param.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/gem_ctx_param.c b/tests/gem_ctx_param.c index 57d5e362..efdaf191 100644 --- a/tests/gem_ctx_param.c +++ b/tests/gem_ctx_param.c @@ -43,6 +43,11 @@ igt_main arg.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; + /* XXX start to enforce ban period returning -EINVAL when + * transition has been done */ + if (__gem_context_get_param(fd, &arg) == -EINVAL) + arg.param = LOCAL_CONTEXT_PARAM_BANNABLE; + igt_subtest("basic") { arg.context = ctx; gem_context_get_param(fd, &arg); @@ -82,8 +87,6 @@ igt_main arg.size = 0; } - arg.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; - igt_subtest("non-root-set") { igt_fork(child, 1) { igt_drop_root(); @@ -137,7 +140,7 @@ igt_main * to catch ABI extensions. Don't "fix" this testcase without adding all * the tests for the new param first. */ - arg.param = LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE + 1; + arg.param = LOCAL_CONTEXT_PARAM_BANNABLE + 1; igt_subtest("invalid-param-get") { arg.context = ctx; |