]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/glob: convert selftest to KUnit
authorKir Chou <note351@hotmail.com>
Thu, 8 Jan 2026 12:07:53 +0000 (21:07 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 27 Jan 2026 03:07:13 +0000 (19:07 -0800)
commitbf45794244ca1fb1c135754f36ff765eea01f9e6
tree3e509b0358733e522e30d8a3808682ab00da9871
parent105ddfb2d2b3acec7a7d9695463df48733d91e6c
lib/glob: convert selftest to KUnit

This patch converts the existing glob selftest (lib/globtest.c) to use the
KUnit framework (lib/tests/glob_kunit.c).

The new test:

- Migrates all 64 test cases from the original test to the KUnit suite.
- Removes the custom 'verbose' module parameter as KUnit handles logging.
- Updates Kconfig.debug and Makefile to support the new KUnit test.
- Updates Kconfig and Makefile to remove the original selftest.
- Updates GLOB_SELFTEST to GLOB_KUNIT_TEST for arch/m68k/configs.

This commit is verified by `./tools/testing/kunit/kunit.py run'
with the .kunit/.kunitconfig:

CONFIG_KUNIT=y
CONFIG_GLOB_KUNIT_TEST=y

Link: https://lkml.kernel.org/r/20260108120753.27339-1-note351@hotmail.com
Signed-off-by: Kir Chou <note351@hotmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: <kirchou@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
18 files changed:
arch/m68k/configs/amiga_defconfig
arch/m68k/configs/apollo_defconfig
arch/m68k/configs/atari_defconfig
arch/m68k/configs/bvme6000_defconfig
arch/m68k/configs/hp300_defconfig
arch/m68k/configs/mac_defconfig
arch/m68k/configs/multi_defconfig
arch/m68k/configs/mvme147_defconfig
arch/m68k/configs/mvme16x_defconfig
arch/m68k/configs/q40_defconfig
arch/m68k/configs/sun3_defconfig
arch/m68k/configs/sun3x_defconfig
lib/Kconfig
lib/Kconfig.debug
lib/Makefile
lib/globtest.c [deleted file]
lib/tests/Makefile
lib/tests/glob_kunit.c [new file with mode: 0644]