linux/tools/testing/selftests
Herton R. Krzesinski 92f3c5a005 lib/test_kmod: do not hardcode/depend on any filesystem
Right now test_kmod has hardcoded dependencies on btrfs/xfs.  That is not
optimal since you end up needing to select/build them, but it is not
really required since other fs could be selected for the testing.  Also,
we can't change the default/driver module used for testing on
initialization.

Thus make it more generic: introduce two module parameters (start_driver
and start_test_fs), which allow to select which modules/fs to use for the
testing on test_kmod initialization.  Then it's up to the user to select
which modules/fs to use for testing based on his config.  However, keep
test_module as required default.

This way, config/modules becomes selectable as when the testing is done
from selftests (userspace).

While at it, also change trigger_config_run_type, since at module
initialization we already set the defaults at __kmod_config_init and
should not need to do it again in test_kmod_init(), thus we can avoid to
again set test_driver/test_fs.

Link: https://lkml.kernel.org/r/20250418165047.702487-1-herton@redhat.com
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Reviewed-by: Luis Chambelrain <mcgrof@kernel.org>
Cc: Daniel Gomez <da.gomez@samsung.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Petr Pavlu <petr.pavlu@suse.com>
Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-05-11 17:54:09 -07:00
..
acct selftests: acct: Add ksft_exit_skip if not running as root 2025-01-14 17:06:31 -07:00
alsa selftests/alsa: Fix circular dependency involving global-timer 2024-12-20 10:00:41 +01:00
amd-pstate
arm64 CRC updates for 6.15 2025-03-25 18:33:04 -07:00
bpf selftests/bpf: Correct typo in __clang_major__ macro 2025-04-25 16:56:10 -07:00
breakpoints selftests: breakpoints: use remaining time to check if suspend succeed 2024-10-02 14:37:30 -06:00
cachestat selftests: cachestat: Fix build warnings on ppc64 2024-05-29 12:24:44 -06:00
capabilities selftests/capabilities: fix warn_unused_result build warnings 2024-05-08 16:48:25 -06:00
cgroup selftest/cgroup: Add a remote partition transition test to test_cpuset_prs.sh 2025-03-31 13:28:19 -10:00
clone3 selftests/pidfd: fixes syscall number defines 2025-03-25 14:59:05 +01:00
connector
core selftests: core: add unshare_test to gitignore 2024-09-30 11:42:11 -06:00
coredump selftests: coredump: Add stackdump test 2025-01-04 10:12:18 +01:00
cpu-hotplug
cpufreq selftests/cpufreq: gitignore output files and clean them in make clean 2024-12-09 17:51:41 -07:00
damon selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries 2025-03-05 21:36:16 -08:00
devices kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3 2024-10-02 14:30:58 -06:00
dma selftests/dma:remove unused variable 2024-07-11 11:23:55 -06:00
dmabuf-heaps kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2024-07-29 09:02:54 +02:00
drivers selftests: drv: net: add version indicator 2025-05-05 18:17:16 -07:00
dt kselftest: dt: Ignore nodes that have ancestors disabled 2024-09-05 07:54:16 -05:00
efivarfs selftests/efivarfs: add concurrent update tests 2025-01-21 16:34:41 +01:00
exec AT_EXECVE_CHECK update for v6.14-rc1 (fix1) 2025-01-31 17:12:31 -08:00
fchmodat2 selftests/fchmodat2: fix clang build failure due to -static-libasan 2024-06-11 15:05:05 -06:00
filelock
filesystems selftests/fs/mount-notify: test also remove/flush of mntns marks 2025-04-24 11:00:28 +02:00
firmware
fpu
ftrace tracing fixes for v6.15 2025-04-19 11:57:36 -07:00
futex selftests/futex: futex_waitv wouldblock test should fail 2025-04-08 16:50:19 -06:00
gpio selftests: gpio: gpio-sim: Fix missing chip disablements 2025-01-23 15:44:48 +01:00
hid lib/crc: remove unnecessary prompt for CONFIG_CRC_T10DIF 2025-04-04 11:31:42 -07:00
ia64
intel_pstate selftests/intel_pstate: check if cpupower is installed 2024-10-28 21:18:57 -06:00
iommu iommufd: Test attach before detaching pasid 2025-03-28 11:40:41 -03:00
ipc selftests/ipc: Remove unused variables 2025-01-14 17:06:31 -07:00
ir
kcmp selftests/kcmp: remove unused open mode 2024-05-11 15:51:43 -07:00
kexec
kmod lib/test_kmod: do not hardcode/depend on any filesystem 2025-05-11 17:54:09 -07:00
kselftest printf: convert self-test to KUnit 2025-03-13 10:26:33 -07:00
kvm KVM: arm64: selftest: Don't try to disable AArch64 support 2025-05-05 12:19:45 -07:00
landlock selftests/landlock: Add PID tests for audit records 2025-04-11 12:53:22 +02:00
lib lib/prime_numbers: KUnit test should not select PRIME_NUMBERS 2025-04-15 13:50:43 -07:00
livepatch Livepatching changes for 6.15 2025-03-27 19:26:10 -07:00
lkdtm lkdtm/bugs: add test for hung smp_call_function_single() 2024-06-17 11:17:31 -07:00
locking
lsm selftests: refactor the lsm `flags_overset_lsm_set_self_attr` test 2024-12-18 18:14:29 -05:00
media_tests selftest: media_tests: fix trivial UAF typo 2025-01-14 17:06:31 -07:00
membarrier selftests: membarrier: ksft_exit_pass() does not return 2024-05-06 13:57:20 -06:00
memfd selftests/memfd/memfd_test: fix possible NULL pointer dereference 2025-01-25 20:22:44 -08:00
memory-hotplug
mincore 31 hotfixes. 9 are cc:stable and the remainder address post-6.15 issues 2025-04-16 20:07:32 -07:00
mm selftests/mm: fix a build failure on powerpc 2025-05-07 23:39:41 -07:00
module selftests: find_symbol: Actually use load_mod() parameter 2024-11-28 11:17:38 -08:00
mount
mount_setattr selftests: test subdirectory mounting 2025-03-04 09:29:55 +01:00
move_mount_set_group
mqueue selftests/mqueue: fix 5 warnings about signed/unsigned mismatches 2024-06-24 22:25:03 -07:00
mseal_system_mappings selftest: test system mappings are sealed 2025-04-01 15:17:16 -07:00
nci
net selftests: Add IPv6 link-local address generation tests for GRE devices. 2025-05-05 18:08:15 -07:00
nolibc selftests/nolibc: stop testing constructor order 2025-03-07 07:34:12 +01:00
ntb
openat2 selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS 2024-06-11 15:00:11 -06:00
pci_endpoint misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO 2025-03-26 06:11:54 +00:00
pcie_bwctrl selftests/pcie_bwctrl: Fix test progs list 2025-04-18 08:23:22 -05:00
perf_events selftests/perf_events: Test FASYNC with watermark wakeups 2024-04-14 22:26:33 +02:00
pid_namespace tests/pid_namespace: add pid_max tests 2024-12-02 11:25:25 +01:00
pidfd selftests/pidfd: fixes syscall number defines 2025-03-25 14:59:05 +01:00
power_supply selftests: power_supply: Make it POSIX-compliant 2024-05-06 13:57:20 -06:00
powerpc powerpc updates for 6.15 2025-03-27 19:39:08 -07:00
prctl
proc - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
pstore
ptp testptp: Add option to open PHC in readonly mode 2025-03-05 12:43:54 +00:00
ptrace
rcutorture Merge branches 'docs.2025.02.04a', 'lazypreempt.2025.03.04a', 'misc.2025.03.04a', 'srcu.2025.02.05a' and 'torture.2025.02.05a' 2025-03-04 18:47:32 -08:00
resctrl selftests/resctrl: Discover SNC kernel support and adjust messages 2025-01-14 17:06:32 -07:00
ring-buffer selftests/ring-buffer: Add test for out-of-bound pgoff mapping 2025-01-14 17:06:32 -07:00
riscv selftests: riscv: fix v_exec_initval_nolibc.c 2025-04-01 07:03:04 +00:00
rlimits
rseq rseq/selftests: Fix namespace collision with rseq UAPI header 2025-03-19 21:26:24 +01:00
rtc rtc: remove 'setdate' test program 2025-04-01 15:25:15 +02:00
rust selftests: rust: config: disable GCC_PLUGINS 2024-08-11 17:32:55 -06:00
safesetid
sched sched/debug: Remove CONFIG_SCHED_DEBUG from self-test config files 2025-03-19 22:23:24 +01:00
sched_ext Scheduler updates for v6.15: 2025-03-24 21:28:12 -07:00
seccomp selftests/seccomp: Add hard-coded __NR_uretprobe for x86_64 2025-02-10 09:26:19 -08:00
sgx selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
signal selftests: Add a test mangling with uc_sigmask 2024-10-29 01:01:49 -06:00
size
sparc64
splice
static_keys
sync selftests: sync: ksft_exit_pass() does not return 2024-05-06 13:57:21 -06:00
syscall_user_dispatch selftests: sud_test: return correct emulated syscall value on RISC-V 2024-04-25 09:46:41 -07:00
sysctl selftests/sysctl: fix wording of help messages 2025-02-27 10:02:12 +01:00
tc-testing selftests/tc-testing: Add a test case to cover basic HTB+FQ_CODEL case 2025-05-05 13:51:33 -07:00
tdx
thermal/intel
timens selftest/timerns: fix clang build failures for abs() calls 2024-07-05 13:21:48 -06:00
timers selftests/timers: Improve skew_consistency by testing with other clockids 2025-03-21 19:16:18 +01:00
tmpfs selftests: tmpfs: Add kselftest support to tmpfs 2025-01-14 17:06:32 -07:00
tpm2 selftests: tpm2: test_smoke: use POSIX-conformant expression operator 2025-04-08 14:56:13 -06:00
tty kselftest/tty: Report a consistent test name for the one test we run 2024-05-06 13:57:19 -06:00
turbostat tools/power turbostat: Add selftests for added perf counters 2024-07-26 13:51:25 -04:00
ublk selftests: ublk: fix UBLK_F_NEED_GET_DATA 2025-04-29 06:01:36 -06:00
uevent
user_events selftests/user_events: Fix failures caused by test code 2025-02-24 16:37:17 -07:00
vDSO Updates for the VDSO infrastructure: 2025-03-25 11:30:42 -07:00
watchdog selftests/watchdog-test: Fix system accidentally reset after watchdog-test 2024-10-28 21:34:43 -06:00
wireguard sched/debug: Remove CONFIG_SCHED_DEBUG from self-test config files 2025-03-19 22:23:24 +01:00
x86 selftests: x86: test_mremap_vdso: skip if vdso is msealed 2025-04-01 15:17:15 -07:00
zram selftests/zram: gitignore output file 2025-01-14 17:06:31 -07:00
.gitignore selftests: tpm2: create a dedicated .gitignore 2025-04-08 14:56:13 -06:00
Makefile selftest: test system mappings are sealed 2025-04-01 15:17:16 -07:00
gen_kselftest_tar.sh
kselftest.h Revert "selftests: kselftest: Fix build failure with NOLIBC" 2025-02-26 22:13:48 +01:00
kselftest_deps.sh selftests: kselftest_deps: fix l5_test() empty variable 2024-05-08 16:46:41 -06:00
kselftest_harness.h selftests: harness: fix printing of mismatch values in __EXPECT() 2025-01-14 17:06:32 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: Add headers target 2025-03-03 20:00:12 +01:00
run_kselftest.sh selftests/run_kselftest.sh: Fix help string for --per-test-log 2025-01-14 17:06:32 -07:00