-
Notifications
You must be signed in to change notification settings - Fork 13
Linux kselftests
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_TEST_STATIC_KEYS=m
CONFIG_TEST_USER_COPY=m
CONFIG_JUMP_LABEL=y
CONFIG_MODULE_UNLOAD=y
Enable these options in buildroot config:
BR2_PACKAGE_PYTHON=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LINUX_TOOLS_SELFTESTS=y
Copy linux/tools/testing/selftests/kselftest_module.sh
into a directory with selftests in your image.
cd /usr/lib/kselftests/
./run_kselftest.sh
See example with results.
Firmware test problem. To make firmware test work we need to have some options to be activated in kernel config:
CONFIG_TEST_FIRMWARE=y
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
Firmware test can execute with errors because of diff
util limitations in busybox.
The script uses -Z
option, that is not supported in diff
from busybox. But -Z
can be changed to -b
option.
Then test runs as it should. Nevertheless, it will fail on one of tests (test_request_firmware_nowait_custom_nofile ).
This test makes the system wait forever (checked on nsim and HSDK).
If this test is excluded, other tests can run successfully:
diff fw_filesystem.sh:
- for i in $(seq 1 5); do
- test_request_firmware_nowait_custom_nofile $i
- done
This part of the code should be deleted.