The Linux kernel contains a set of developer unit and regression tests (Kselftests) in the Kernel sources under tools/testing/selftest directory. These tests exercise individual code paths in the kernel. Even though kselftest’s main purpose is for developer regression test, testers and users can also use it to ensure there are no regressions in a new kernel.
Kselftest is run everyday on several Linux kernel trees on the 0-Day and Linaro Test Farm and other Linux kernel integration test rings.
Please find current status as of Linux 4.19 and progress made since 3.17 in Shuah's Kselftest Overview.
Please find Kselftest framework details and how to contribute to Kselftest sub-system and write new tests in Shuah's Kselftest How to Guide
The purpose of kselftest is to provide kernel developers and end-users a quick method of running tests against the Linux kernel. As of this writing, Samsung developer Shuah Khan is the project leader.
kselftest was discussed at the 2014 kernel summit (in August, 2014), with Shuah making a presentation during the "core day" of the summit. Some followup discussions were held during an "unconference" session the following day.
Source code for kselftest tests is contained in the directory
tools/testing/selftests in the kernel source tree.
The kselftest feature (in rough draft form, I'd say) first appeared in kernel version 3.16.
Here is a list of desired features for kselftest – some of which already exist (as of August 2014):
As of August, 2014, Shuah Khan reported the status of kselftest as follows: (see http://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-August/001059.html)
Short summary of work done so far for 3.17:
What's planned for 3.18 and beyond:
There are some sub-projects or additional features, that some developers have expressed interest in, for the kselftest system. Below is a bullet list for tracking the status of these different sub-projects: (In parenthesis are some people who have expressed interest in this sub-project or feature) If a link is present then there's a sub-page to discuss that project.
Initially, Shuah started collecting existing unit tests from other places both inside and outside the kernel source tree. Here are some tests that have been discussed or requested: