Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

LTP test on LTS kernel

Yi Li edited this page Nov 24, 2022 · 9 revisions

Current result

CentOS-8.3 ubuntu-2004
5.4 Total tests 3886, Skipped 233, Failures 79 Total tests 3554, Skipped 223, Failures 106
5.10 Total tests 3887, Skipped 275, Failures 158 Total tests 3886, Skipped 330, Failures 64

Skipped test cases

LTP has over 3800 test cases. Some test cases are not suitable for testing LTS kernel on Ampere platform, e.g:

  • Test cases depending on architectures other than aarch64
  • Not useful for server system

All test groups in ltp/runtest are added to ltp_cmdfile by default.

$ ls /opt/ltp/runtest/
can          cpuhotplug          fcntl-locktests  fsx             io_cd             ltp-aiodio.part3      net.features   net.rpc_tests          net_stress.ipsec_icmp  net.tcp_cmds                      pty               smoketest
cap_bounds   crashme             filecaps         hugetlb         io_floppy         ltp-aiodio.part4      net.ipv6       net.sctp               net_stress.ipsec_sctp  net.tirpc_tests                   s390x_tests       syscalls
commands     crypto              fs               hyperthreading  ipc               ltp-aio-stress.part1  net.ipv6_lib   net_stress.appl        net_stress.ipsec_tcp   nptl                              sched             syscalls-ipc
connectors   cve                 fs_bind          ima             kernel_misc       ltp-aio-stress.part2  net.multicast  net_stress.broken_ip   net_stress.ipsec_udp   numa                              scsi_debug.part1  tpm_tools
containers   dio                 fs_perms_simple  input           ltp-aiodio.part1  math                  net.nfs        net_stress.interface   net_stress.multicast   power_management_tests            securebits        tracing
controllers  dma_thread_diotest  fs_readonly      io              ltp-aiodio.part2  mm                    net.rpc        net_stress.ipsec_dccp  net_stress.route       power_management_tests_exclusive  smack             uevent

1. To skip individual test case:

Use https://github.com/AmpereComputing/ampere-lts-kernel/blob/main/tests/lkft/ltp/skipfile-lkft.yaml to control:

2. Skipped at ltp runtime

E.g: due to missing configurations, ltp test framework does not run the test. These test cases are counted in the LTP test result as Skipped, e.g: "Total tests 3554, Skipped 223, Failures 106"

3. Reason of skip tests

Test set Why skipped Comments
io_cd Need cd media
io_floppy Need floppy disk

Failed test cases

The cause for the failure is listed in: https://docs.google.com/spreadsheets/d/1kNXjuFW_OxsNXR1kxfbeIOhodwRRf8S8xdy0YSKD2l8/edit#gid=2004818483

Ampere-lts ltp testcase revise (4).xlsx

To run the test

$ wget https://github.com/AmpereComputing/ampere-lts-kernel/archive/refs/heads/main.zip
$ unzip main.zip; cd ampere-lts-kernel-main/tests/
$ ./runall.sh <--- this will run both kernel-selftest and ltp. You can edit this script to run ltp only.

Debugging LTP failed case

LTP result depends on OS version, OS configuration, kernel version and config. It is common some test case passed on some kernel, but failed on another.

We start by running a single test case:

e.g, we observed some unexpected skip case:

net_stress.ipsec_tcp,tcp4_ipsec01,SKIP,32
net_stress.ipsec_tcp,tcp4_ipsec02,SKIP,32
net_stress.ipsec_tcp,tcp4_ipsec03,SKIP,32
net_stress.ipsec_tcp,tcp4_ipsec04,SKIP,32

Try to run this single test:

