]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/tests: Move shrink test out of xe_bo
authorNirmoy Das <nirmoy.das@intel.com>
Wed, 18 Dec 2024 14:14:47 +0000 (15:14 +0100)
committerNirmoy Das <nirmoy.das@intel.com>
Thu, 19 Dec 2024 12:51:46 +0000 (13:51 +0100)
The subtest typically has an execution time long enough to motivate a
separate test so that it can be easily excluded if needed.

v2: reword commit message(Thomas)

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241218141447.2528530-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/tests/xe_bo.c
drivers/gpu/drm/xe/tests/xe_live_test_mod.c

index c9ec7a313c6bb445ce91437a1f20201b00d0c913..405ff904153ef60679ee3442c35753d802880b84 100644 (file)
@@ -606,8 +606,6 @@ static void xe_bo_shrink_kunit(struct kunit *test)
 static struct kunit_case xe_bo_tests[] = {
        KUNIT_CASE_PARAM(xe_ccs_migrate_kunit, xe_pci_live_device_gen_param),
        KUNIT_CASE_PARAM(xe_bo_evict_kunit, xe_pci_live_device_gen_param),
-       KUNIT_CASE_PARAM_ATTR(xe_bo_shrink_kunit, xe_pci_live_device_gen_param,
-                             {.speed = KUNIT_SPEED_SLOW}),
        {}
 };
 
@@ -618,3 +616,17 @@ struct kunit_suite xe_bo_test_suite = {
        .init = xe_kunit_helper_xe_device_live_test_init,
 };
 EXPORT_SYMBOL_IF_KUNIT(xe_bo_test_suite);
+
+static struct kunit_case xe_bo_shrink_test[] = {
+       KUNIT_CASE_PARAM_ATTR(xe_bo_shrink_kunit, xe_pci_live_device_gen_param,
+                             {.speed = KUNIT_SPEED_SLOW}),
+       {}
+};
+
+VISIBLE_IF_KUNIT
+struct kunit_suite xe_bo_shrink_test_suite = {
+       .name = "xe_bo_shrink",
+       .test_cases = xe_bo_shrink_test,
+       .init = xe_kunit_helper_xe_device_live_test_init,
+};
+EXPORT_SYMBOL_IF_KUNIT(xe_bo_shrink_test_suite);
index 0d36ab864ec02a0c507ff8183c42175c1da824be..81277c77016d222cc5ca170c73e1c5e895030c2a 100644 (file)
@@ -6,11 +6,13 @@
 #include <kunit/test.h>
 
 extern struct kunit_suite xe_bo_test_suite;
+extern struct kunit_suite xe_bo_shrink_test_suite;
 extern struct kunit_suite xe_dma_buf_test_suite;
 extern struct kunit_suite xe_migrate_test_suite;
 extern struct kunit_suite xe_mocs_test_suite;
 
 kunit_test_suite(xe_bo_test_suite);
+kunit_test_suite(xe_bo_shrink_test_suite);
 kunit_test_suite(xe_dma_buf_test_suite);
 kunit_test_suite(xe_migrate_test_suite);
 kunit_test_suite(xe_mocs_test_suite);