summaryrefslogtreecommitdiff
path: root/tests/drm_mm.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2017-03-10 16:20:33 +0200
committerPetri Latvala <petri.latvala@intel.com>2017-03-13 15:55:37 +0200
commit7ab5c97924bf971a348ff4a1768da624ba2f564c (patch)
tree0b1a994ffdb3e16b87a78f40b92cddbb72914ab2 /tests/drm_mm.c
parent5ca0da9f53023b9fcfd327a5f43bc7b0916b24b1 (diff)
Always expose IGT subtests for known kernel selftests
Even when the running kernel does not support selftests, make subtest enumeration list known kselftests. The list is generated using selftest listing headers copied from the kernel. If the running kernel gains new selftest subtests, they are listed even without copying the headers over and rebuilding IGT. v2: Use correct names for the testcases Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests/drm_mm.c')
-rw-r--r--tests/drm_mm.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/drm_mm.c b/tests/drm_mm.c
index 2052b115..2a3212e8 100644
--- a/tests/drm_mm.c
+++ b/tests/drm_mm.c
@@ -28,5 +28,20 @@ IGT_TEST_DESCRIPTION("Basic sanity check of DRM's range manager (struct drm_mm)"
igt_main
{
- igt_kselftests("test-drm_mm", NULL, NULL, NULL);
+ /*
+ * Set of subtest names that are always exposed by IGT,
+ * regardless of the running kernel's capabilities. Selftests
+ * that the kernel has but are not on these lists are also
+ * exposed. This is a known intentional violation of the
+ * general rule that subtest enumeration must not change
+ * depending on the runtime environment.
+ */
+ struct igt_kselftest_mockentry drm_mm_testlist[] = {
+#define selftest(n, x) { .name = #n, .do_mock = true },
+#include "drm_mm_selftests.h"
+#undef selftest
+ { NULL, false }
+ };
+
+ igt_kselftests("test-drm_mm", NULL, NULL, NULL, drm_mm_testlist);
}