3 ms·
Every subsystem is tested differently. Because of the wide variety of subsystems and workflows in the kernel, it's pretty much impossible to have a single test
by osandov 9y ago
Every subsystem is tested differently. Because of the wide variety of subsystems and workflows in the kernel, it's pretty much impossible to have a single test suite you can run and call good. For example, some subsystems have unit tests that run in the kernel at boot time if you compiled the kernel with a specific config option (e.g., Btrfs [1] and ftrace [2]). Additionally, some subsystems have integration tests where we set stuff up and run from userspace. Filesystems use xfstests [3] and the block layer has something similar [4]. For the most part, developers and maintainers run these before sending patches or pull requests. Additionally, Intel operates an automated system [5] which runs several test suites and reports the results to developers.
1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/tests https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
2: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/trace_selftest.c https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
3: https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/ https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/
4: https://github.com/osandov/blktests https://github.com/osandov/blktests
5: https://01.org/lkp/documentation/0-day-test-service https://01.org/lkp/documentation/0-day-test-service