diff mbox series

[i-g-t,08/24] i915/gem_ctx_param: Remove kneecapping

Message ID 20190322092155.1656-8-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t,01/24] i915/gem_exec_latency: Measure the latency of context switching | expand

Commit Message

Chris Wilson March 22, 2019, 9:21 a.m. UTC
The invalid set/get tests do not serve the purpose of detecting whether
or not invalid parameters are indeed detect correctly -- simply because
the kernel is the arbiter of what is invalid and this test second
guesses that and is wrong.

The intent of this test was to ensure that we didn't include any holes
in the parameter space that may have been used for nefarious undisclosed
purposes, i.e. the maintainer's job backed up by reviewers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 tests/i915/gem_ctx_param.c | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

Tvrtko Ursulin March 26, 2019, 9:58 a.m. UTC | #1
On 22/03/2019 09:21, Chris Wilson wrote:
> The invalid set/get tests do not serve the purpose of detecting whether
> or not invalid parameters are indeed detect correctly -- simply because
> the kernel is the arbiter of what is invalid and this test second
> guesses that and is wrong.
> 
> The intent of this test was to ensure that we didn't include any holes
> in the parameter space that may have been used for nefarious undisclosed
> purposes, i.e. the maintainer's job backed up by reviewers.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>   tests/i915/gem_ctx_param.c | 16 ----------------
>   1 file changed, 16 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
> index acc1e6297..b3f8637df 100644
> --- a/tests/i915/gem_ctx_param.c
> +++ b/tests/i915/gem_ctx_param.c
> @@ -296,22 +296,6 @@ igt_main
>   
>   	/* I915_CONTEXT_PARAM_SSEU tests are located in gem_ctx_sseu.c */
>   
> -	/* NOTE: This testcase intentionally tests for the next free parameter
> -	 * to catch ABI extensions. Don't "fix" this testcase without adding all
> -	 * the tests for the new param first.
> -	 */
> -	arg.param = I915_CONTEXT_PARAM_SSEU + 1;
> -
> -	igt_subtest("invalid-param-get") {
> -		arg.ctx_id = ctx;
> -		igt_assert_eq(__gem_context_get_param(fd, &arg), -EINVAL);
> -	}
> -
> -	igt_subtest("invalid-param-set") {
> -		arg.ctx_id = ctx;
> -		igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL);
> -	}
> -
>   	igt_fixture
>   		close(fd);
>   }
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
diff mbox series

Patch

diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index acc1e6297..b3f8637df 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -296,22 +296,6 @@  igt_main
 
 	/* I915_CONTEXT_PARAM_SSEU tests are located in gem_ctx_sseu.c */
 
-	/* NOTE: This testcase intentionally tests for the next free parameter
-	 * to catch ABI extensions. Don't "fix" this testcase without adding all
-	 * the tests for the new param first.
-	 */
-	arg.param = I915_CONTEXT_PARAM_SSEU + 1;
-
-	igt_subtest("invalid-param-get") {
-		arg.ctx_id = ctx;
-		igt_assert_eq(__gem_context_get_param(fd, &arg), -EINVAL);
-	}
-
-	igt_subtest("invalid-param-set") {
-		arg.ctx_id = ctx;
-		igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL);
-	}
-
 	igt_fixture
 		close(fd);
 }