drm/xe: Group normal kunit tests in a single module
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 22 Nov 2023 20:31:46 +0000 (12:31 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 16 Jan 2024 17:53:27 +0000 (09:53 -0800)
Creating one module for each compilation unit to be tested seems
excessive as the number of tests increase. Group them all in a single
kunit test module called xe_test.ko.

The tests requiring the physical device, aka "live" tests, are still
kept in separate modules since they are normally triggered via igt,
and not via kunit.py. After igt is converted, those can be merged in
a single module as well.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231122203147.988021-2-lucas.demarchi@intel.com
drivers/gpu/drm/xe/tests/Makefile
drivers/gpu/drm/xe/tests/xe_pci_test.c
drivers/gpu/drm/xe/tests/xe_rtp_test.c
drivers/gpu/drm/xe/tests/xe_test_mod.c [new file with mode: 0644]
drivers/gpu/drm/xe/tests/xe_wa_test.c

index 39d8a0892274ab9d0188e83b330cce0acc3e81ea..9d1d88af8b2fa5dace6f5a8ccb49e89268b29b81 100644 (file)
@@ -1,10 +1,15 @@
 # SPDX-License-Identifier: GPL-2.0
 
+# "live" kunit tests
 obj-$(CONFIG_DRM_XE_KUNIT_TEST) += \
        xe_bo_test.o \
        xe_dma_buf_test.o \
        xe_migrate_test.o \
-       xe_mocs_test.o \
+       xe_mocs_test.o
+
+# Normal kunit tests
+obj-$(CONFIG_DRM_XE_KUNIT_TEST) += xe_test.o
+xe_test-y = xe_test_mod.o \
        xe_pci_test.o \
        xe_rtp_test.o \
        xe_wa_test.o
index 171e4180f1aa923b198ea5dfbf92d7610d9120f5..a6705a536391d9f9543038c014d44c439d292cdd 100644 (file)
@@ -64,8 +64,3 @@ static struct kunit_suite xe_pci_test_suite = {
 };
 
 kunit_test_suite(xe_pci_test_suite);
-
-MODULE_AUTHOR("Intel Corporation");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("xe_pci kunit test");
-MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);
index 21e77026518b6e297ed80cd6a92d5a24b1b33fb2..06759d7547838f2d85a4d99647c30c46b1574b91 100644 (file)
@@ -311,8 +311,3 @@ static struct kunit_suite xe_rtp_test_suite = {
 };
 
 kunit_test_suite(xe_rtp_test_suite);
-
-MODULE_AUTHOR("Intel Corporation");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("xe_rtp kunit test");
-MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);
diff --git a/drivers/gpu/drm/xe/tests/xe_test_mod.c b/drivers/gpu/drm/xe/tests/xe_test_mod.c
new file mode 100644 (file)
index 0000000..875f3e6
--- /dev/null
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+#include <linux/module.h>
+
+MODULE_AUTHOR("Intel Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("xe kunit tests");
+MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);
index 5cfd5844c17b3db9de7c7972fb4e7a97637f448d..439477593fafe2528c4a2b681faa5d031dd3d341 100644 (file)
@@ -156,8 +156,3 @@ static struct kunit_suite xe_rtp_test_suite = {
 };
 
 kunit_test_suite(xe_rtp_test_suite);
-
-MODULE_AUTHOR("Intel Corporation");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("xe_wa kunit test");
-MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);