Kselftest is an effort to enable a developer-focused unit test framework in the kernel to ensure the quality of new kernel releases.
- Shua Khan

Install and run Linux kernel selftests on Ubuntu 16.04

Presentation slides by Shua Khan on self test framework.
Git repository for the project.

Test machine

Product: Intel® Core™ i5-4590 CPU @ 3.30GHz
Description: Ubuntu 16.04.1 LTS
Kernel: Linux 4.10.0-rc6+ x86_64 GNU/Linux

Build on Ubuntu

The following packages are required


$ KTREE = /path/to/kernel/tree  
$ cd $KTREE/tools/testing/selftests  
$ make  


Some tests require root privileges to run

$ sudo make run_tests

Your machine may appear to die as the tests start. Tests run in approx 10 minutes on this machine, your results may vary.

Test targets may be specified using

$ sudo make TARGETS='size' run_tests
$ sudo make TARGETS='net networking' run_tests

Single or multiple targets are accepted. Target names come from directory names under tools/testing/selftests.