* [PATCH] lib/tests: util_macros: Drop the '.' from the KUnit suite name
@ 2026-10-12 22:55 Mark
0 siblings, 0 replies; only message in thread
From: Mark @ 2026-10-12 22:55 UTC (permalink / raw)
To: Brendan Higgins, David Gow, Rae Moar, linux-kselftest, kunit-dev
Cc: linux-kernel, Mark Brown
The util_macros KUnit suite is named "util_macros.h". KUnit test names
are formed as "<suite>.<test>" and a '.' in the suite name makes them
ambiguous, which breaks every consumer that splits on it:
- kunit.filter_glob= splits on the first '.', so
kunit.filter_glob=util_macros.h is parsed as suite "util_macros" with
test glob "h" and matches nothing.
- kunit.py's --list_tests output parser only accepts "<suite>.<test>"
names with a single '.', so the suite's tests are dropped from the
list and the suite name line "util_macros.h" is mistaken for a test
called "h" in suite "util_macros".
- As a result kunit.py --run_isolated=suite boots a kernel with
kunit.filter_glob=util_macros, which runs nothing and reports an
error, while the suite's actual tests are never run.
Rename the suite to "util_macros" to match the other lib/tests suites.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
Cc: linux-kernel@vger.kernel.org
To: Brendan Higgins <brendan.higgins@linux.dev>
To: David Gow <david@davidgow.net>
To: Rae Moar <raemoar63@gmail.com>
To: linux-kselftest@vger.kernel.org
To: kunit-dev@googlegroups.com
---
lib/tests/util_macros_kunit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tests/util_macros_kunit.c b/lib/tests/util_macros_kunit.c
index 94cc9f0de50a..73652a6872c3 100644
--- a/lib/tests/util_macros_kunit.c
+++ b/lib/tests/util_macros_kunit.c
@@ -229,7 +229,7 @@ static struct kunit_case __refdata util_macros_test_cases[] = {
};
static struct kunit_suite util_macros_test_suite = {
- .name = "util_macros.h",
+ .name = "util_macros",
.test_cases = util_macros_test_cases,
};
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
change-id: 20261012-kunit-util-macros-name-7f490d9f0ffd
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-12 22:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-12 22:55 [PATCH] lib/tests: util_macros: Drop the '.' from the KUnit suite name Mark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®