# ./runltp -f net_stress.ipsec_tcp -s tcp4_ipsec01
...  ...
COMMAND:    /opt/ltp/bin/ltp-pan   -e -S   -a 204748     -n 204748 -p -f /tmp/ltp-SMY2ggfkRc/alltests -l /opt/ltp/results/LTP_RUN_ON-2021_07_03-20h_08m_14s.log  -C /opt/ltp/output/LTP_RUN_ON-2021_07_03-20h_08m_14s.failed -T /opt/ltp/output/LTP_RUN_ON-2021_07_03-20h_08m_14s.tconf
INFO: Restricted to tcp4_ipsec01
LOG File: /opt/ltp/results/LTP_RUN_ON-2021_07_03-20h_08m_14s.log
FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-2021_07_03-20h_08m_14s.failed
TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-2021_07_03-20h_08m_14s.tconf
Running tests.......
<<<test_start>>>
tag=tcp4_ipsec01 stime=1625314094
cmdline="tcp_ipsec.sh -s 100:1000:65535:R65535" <------------ command line of the test case
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tcp_ipsec 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
tcp_ipsec 1 TINFO: add local addr 10.0.0.2/24
tcp_ipsec 1 TINFO: add local addr fd00:1:1:1::2/64
RTNETLINK answers: Operation not supported
tcp_ipsec 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
tcp_ipsec 1 TINFO: add remote addr 10.0.0.1/24
tcp_ipsec 1 TINFO: add remote addr fd00:1:1:1::1/64
RTNETLINK answers: Operation not supported  <--------------- error happens here
# tst_net_iface_prefix.c:134: TINFO: prefix and interface not found for 'fd00:1:1:1::2'.

Further, we can invoke the test directly:

# cd testcases/bin/
# PATH=$PATH:$PWD ./tcp_ipsec.sh -s 100:1000:65535:R65535
tcp_ipsec 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
tcp_ipsec 1 TINFO: add local addr 10.0.0.2/24
tcp_ipsec 1 TINFO: add local addr fd00:1:1:1::2/64
RTNETLINK answers: Operation not supported
tcp_ipsec 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
tcp_ipsec 1 TINFO: add remote addr 10.0.0.1/24
tcp_ipsec 1 TINFO: add remote addr fd00:1:1:1::1/64
RTNETLINK answers: Operation not supported
# tst_net_iface_prefix.c:134: TINFO: prefix and interface not found for 'fd00:1:1:1::2'.

tcp_ipsec 1 TINFO: Network config (local -- remote):
tcp_ipsec 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
tcp_ipsec 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
tcp_ipsec 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
tcp_ipsec 1 TINFO: timeout per run is 0h 5m 0s
tcp_ipsec 1 TINFO: run server 'netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.ko7UoKfXBY'
tcp_ipsec 1 TINFO: run client 'netstress -l -H 10.0.0.1 -n 100 -N 100 -D ltp_ns_veth2 -a 2 -r 100 -d tst_netload.res' 5 times
tst_test.c:1313: TINFO: Timeout per run is 0h 05m 00s
netstress.c:923: TINFO: max requests '10'
netstress.c:947: TINFO: TCP server is using old TCP API.
netstress.c:789: TINFO: '/proc/sys/net/ipv4/tcp_fastopen' is 1
netstress.c:673: TCONF: socket(10, 1, 0) failed: EAFNOSUPPORT (97)

Summary:
passed   0
failed   0
broken   0
skipped  1
warnings 0
netstress.c:673: TCONF: socket(10, 1, 0) failed: EAFNOSUPPORT (97)
tcp_ipsec 1 TCONF: server failed

Summary:
passed   0
failed   0
broken   0
skipped  1
warnings 0

Next, we debug tcp_ipsec.sh:

+++ echo add local addr fd00:1:1:1::2/64
add local addr fd00:1:1:1::2/64
+++ ip addr add fd00:1:1:1::2/64 dev ltp_ns_veth2 nodad <------------------- this is where error happens
RTNETLINK answers: Operation not supported
# ip addr
10: ltp_ns_veth2@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 6a:90:81:e6:80:6e brd ff:ff:ff:ff:ff:ff link-netns ltp_ns
    inet 10.0.0.2/24 scope global ltp_ns_veth2
       valid_lft forever preferred_lft forever

# ip addr add fd00:1:1:1::2/64 dev ltp_ns_veth2 nodad
RTNETLINK answers: Operation not supported

Check my kernel boot option, there is:

ipv6.disable=1

Remove this option and reboot. Fine.