Skip to contentSkip to conversation

live test renames

PATCH In review Lucas De Marchi 3 participants 12 messages Feb 2, 2024 – Feb 7, 2024 Library code

lore
Share & tools
lore
#0 lore raw

cover live test renames

First patch ca be ignored, it's the entire series being reviewed
at https://lore.kernel.org/igt-dev/[email protected]/
It's brought in here as a dependency.

This also has a kernel dependency:
https://lore.kernel.org/intel-xe/[email protected]/
I will send that again as it doesn't apply anymore.

Tested in LNL with the corresponding change in the kernel:

	$ sudo ./build/tests/xe_live_ktest --r xe_mocs
	IGT-Version: 1.28-g3f8041700 (x86_64) (Linux: 6.8.0-rc1-xe+ x86_64)
	Using IGT_SRANDOM=1706833679 for randomisation
	Starting subtest: xe_mocs
	Starting dynamic subtest: xe_live_mocs_kernel_kunit
	Dynamic subtest xe_live_mocs_kernel_kunit: SUCCESS (3.304s)
	Starting dynamic subtest: xe_live_mocs_reset_kunit
	Dynamic subtest xe_live_mocs_reset_kunit: SUCCESS (0.102s)
	Subtest xe_mocs: SUCCESS (3.484s)

