diff mbox

[i-g-t] tests: remove gem_ctx_param

Message ID 20171108091508.6234-1-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Nov. 8, 2017, 9:15 a.m. UTC
I'm fed up trying to tilt windmills, if the gem team thinks they don't
need these tests we better remove them.

We could also remove the invalid-flag subtests which are the failing
ones, but since it ends up being me always typing the missing
testcases that this one catches (there's no tests afaict that check
that context priority rejects bad input) I don't see the point.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103107
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/Makefile.sources                |   1 -
 tests/gem_ctx_param.c                 | 157 ----------------------------------
 tests/intel-ci/fast-feedback.testlist |   2 -
 tests/meson.build                     |   1 -
 4 files changed, 161 deletions(-)
 delete mode 100644 tests/gem_ctx_param.c
diff mbox

Patch

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 24728f13d131..56392a767361 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -56,7 +56,6 @@  TESTS_progs = \
 	gem_ctx_basic \
 	gem_ctx_create \
 	gem_ctx_exec \
-	gem_ctx_param \
 	gem_ctx_switch \
 	gem_ctx_thrash \
 	gem_double_irq_loop \
diff --git a/tests/gem_ctx_param.c b/tests/gem_ctx_param.c
deleted file mode 100644
index efdaf191a1ed..000000000000
--- a/tests/gem_ctx_param.c
+++ /dev/null
@@ -1,157 +0,0 @@ 
-/*
- * Copyright © 2015 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- *    Daniel Vetter <daniel.vetter@ffwll.ch>
- */
-
-#include "igt.h"
-
-IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
-
-igt_main
-{
-	struct local_i915_gem_context_param arg;
-	int fd;
-	uint32_t ctx;
-
-	memset(&arg, 0, sizeof(arg));
-
-	igt_fixture {
-		fd = drm_open_driver_render(DRIVER_INTEL);
-		ctx = gem_context_create(fd);
-	}
-
-	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);
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_subtest("basic-default") {
-		arg.context = 0;
-		gem_context_get_param(fd, &arg);
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_subtest("invalid-ctx-get") {
-		arg.context = 2;
-		igt_assert_eq(__gem_context_get_param(fd, &arg), -ENOENT);
-	}
-
-	igt_subtest("invalid-ctx-set") {
-		arg.context = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.context = 2;
-		igt_assert_eq(__gem_context_set_param(fd, &arg), -ENOENT);
-	}
-
-	igt_subtest("invalid-size-get") {
-		arg.context = ctx;
-		arg.size = 8;
-		gem_context_get_param(fd, &arg);
-		igt_assert(arg.size == 0);
-	}
-
-	igt_subtest("invalid-size-set") {
-		arg.context = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.size = 8;
-		igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL);
-		arg.size = 0;
-	}
-
-	igt_subtest("non-root-set") {
-		igt_fork(child, 1) {
-			igt_drop_root();
-
-			arg.context = ctx;
-			gem_context_get_param(fd, &arg);
-			arg.value--;
-			igt_assert_eq(__gem_context_set_param(fd, &arg), -EPERM);
-		}
-
-		igt_waitchildren();
-	}
-
-	igt_subtest("root-set") {
-		arg.context = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value--;
-		gem_context_set_param(fd, &arg);
-	}
-
-	arg.param = LOCAL_CONTEXT_PARAM_NO_ZEROMAP;
-
-	igt_subtest("non-root-set-no-zeromap") {
-		igt_fork(child, 1) {
-			igt_drop_root();
-
-			arg.context = ctx;
-			gem_context_get_param(fd, &arg);
-			arg.value--;
-			gem_context_set_param(fd, &arg);
-		}
-
-		igt_waitchildren();
-	}
-
-	igt_subtest("root-set-no-zeromap-enabled") {
-		arg.context = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 1;
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_subtest("root-set-no-zeromap-disabled") {
-		arg.context = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 0;
-		gem_context_set_param(fd, &arg);
-	}
-
-	/* 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 = LOCAL_CONTEXT_PARAM_BANNABLE + 1;
-
-	igt_subtest("invalid-param-get") {
-		arg.context = ctx;
-		igt_assert_eq(__gem_context_get_param(fd, &arg), -EINVAL);
-	}
-
-	igt_subtest("invalid-param-set") {
-		arg.context = ctx;
-		igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL);
-	}
-
-	igt_fixture
-		close(fd);
-}
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index bf8c1e663801..6e7683bf001e 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -28,8 +28,6 @@  igt@gem_ctx_basic
 igt@gem_ctx_create@basic
 igt@gem_ctx_create@basic-files
 igt@gem_ctx_exec@basic
-igt@gem_ctx_param@basic
-igt@gem_ctx_param@basic-default
 igt@gem_ctx_switch@basic-default
 igt@gem_ctx_switch@basic-default-heavy
 igt@gem_exec_basic@basic-blt
diff --git a/tests/meson.build b/tests/meson.build
index d2cb52c2001c..cdc3e03617c5 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -36,7 +36,6 @@  test_progs = [
 	'gem_ctx_basic',
 	'gem_ctx_create',
 	'gem_ctx_exec',
-	'gem_ctx_param',
 	'gem_ctx_switch',
 	'gem_ctx_thrash',
 	'gem_double_irq_loop',