linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.33k stars 1.02k forks source link

netns_breakns failure with latest LTP sources #823

Open pankajjoshi347 opened 3 years ago

pankajjoshi347 commented 3 years ago

i have tried to run with the latest LTP too but the same error is getting reproduced

attaching complete log of network testcases

tst_kconfig.c:64: TINFO: Parsing kernel config '/proc/config.gz' tst_test.c:1311: TINFO: Timeout per run is 0h 05m 00s netns_netlink.c:86: TPASS: interface changes detected

Summary: passed 1 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=2 cstime=1 <<>> <<>> tag=netns_breakns_ns_exec_ipv4_netlink stime=1622225902 cmdline="netns_breakns.sh ns_exec ipv4 netlink" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s netns_breakns 1 TINFO: NS interaction: ns_exec | devices setup: netlink netns_breakns 1 TPASS: ns_exec 1644275 net ip address add 192.168.0.3/24 dev veth1 failed as expected netns_breakns 1 TPASS: ns_exec 1644275 net ifconfig veth1 192.168.0.3/24 failed as expected

Summary: passed 2 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=1 termination_type=exited termination_id=0 corefile=no cutime=14 cstime=13 <<>> <<>> tag=netns_breakns_ns_exec_ipv6_netlink stime=1622225903 cmdline="netns_breakns.sh ns_exec ipv6 netlink" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s netns_breakns 1 TINFO: NS interaction: ns_exec | devices setup: netlink netns_breakns 1 TPASS: ns_exec 1644325 net ip address add fd00::3/64 dev veth1 failed as expected netns_breakns 1 TPASS: ns_exec 1644325 net ifconfig veth1 inet6 add fd00::3/64 failed as expected

Summary: passed 2 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=11 cstime=16 <<>> <<>> tag=netns_breakns_ns_exec_ipv4_ioctl stime=1622225903 cmdline="netns_breakns.sh ns_exec ipv4 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address '192.168.0.2/24' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=10 cstime=11 <<>> <<>> tag=netns_breakns_ns_exec_ipv6_ioctl stime=1622225903 cmdline="netns_breakns.sh ns_exec ipv6 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=10 cstime=12 <<>> <<>> tag=netns_breakns_ip_ipv4_netlink stime=1622225903 cmdline="netns_breakns.sh ip ipv4 netlink" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s netns_breakns 1 TINFO: NS interaction: ip | devices setup: netlink netns_breakns 1 TPASS: ip netns exec tst_net_ns0 ip address add 192.168.0.3/24 dev veth1 failed as expected netns_breakns 1 TPASS: ip netns exec tst_net_ns0 ifconfig veth1 192.168.0.3/24 failed as expected

Summary: passed 2 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=1 termination_type=exited termination_id=0 corefile=no cutime=12 cstime=22 <<>> <<>> tag=netns_breakns_ip_ipv6_netlink stime=1622225904 cmdline="netns_breakns.sh ip ipv6 netlink" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s netns_breakns 1 TINFO: NS interaction: ip | devices setup: netlink netns_breakns 1 TPASS: ip netns exec tst_net_ns0 ip address add fd00::3/64 dev veth1 failed as expected netns_breakns 1 TPASS: ip netns exec tst_net_ns0 ifconfig veth1 inet6 add fd00::3/64 failed as expected

Summary: passed 2 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=11 cstime=24 <<>> <<>> tag=netns_breakns_ip_ipv4_ioctl stime=1622225904 cmdline="netns_breakns.sh ip ipv4 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address '192.168.0.2/24' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=1 termination_type=exited termination_id=2 corefile=no cutime=11 cstime=15 <<>> <<>> tag=netns_breakns_ip_ipv6_ioctl stime=1622225905 cmdline="netns_breakns.sh ip ipv6 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=11 cstime=16 <<>> <<>> tag=netns_comm_ns_exec_ipv4_netlink stime=1622225905 cmdline="netns_comm.sh ns_exec ipv4 netlink" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s netns_comm 1 TINFO: NS interaction: ns_exec | devices setup: netlink netns_comm 1 TPASS: ns_exec 1644605 net ping -q -c2 -I veth0 192.168.0.3 passed as expected netns_comm 1 TPASS: ns_exec 1644607 net ping -q -c2 -I veth1 192.168.0.2 passed as expected netns_comm 1 TPASS: ns_exec 1644605 net ping -q -c2 -I lo 127.0.0.1 passed as expected

Summary: passed 3 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=3 termination_type=exited termination_id=0 corefile=no cutime=11 cstime=17 <<>> <<>> tag=netns_comm_ns_exec_ipv6_netlink stime=1622225908 cmdline="netns_comm.sh ns_exec ipv6 netlink" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s netns_comm 1 TINFO: NS interaction: ns_exec | devices setup: netlink netns_comm 1 TPASS: ns_exec 1644658 net ping6 -q -c2 -I veth0 fd00::3 passed as expected netns_comm 1 TPASS: ns_exec 1644660 net ping6 -q -c2 -I veth1 fd00::2 passed as expected netns_comm 1 TPASS: ns_exec 1644658 net ping6 -q -c2 -I lo ::1 passed as expected