For me it runs much slower than my manual execution (just modprobe'ing xe_live_test... about 4x). I thought it was because it was still loading/removing kunit or something like that, but it's not:

# cat /sys/kernel/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 4/4   #P:8
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
   xe_live_ktest-9987    [002] .....  7410.386983: module_load: xe_live_test 
   xe_live_ktest-9987    [002] .....  7410.387378: module_free: xe_live_test
   xe_live_ktest-9990    [003] .....  7413.865052: module_load: xe_live_test 
   xe_live_ktest-9987    [000] .....  7413.866504: module_free: xe_live_test

Yes, it loads xe_live_test twice (one for list, one for execution). Looking at dmesg, at least on my machine it's triggering timeouts in the GPU scheduler, what doesn't happen with the manual execution.

Janusz: do we really need to list subtests? Why not simply pass the subtest as filter_glob? Most of the time I believe we are not really filtering by a regex. At least the testlists are not.

Janusz Krzysztofik (1):
squashed [email protected]

Lucas De Marchi (1):
xe_live_ktest: Use xe_live_test kernel module

 lib/igt_kmod.c                           | 115 ++++++++++++++++-------
 tests/intel-ci/xe-fast-feedback.testlist |   6 +-
 tests/intel/xe_live_ktest.c              |  25 ++---
 3 files changed, 92 insertions(+), 54 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 squashed [email protected]

From: Janusz Krzysztofik <[email protected]>

DO NOT MERGE

---
 lib/igt_kmod.c | 115 +++++++++++++++++++++++++++++++++----------------
 1 file changed, 79 insertions(+), 36 deletions(-)
lib/igt_kmod.c +79 -36
index 250ab2107..3163434aa 100644
@@ -803,6 +803,57 @@ void igt_kselftest_get_tests(struct kmod_module *kmod,
 	kmod_module_info_free_list(pre);
 }
 
+static int open_parameters(const char *module_name)
+{
+	char path[256];
+
+	snprintf(path, sizeof(path), "/sys/module/%s/parameters", module_name);
+	return open(path, O_RDONLY);
+}
+
+static bool kunit_set_filtering(const char *filter_glob, const char *filter,
+				const char *filter_action)
+{
+	int params;
+	bool ret;
+
+	params = open_parameters("kunit");
+	ret = !igt_debug_on(params < 0);
+
+	/*
+	 * Default values of the KUnit base module filtering parameters
+	 * are all NULLs.  Reapplying those NULLs over sysfs once
+	 * overwritten with non-NULL strings seems not possible.
+	 * As a workaround, we use human-readable strings that exhibit
+	 * the same behaviour as if default NULLs were in place.
+	 */
+	if (ret)
+		ret = !igt_debug_on(!igt_sysfs_set(params, "filter_glob",
+						   filter_glob ?: "*"));
+	if (ret)
+		ret = !igt_debug_on(!igt_sysfs_set(params, "filter",
+						   filter ?: "module!=none"));
+	/*
+	 * In case of filter_action parameter there is no obvious human-
+	 * readable string that behaves like default NULL.  However, if NULL
+	 * is requested for both filter and filter_action then that's not a
+	 * problem for us since even if filter_action was previously set to
+	 * "skip" we can leave it as is because our "module!=none" default
+	 * filter guarantees that no test cases are filtered out to be skipped.
+	 */
+	if (ret)
+		ret = !igt_warn_on_f(!filter_action && filter,
+				     "test error: filter_action=NULL requires filter=NULL\n");
+	if (ret && filter_action)
+		ret = !igt_debug_on(!igt_sysfs_set(params, "filter_action",
+						   filter_action));
+
+	if (params >= 0)
+		close(params);
+
+	return ret;
+}
+
 struct modprobe_data {
 	struct kmod_module *kmod;
 	const char *opts;
@@ -1095,6 +1146,7 @@ static void kunit_get_tests(struct igt_list_head *tests,
 	char *suite_name = NULL, *case_name = NULL;
 	struct igt_ktap_result *r, *rn;
 	struct igt_ktap_results *ktap;
+	unsigned long taints;
 	int flags, err;
 
 	igt_skip_on_f(tst->kmsg < 0, "Could not open /dev/kmsg\n");
@@ -1108,25 +1160,29 @@ static void kunit_get_tests(struct igt_list_head *tests,
 	/*
 	 * To get a list of test cases provided by a kunit test module, ask the
 	 * generic kunit module to respond with SKIP result for each test found.
-	 * We could also use action=list kunit parameter to get the listing,
-	 * however, parsing a KTAP report -- something that we already can do
-	 * perfectly -- seems to be more safe than extracting a test case list
-	 * of unknown length from /dev/kmsg.
-	 *
-	 * TODO: drop the following workaround, which is required by LTS kernel
-	 *       v6.1 not capable of listing test cases when built as a module.
-	 * If loading the kunit module with required parameters fails then
-	 * assume that we are running on a kernel with missing test case listing
-	 * capabilities.  Dont's skip but just return with empty list of test
-	 * cases, that should tell the caller to use a legacy method of
-	 * iterating over KTAP results collected from blind execution of all
-	 * Kunit test cases provided by a Kunit test module.
+	 * We could also try to use action=list kunit parameter to get the
+	 * listing, however, parsing a structured KTAP report -- something that
+	 * we already can do perfectly -- seems to be more safe than extracting
+	 * a free text list of unknown length from /dev/kmsg.
 	 */
-	if (igt_debug_on(igt_kmod_load("kunit",
-				       "filter=module=none filter_action=skip")))
+	if (igt_debug_on(!kunit_set_filtering(NULL, "module=none", "skip"))) {
+		/*
+		 * TODO: drop the following workaround, required by LTS kernel
+		 *       v6.1 not capable of listing test cases when built as as
+		 *       module, when no longer needed.
+		 * If updating writable filter parameters of the kunit base
+		 * module with required values fails then assume we are running
+		 * on a kernel with missing test case listing capabilities.
+		 * Don't skip but just return with empty list of test cases,
+		 * which should tell the caller to use a legacy method of
+		 * iterating over KTAP results collected from blind execution
+		 * of all Kunit test cases provided by a Kunit test module.
+		 */
 		return;
+	}
 
 	igt_skip_on(modprobe(tst->kmod, opts));
+	igt_skip_on(igt_kernel_tainted(&taints));
 
 	ktap = igt_ktap_alloc(tests);
 	igt_require(ktap);
@@ -1158,11 +1214,11 @@ static void kunit_get_tests(struct igt_list_head *tests,
 		free(case_name);
 	}
 
-	igt_skip_on(kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE));
-	igt_skip_on(igt_kmod_unload("kunit", KMOD_REMOVE_FORCE));
-
 	igt_skip_on_f(err,
 		      "KTAP parser failed while getting a list of test cases\n");
+	igt_skip_on(igt_list_empty(tests));
+
+	igt_skip_on(kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE));
 }
 
 static void __igt_kunit(struct igt_ktest *tst,
@@ -1191,6 +1247,8 @@ static void __igt_kunit(struct igt_ktest *tst,
 			      t->case_name) {
 
 			if (!modprobe.thread) {
+				igt_require(kunit_set_filtering(NULL, NULL, NULL));
+
 				igt_assert_eq(pthread_mutexattr_init(&attr), 0);
 				igt_assert_eq(pthread_mutexattr_setrobust(&attr,
 							  PTHREAD_MUTEX_ROBUST),
@@ -1355,18 +1413,12 @@ void igt_kunit(const char *module_name, const char *name, const char *opts)
 		igt_skip_on(igt_ktest_init(&tst, module_name));
 		igt_skip_on(igt_ktest_begin(&tst));
 
-		/*
-		 * Since we need to load kunit base module with specific
-		 * options in order to get a list of test cases, make
-		 * sure that the module is not loaded.  However, since
-		 * unload may fail if kunit base module is not loaded,
-		 * ignore any failures, we'll fail later if still loaded.
-		 */
-		igt_ignore_warn(igt_kmod_unload("kunit", KMOD_REMOVE_FORCE));
-
 		igt_assert(igt_list_empty(&tests));
 	}
 
+	/* We need the base KUnit module loaded if not built-in */
+	igt_ignore_warn(igt_kmod_load("kunit", NULL));
+
 	/*
 	 * We need to use igt_subtest here, as otherwise it may crash with:
 	 *  skipping is allowed only in fixtures, subtests or igt_simple_main
@@ -1395,20 +1447,11 @@ void igt_kunit(const char *module_name, const char *name, const char *opts)
 		kunit_results_free(&tests, &suite_name, &case_name);
 
 		igt_ktest_end(&tst);
-		igt_debug_on(igt_kmod_unload("kunit", KMOD_REMOVE_FORCE));
 	}
 
 	igt_ktest_fini(&tst);
 }
 
-static int open_parameters(const char *module_name)
-{
-	char path[256];
-
-	snprintf(path, sizeof(path), "/sys/module/%s/parameters", module_name);
-	return open(path, O_RDONLY);
-}
-
 int igt_ktest_init(struct igt_ktest *tst,
 		   const char *module_name)
 {
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/2 xe_live_ktest: Use xe_live_test kernel module

In reply to Lucas De Marchi

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

---
 tests/intel-ci/xe-fast-feedback.testlist |  6 +++---
 tests/intel/xe_live_ktest.c              | 25 ++++++++++--------------
 2 files changed, 13 insertions(+), 18 deletions(-)
tests/intel-ci/xe-fast-feedback.testlist +3 -3
index f297fe965..797a78563 100644
@@ -227,9 +227,9 @@ igt@kms_psr@psr-sprite-plane-onoff
 igt@core_hotunplug@unbind-rebind
 
 # Run KUnit tests at the end
-igt@xe_live_ktest@bo
-igt@xe_live_ktest@dmabuf
-igt@xe_live_ktest@migrate
+igt@xe_live_ktest@xe_bo
+igt@xe_live_ktest@xe_dmabuf
+igt@xe_live_ktest@xe_migrate
 
 # Move fault_mode tests at the end to unblock execution
 igt@xe_exec_fault_mode@twice-basic
tests/intel/xe_live_ktest.c +10 -15
index 5f5f1dff7..d65378858 100644
@@ -9,38 +9,33 @@
  * Functionality: kunit
  * Test category: functionality test
  *
- * SUBTEST: bo
+ * SUBTEST: xe_bo
  * Description:
  *	Kernel dynamic selftests to check if GPU buffer objects are
  *	being handled properly.
  * Functionality: bo
  *
- * SUBTEST: dmabuf
+ * SUBTEST: xe_dmabuf
  * Description: Kernel dynamic selftests for dmabuf functionality.
  * Functionality: dmabuf
  *
- * SUBTEST: migrate
+ * SUBTEST: xe_migrate
  * Description:
  *	Kernel dynamic selftests to check if page table migrations
  *	are working properly.
  * Functionality: migrate
  *
- * SUBTEST: mocs
+ * SUBTEST: xe_mocs
  * Description:
  *	Kernel dynamic selftests to check mocs configuration.
  * Functionality: mocs
  */
 
-struct kunit_tests {
-	const char *kunit;
-	const char *name;
-};
-
-static const struct kunit_tests live_tests[] = {
-	{ "xe_bo_test",		"bo" },
-	{ "xe_dma_buf_test",	"dmabuf" },
-	{ "xe_migrate_test",	"migrate" },
-	{ "xe_mocs_test",	"mocs" },
+static const char *live_tests[] = {
+	"xe_bo",
+	"xe_dmabuf",
+	"xe_migrate",
+	"xe_mocs"
 };
 
 igt_main
@@ -48,5 +43,5 @@ igt_main
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(live_tests); i++)
-		igt_kunit(live_tests[i].kunit, live_tests[i].name, NULL);
+		igt_kunit("xe_live_test", live_tests[i], NULL);
 }
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

Both the KUnit module name and the IGT test name clearly indicate they are strictly related to Xe. Then, I think that shorter subtest names, without the xe_ prefix, are better in that narrow name space. Couldn't we then rename test suits on the kernel side instead of adding that redundant prefix also to IGT subtest names?

Thanks,
Janusz

Quoted 84 lines
---
 tests/intel-ci/xe-fast-feedback.testlist |  6 +++---
 tests/intel/xe_live_ktest.c              | 25 ++++++++++--------------
 2 files changed, 13 insertions(+), 18 deletions(-)
tests/intel-ci/xe-fast-feedback.testlist +3 -3
index f297fe965..797a78563 100644
@@ -227,9 +227,9 @@ igt@kms_psr@psr-sprite-plane-onoff
 igt@core_hotunplug@unbind-rebind
 
 # Run KUnit tests at the end
-igt@xe_live_ktest@bo
-igt@xe_live_ktest@dmabuf
-igt@xe_live_ktest@migrate
+igt@xe_live_ktest@xe_bo
+igt@xe_live_ktest@xe_dmabuf
+igt@xe_live_ktest@xe_migrate
 
 # Move fault_mode tests at the end to unblock execution
 igt@xe_exec_fault_mode@twice-basic
tests/intel/xe_live_ktest.c +10 -15
index 5f5f1dff7..d65378858 100644
@@ -9,38 +9,33 @@
  * Functionality: kunit
  * Test category: functionality test
  *
- * SUBTEST: bo
+ * SUBTEST: xe_bo
  * Description:
  *	Kernel dynamic selftests to check if GPU buffer objects are
  *	being handled properly.
  * Functionality: bo
  *
- * SUBTEST: dmabuf
+ * SUBTEST: xe_dmabuf
  * Description: Kernel dynamic selftests for dmabuf functionality.
  * Functionality: dmabuf
  *
- * SUBTEST: migrate
+ * SUBTEST: xe_migrate
  * Description:
  *	Kernel dynamic selftests to check if page table migrations
  *	are working properly.
  * Functionality: migrate
  *
- * SUBTEST: mocs
+ * SUBTEST: xe_mocs
  * Description:
  *	Kernel dynamic selftests to check mocs configuration.
  * Functionality: mocs
  */
 
-struct kunit_tests {
-	const char *kunit;
-	const char *name;
-};
-
-static const struct kunit_tests live_tests[] = {
-	{ "xe_bo_test",		"bo" },
-	{ "xe_dma_buf_test",	"dmabuf" },
-	{ "xe_migrate_test",	"migrate" },
-	{ "xe_mocs_test",	"mocs" },
+static const char *live_tests[] = {
+	"xe_bo",
+	"xe_dmabuf",
+	"xe_migrate",
+	"xe_mocs"
 };
 
 igt_main
@@ -48,5 +43,5 @@ igt_main
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(live_tests); i++)
-		igt_kunit(live_tests[i].kunit, live_tests[i].name, NULL);
+		igt_kunit("xe_live_test", live_tests[i], NULL);
 }
#4 lore raw

Re: Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 9 lines · Janusz Krzysztofik
Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

Both the KUnit module name and the IGT test name clearly indicate they are

kunit is usable without igt and I'd like to continue it like that, so what remains is the kunit module name. But then that would imply using both filter and filter_glob rather than simply using just filter_glob.

Quoted 4 lines

strictly related to Xe. Then, I think that shorter subtest names, without the xe_ prefix, are better in that narrow name space. Couldn't we then rename test suits on the kernel side instead of adding that redundant prefix also to IGT subtest names?

I don't think it's a good alternative because the test suite names are global, regardless what module it comes from. For all the live tests, they were always prefixed with xe_. We do have some normal kunit without prefix, but I´d rather add the prefix there than remove here.

Lucas De Marchi

#5 lore raw

Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 6 lines · On Friday, 2 February 2024 16:25:56 CET Lucas De Marchi wrote:
Quoted 5 lines · Janusz Krzysztofik
Quoted 4 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

Both the KUnit module name and the IGT test name clearly indicate they are

kunit is usable without igt and I'd like to continue it like that, so

I didn't say there was something wrong with that.

Quoted 10 lines

what remains is the kunit module name. But then that would imply using both filter and filter_glob rather than simply using just filter_glob.

Quoted 4 lines

strictly related to Xe. Then, I think that shorter subtest names, without the xe_ prefix, are better in that narrow name space. Couldn't we then rename test suits on the kernel side instead of adding that redundant prefix also to IGT subtest names?

I don't think it's a good alternative because the test suite names are global, regardless what module it comes from. For all the live tests,

You're right, our xe test suites names are in line with KUnit style recommendations.

Thanks,
Janusz

Quoted 5 lines

they were always prefixed with xe_. We do have some normal kunit without prefix, but I´d rather add the prefix there than remove here.

Lucas De Marchi

#6 lore raw

Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

In reply to Lucas De Marchi
Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

There was some discussion on this patch on today's XE IGT status meeting, and the conclusion was: can we have these split into two patches, one for subtest renaming, and one for switching to single module?

Thanks,
Janusz

Quoted 84 lines
---
 tests/intel-ci/xe-fast-feedback.testlist |  6 +++---
 tests/intel/xe_live_ktest.c              | 25 ++++++++++--------------
 2 files changed, 13 insertions(+), 18 deletions(-)
tests/intel-ci/xe-fast-feedback.testlist +3 -3
index f297fe965..797a78563 100644
@@ -227,9 +227,9 @@ igt@kms_psr@psr-sprite-plane-onoff
 igt@core_hotunplug@unbind-rebind
 
 # Run KUnit tests at the end
-igt@xe_live_ktest@bo
-igt@xe_live_ktest@dmabuf
-igt@xe_live_ktest@migrate
+igt@xe_live_ktest@xe_bo
+igt@xe_live_ktest@xe_dmabuf
+igt@xe_live_ktest@xe_migrate
 
 # Move fault_mode tests at the end to unblock execution
 igt@xe_exec_fault_mode@twice-basic
tests/intel/xe_live_ktest.c +10 -15
index 5f5f1dff7..d65378858 100644
@@ -9,38 +9,33 @@
  * Functionality: kunit
  * Test category: functionality test
  *
- * SUBTEST: bo
+ * SUBTEST: xe_bo
  * Description:
  *	Kernel dynamic selftests to check if GPU buffer objects are
  *	being handled properly.
  * Functionality: bo
  *
- * SUBTEST: dmabuf
+ * SUBTEST: xe_dmabuf
  * Description: Kernel dynamic selftests for dmabuf functionality.
  * Functionality: dmabuf
  *
- * SUBTEST: migrate
+ * SUBTEST: xe_migrate
  * Description:
  *	Kernel dynamic selftests to check if page table migrations
  *	are working properly.
  * Functionality: migrate
  *
- * SUBTEST: mocs
+ * SUBTEST: xe_mocs
  * Description:
  *	Kernel dynamic selftests to check mocs configuration.
  * Functionality: mocs
  */
 
-struct kunit_tests {
-	const char *kunit;
-	const char *name;
-};
-
-static const struct kunit_tests live_tests[] = {
-	{ "xe_bo_test",		"bo" },
-	{ "xe_dma_buf_test",	"dmabuf" },
-	{ "xe_migrate_test",	"migrate" },
-	{ "xe_mocs_test",	"mocs" },
+static const char *live_tests[] = {
+	"xe_bo",
+	"xe_dmabuf",
+	"xe_migrate",
+	"xe_mocs"
 };
 
 igt_main
@@ -48,5 +43,5 @@ igt_main
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(live_tests); i++)
-		igt_kunit(live_tests[i].kunit, live_tests[i].name, NULL);
+		igt_kunit("xe_live_test", live_tests[i], NULL);
 }
#7 lore raw

Re: Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 11 lines · Janusz Krzysztofik
Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

There was some discussion on this patch on today's XE IGT status meeting, and the conclusion was: can we have these split into two patches, one for subtest renaming, and one for switching to single module?

that would break the test. Wouldn't it make more sense to squash the
subtest rename in your series since it's changing the logic
for filtering (https://lore.kernel.org/igt-dev/[email protected]/)

If we squash the subtest renaming there and leave the module rename here, then we don't break anything (although this part here needs to land with the kernel side too).

Lucas De Marchi

#8 lore raw

Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 10 lines · On Wednesday, 7 February 2024 18:26:53 CET Lucas De Marchi wrote:
Quoted 9 lines · Janusz Krzysztofik
Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

There was some discussion on this patch on today's XE IGT status meeting,

and

Quoted 1 line
Quoted 1 line

the conclusion was: can we have these split into two patches, one for

subtest

Quoted 5 lines
Quoted 1 line

renaming, and one for switching to single module?

that would break the test. Wouldn't it make more sense to squash the
subtest rename in your series since it's changing the logic
for filtering (https://lore.kernel.org/igt-dev/[email protected]/)

The rename part can be applied immediately, I believe. Looking at current CI results we can see 2 cases:

1. If the test successfully (re)loads the KUnit base module in list only mode (e.g. after xe and its dependencies, including kunit, were unloaded by a preceding test) and that is followed by successful load of a xe kunit test module then the test is no longer able to reload the base kunit module in exec mode and skips. Renaming the subtests won't change that.

2. If the test finds the xe module and its dependencies, including kunit, already loaded then it can't reload the kunit module in list mode and falls back to the legacy processing path. That path works, i.e., returns results from test cases as results from IGT dynamic sub-subtests, even if subtest name doesn't match suite name.

Then, renaming subtests even before my series is finally accepted and applied won't break anything.

Thanks,
Janusz

Quoted 7 lines

If we squash the subtest renaming there and leave the module rename here, then we don't break anything (although this part here needs to land with the kernel side too).

Lucas De Marchi

#9 lore raw

Re: Re: [PATCH i-g-t 2/2] xe_live_ktest: Use xe_live_test kernel module

Quoted 29 lines · Janusz Krzysztofik
Quoted 10 lines · On Wednesday, 7 February 2024 18:26:53 CET Lucas De Marchi wrote:
Quoted 9 lines · Janusz Krzysztofik
Quoted 6 lines · On Friday, 2 February 2024 01:45:29 CET Lucas De Marchi wrote:

https://patchwork.freedesktop.org/series/126786/ groups all the live tests into a single kernel module. Use that module to run any of the tests triggered by igt.

To make the live kunit tests work, rename the subtests so they match what the kernel uses.

There was some discussion on this patch on today's XE IGT status meeting,

and

Quoted 1 line
Quoted 1 line

the conclusion was: can we have these split into two patches, one for

subtest

Quoted 5 lines
Quoted 1 line

renaming, and one for switching to single module?

that would break the test. Wouldn't it make more sense to squash the
subtest rename in your series since it's changing the logic
for filtering (https://lore.kernel.org/igt-dev/[email protected]/)

The rename part can be applied immediately, I believe. Looking at current CI results we can see 2 cases:

1. If the test successfully (re)loads the KUnit base module in list only mode (e.g. after xe and its dependencies, including kunit, were unloaded by a preceding test) and that is followed by successful load of a xe kunit test module then the test is no longer able to reload the base kunit module in exec mode and skips. Renaming the subtests won't change that.

Quoted 8 lines

2. If the test finds the xe module and its dependencies, including kunit, already loaded then it can't reload the kunit module in list mode and falls back to the legacy processing path. That path works, i.e., returns results from test cases as results from IGT dynamic sub-subtests, even if subtest name doesn't match suite name.

Then, renaming subtests even before my series is finally accepted and applied won't break anything.

ok, let me spin it with the rename only then.

thanks
Lucas De Marchi

Quoted 15 lines

Thanks,
Janusz

Quoted 7 lines

If we squash the subtest renaming there and leave the module rename here, then we don't break anything (although this part here needs to land with the kernel side too).

Lucas De Marchi

#10 lore raw

✓ CI.xeBAT: success for live test renames

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: live test renames
URL : https://patchwork.freedesktop.org/series/129449/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7701_BAT -> XEIGTPW_10631_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (4 -> 4)
------------------------------

No changes in participating hosts

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in XEIGTPW_10631_BAT:

### IGT changes ###

#### Possible regressions ####

* {igt@xe_live_ktest@xe_dmabuf} (NEW):
- bat-pvc-2: NOTRUN -> [SKIP][1] +2 other tests skip
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/bat-pvc-2/igt@xe_live_ktest@xe_dmabuf.html
- bat-dg2-oem2: NOTRUN -> [SKIP][2] +2 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/bat-dg2-oem2/igt@xe_live_ktest@xe_dmabuf.html
- bat-atsm-2: NOTRUN -> [SKIP][3] +2 other tests skip
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/bat-atsm-2/igt@xe_live_ktest@xe_dmabuf.html

* {igt@xe_live_ktest@xe_migrate} (NEW):
- bat-adlp-7: NOTRUN -> [SKIP][4] +2 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/bat-adlp-7/igt@xe_live_ktest@xe_migrate.html

New tests
---------

New tests have been introduced between XEIGT_7701_BAT and XEIGTPW_10631_BAT:

### New IGT tests (3) ###

* igt@xe_live_ktest@xe_bo:
- Statuses : 4 skip(s)
- Exec time: [0.0, 0.00] s

* igt@xe_live_ktest@xe_dmabuf:
- Statuses : 4 skip(s)
- Exec time: [0.0, 0.00] s

* igt@xe_live_ktest@xe_migrate:
- Statuses : 4 skip(s)
- Exec time: [0.0, 0.00] s

Known issues
------------

Here are the changes found in XEIGTPW_10631_BAT that come from known issues:

### IGT changes ###

#### Warnings ####

* igt@xe_exec_fault_mode@twice-basic:
- bat-atsm-2: [SKIP][5] ([Intel XE#1130]) -> [SKIP][6] ([Intel XE#288])
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7701/bat-atsm-2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/bat-atsm-2/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[Intel XE#1130]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1130
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288

Build changes
-------------

* IGT: IGT_7701 -> IGTPW_10631
* Linux: xe-715-3e58a4940c44430f20cad20ead5e1b77ed209cde -> xe-716-18a9fefd9e05291cbe792d358bbdc04dc6d21adb

IGTPW_10631: 10631
IGT_7701: 7701
xe-715-3e58a4940c44430f20cad20ead5e1b77ed209cde: 3e58a4940c44430f20cad20ead5e1b77ed209cde xe-716-18a9fefd9e05291cbe792d358bbdc04dc6d21adb: 18a9fefd9e05291cbe792d358bbdc04dc6d21adb

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10631/index.html

#11 lore raw

✗ Fi.CI.BAT: failure for live test renames

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: live test renames
URL : https://patchwork.freedesktop.org/series/129449/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14210 -> IGTPW_10631
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_10631 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10631, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10631/index.html

Participating hosts (39 -> 36)
------------------------------

Missing (3): bat-adlm-1 fi-snb-2520m fi-pnv-d510

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_10631:

### IGT changes ###

#### Possible regressions ####

* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-1:
- bat-dg2-8: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14210/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10631/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@debugfs_test@basic-hwmon:
- {bat-arls-2}: [SKIP][3] ([i915#9318]) -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14210/bat-arls-2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10631/bat-arls-2/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_10631 that come from known issues:

### IGT changes ###

#### Possible fixes ####

* igt@i915_selftest@live@hangcheck:
- bat-adlp-9: [ABORT][5] ([i915#10021]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14210/bat-adlp-9/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10631/bat-adlp-9/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7701 -> IGTPW_10631

CI-20190529: 20190529
CI_DRM_14210: 18a9fefd9e05291cbe792d358bbdc04dc6d21adb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10631: 10631
IGT_7701: 7701

Testlist changes
----------------

+igt@xe_live_ktest@xe_bo
+igt@xe_live_ktest@xe_dmabuf
+igt@xe_live_ktest@xe_migrate
+igt@xe_live_ktest@xe_mocs
-igt@xe_ccs@block-copy-compressed-inc-dimension
-igt@xe_ccs@block-copy-uncompressed-inc-dimension
-igt@xe_exercise_blt@fast-copy-inc-dimension
-igt@xe_live_ktest@bo
-igt@xe_live_ktest@dmabuf
-igt@xe_live_ktest@migrate
-igt@xe_live_ktest@mocs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10631/index.html