kselftest¶
The Linux kernel contains a set of developer unit and regression tests (Kselftests) in the Kernel sources under tools/testing/selftests directory.It is used to verify the correctness and stability of various kernel subsystems.
What It Tests¶
Functional Behavior of Core Kernel Components: Check subsystems alsa, fs, sched, net and so on functionality
Preconditions¶
The below packages are installed
sed perl wget xz-utils iproute2 python3-tap libasound2 socat jq
iptables fuse libkeepalive0 linux-cpupower iperf3 ipvsadm ethtool
conntrack netcat-openbsd python3-scapy libteam-utils dosfstools bc
iputils-clockdiff iputils-tracepath dnsmasq telnet traceroute file
wireguard bsdmainutils tcpdump dhcpd host nfs-server rpcbind quota
gdb unzip uuid-runtime psmisc libnuma1 netsniff-ng iputils-arping
smcroute kselftests
System requires root privileges
Test Parameters¶
Parameter |
Default |
Description |
---|---|---|
|
|
List of tests to run |
|
|
Single test case to run |
|
|
Specify Linux kernel self test pre-build tarball name |
|
|
Skip package installation |
|
|
List of known unsupported test cases to be skipped |
|
|
Specify Linux kernel self test pre-build tarball full url发 |
|
|
Specify Linux kernel self test path after installation |
|
|
kernel self test skip file |
|
|
Match board name with a list of board names in skipfile |
|
|
Match branch name with a list of branch names in skipfile |
|
|
Match environment name with a list of environment names in skipfile |
|
|
Number of shards that will be done |
|
|
Which bucket to run |
Test Steps¶
- cd ./automated/linux/kselftest
- ./kselftest.sh -c "${TST_CMDFILES}" -T "${TST_CASENAME}" -t "${TESTPROG}" -s "${SKIP_INSTALL}" -u "${TESTPROG_URL}" -L "${SKIPLIST}" -S "${SKIPFILE}" -b "${BOARD}" -g "${BRANCH}" -e "${ENVIRONMENT}" -p "${KSELFTEST_PATH}" -n "${SHARD_NUMBER}" -i "${SHARD_INDEX}"
Refer to kselftest.yaml
for complete test definition and execution details.
Expected Results¶
The sub test cases in the different sub system pass