Summary: passed 3 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=4 termination_type=exited termination_id=0 corefile=no cutime=11 cstime=18 <<>> <<>> tag=netns_comm_ns_exec_ipv4_ioctl stime=1622225912 cmdline="netns_comm.sh ns_exec ipv4 ioctl" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address '192.168.0.2/24' netns_comm 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=9 cstime=12 <<>> <<>> tag=netns_comm_ns_exec_ipv6_ioctl stime=1622225912 cmdline="netns_comm.sh ns_exec ipv6 ioctl" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_comm 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=10 cstime=11 <<>> <<>> tag=netns_comm_ip_ipv4_netlink stime=1622225912 cmdline="netns_comm.sh ip ipv4 netlink" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s netns_comm 1 TINFO: NS interaction: ip | devices setup: netlink netns_comm 1 TPASS: ip netns exec tst_net_ns0 ping -q -c2 -I veth0 192.168.0.3 passed as expected netns_comm 1 TPASS: ip netns exec tst_net_ns1 ping -q -c2 -I veth1 192.168.0.2 passed as expected netns_comm 1 TPASS: ip netns exec tst_net_ns0 ping -q -c2 -I lo 127.0.0.1 passed as expected

Summary: passed 3 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=4 termination_type=exited termination_id=0 corefile=no cutime=13 cstime=24 <<>> <<>> tag=netns_comm_ip_ipv6_netlink stime=1622225916 cmdline="netns_comm.sh ip ipv6 netlink" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s netns_comm 1 TINFO: NS interaction: ip | devices setup: netlink netns_comm 1 TPASS: ip netns exec tst_net_ns0 ping6 -q -c2 -I veth0 fd00::3 passed as expected netns_comm 1 TPASS: ip netns exec tst_net_ns1 ping6 -q -c2 -I veth1 fd00::2 passed as expected netns_comm 1 TPASS: ip netns exec tst_net_ns0 ping6 -q -c2 -I lo ::1 passed as expected

Summary: passed 3 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=3 termination_type=exited termination_id=0 corefile=no cutime=11 cstime=26 <<>> <<>> tag=netns_comm_ip_ipv4_ioctl stime=1622225919 cmdline="netns_comm.sh ip ipv4 ioctl" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address '192.168.0.2/24' netns_comm 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=10 cstime=17 <<>> <<>> tag=netns_comm_ip_ipv6_ioctl stime=1622225919 cmdline="netns_comm.sh ip ipv6 ioctl" contacts="" analysis=exit <<>> netns_comm 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_comm 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=1 termination_type=exited termination_id=2 corefile=no cutime=10 cstime=16 <<>> <<>> tag=netns_sysfs stime=1622225920 cmdline="netns_sysfs.sh" contacts="" analysis=exit <<>> incrementing stop netns_sysfs 1 TINFO: timeout per run is 0h 5m 0s netns_sysfs 1 TPASS: ns_exec 1644946 net,mnt test -e /sys/class/net/dummy_test1 passed as expected netns_sysfs 1 TPASS: ns_exec 1644946 net,mnt test -e /sys/class/net/dummy_test0 failed as expected netns_sysfs 1 TPASS: test -e /sys/class/net/dummy_test1 failed as expected

Summary: passed 3 failed 0 broken 0 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=12 cstime=12 <<>> INFO: ltp-pan reported some tests FAIL LTP Version: 20210524-15-gf96b8fe15

all of the following 7 testcases are failing

  1. netns_breakns_ip_ipv4_ioctl
  2. netns_breakns_ns_exec_ipv4_ioctl 3.netns_breakns_ns_exec_ipv6_ioctl
  3. netns_comm_ip_ipv4_ioctl
  4. netns_comm_ip_ipv6_ioctl
  5. netns_comm_ns_exec_ipv4_ioctl
  6. netns_comm_ns_exec_ipv6_ioctl can you suggest how to fix ?

Originally posted by @pankajjoshi347 in https://github.com/linux-test-project/ltp/issues/822#issuecomment-850592465

Ankita-020696 commented 3 years ago

Hi, I am seeing following tests failures with latest LTP source, even after enabling all required kernel configurations.

  1. breakns_ip_ipv4_ioctl fail
  2. breakns_ip_ipv6_ioctl fail
  3. ns_exec_ipv4_ioctl fail
  4. comm_ip_ipv4_ioctl fail
  5. comm_ip_ipv6_ioctl fail
  6. exec_ipv4_ioctl fail
  7. exec_ipv6_ioctl fail

Attaching log of a test.

$ ./runltp -s exec_ipv6_ioctl INFO: no command files were provided. Executing following runtest scenario files: syscalls fs fs_perms_simple fsx dio io mm ipc sched math nptl pty containers fs_bind controllers filecaps cap_bounds fcntl-locktests connectors power_management_tests hugetlb commands hyperthreading can cpuhotplug net.ipv6_lib input cve crypto kernel_misc uevent

Checking for required user/group ids

