Skip to content

Linux kselftests

Nikita Sobolev edited this page Jun 9, 2020 · 11 revisions

Kernel config

Firstly make sure, that you have these patches:

https://lkml.org/lkml/2020/5/21/538

https://www.spinics.net/lists/stable/msg352902.html

Enable these options in a kernel config:

CONFIG_UTS_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_JUMP_LABEL=y
CONFIG_TEST_STATIC_KEYS=m
CONFIG_TEST_USER_COPY=m

Buildroot config

Enable these options in buildroot config:

BR2_PACKAGE_PYTHON=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y

Files you need to have in your image

Copy linux/tools/testing/selftests/kselftest_module.sh into a directory with selftests in your image.

Run tests on the target

cd /usr/lib/kselftests/
./run_kselftest.sh
Clone this wiki locally