'nobody' user id and group found. 'bin' user id and group found. 'daemon' user id and group found. Users group found. Sys group found. Required users/groups exist. If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

/etc/os-release ID=exaleap-unmatched-riscv-linux NAME="Exaleap-Unmatched-riscv-linux" VERSION="Exaleap-Unmatched-r1.0.0" VERSION_ID=exaleap-unmatched-r1.0.0 PRETTY_NAME="Exaleap-Unmatched-riscv-linux Exaleap-Unmatched-r1.0.0"

uname: Linux Exaleap-Unmatched-1.0.0 5.10.41 #1 SMP Thu Oct 21 07:44:40 UTC 2021 riscv64 riscv64 riscv64 GNU/Linux

/proc/cmdline root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon

Gnu C gcc (GCC) 10.2.0 Clang Gnu make 4.3 util-linux 2.36 mount linux 2.36 (libmount 2.36.0: btrfs, namespaces, assert, debug) modutils 27 Linux C Library > libc.2.32 Dynamic linker (ldd) 2.32 Linux C++ Library 6.0.28 Procps 3.3.16 iproute2 iproute2-v5.7.0-77-gb687d1067169 iputils 'V' /opt/ltp/ver_linux: line 115: ethtool: command not found Sh-utils 8.32 Modules Loaded snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device snd_pcm nls_cp437 snd_timer snd drm fuse drm_panel_orientation_quirks

free reports: total used free shared buff/cache available Mem: 8151876 70200 7974620 18036 107056 7981084 Swap: 0 0 0

cpuinfo: Architecture: riscv64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 4 Core(s) per socket: 1 Socket(s): 1 L1d cache: 32 KiB L1i cache: 32 KiB L2 cache: 2 MiB

AppArmor disabled

SELinux mode: unknown no big block device was specified on commandline. Tests which require a big block device are disabled. You can specify it with option -z COMMAND: /opt/ltp/bin/ltp-pan -e -S -a 4456 -n 4456 -p -f /tmp/ltp-niZVi43Zgg/alltests -l /opt/ltp/results/LTP_RUN_ON-2021_10_26-12h_53m_46s.log -C /opt/ltp/output/LTP_RUN_ON-2021_10_26-12h_53m_46s.failed -T /opt/ltp/output/LTP_RUN_ON-2021_10_26-12h_53m_46s.tconf INFO: Restricted to exec_ipv6_ioctl LOG File: /opt/ltp/results/LTP_RUN_ON-2021_10_26-12h_53m_46s.log FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-2021_10_26-12h_53m_46s.failed TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-2021_10_26-12h_53m_46s.tconf Running tests....... <<>> tag=netns_breakns_ns_exec_ipv6_ioctl stime=1635252827 cmdline="netns_breakns.sh ns_exec ipv6 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=9 cstime=9 <<>> <<>> tag=netns_comm_ns_exec_ipv6_ioctl stime=1635252827 cmdline="netns_comm.sh ns_exec ipv6 ioctl" contacts="" analysis=exit <<>> incrementing stop netns_comm 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_comm 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=9 cstime=12 <<>> INFO: ltp-pan reported some tests FAIL LTP Version: 20210927-27-gba50e6f93

###############################################################

    Done executing testcases.
    LTP Version:  20210927-27-gba50e6f93

###############################################################

What could be the reason? Am I missing anything?

Thanks

pevik commented 3 years ago

No idea, test your IPv6 setup.

Ankita-020696 commented 3 years ago

No idea, test your IPv6 setup.

IPV6 is enabled in linux.

sysctl -a 2>/dev/null | grep disable_ipv6

net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.eth0.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 net.ipv6.conf.sit0.disable_ipv6 = 0

Any other way to check?

pevik commented 3 years ago

Actually no idea what could be wrong. @akodanev any idea?

indumathiraju commented 3 years ago

Hi, I am doing netns_breakns_ip_ipv4_ioctl of network testcases

<<>> initiation_status="ok" duration=1 termination_type=exited termination_id=0 corefile=no cutime=15 cstime=17 <<>> <<>> tag=netns_breakns_ip_ipv4_ioctl stime=1636521389 cmdline="netns_breakns.sh ip ipv4 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address '192.168.0.2/24' netns_breakns 1 TBROK: adding address to veth0 failed

Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 <<>> initiation_status="ok" duration=0 termination_type=exited termination_id=2 corefile=no cutime=12 cstime=13 <<>> <<>> tag=netns_breakns_ip_ipv6_ioctl stime=1636521389 cmdline="netns_breakns.sh ip ipv6 ioctl" contacts="" analysis=exit <<>> netns_breakns 1 TINFO: timeout per run is 0h 5m 0s ifconfig: bad address 'inet6' netns_breakns 1 TBROK: adding address to veth0 failed

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

What could be the reason?

indumathiraju commented 3 years ago

Hi, I was try to debugging this issue using print statement but it could not printing . How to proceed it? can you kindly help me to know the issue what exactly happen in that ? Thank you

pevik commented 2 months ago

Can we close this old ticket? If the problem still persists on the current master branch, you can use TST_NET_RHOST_RUN_DEBUG=1 to debug.