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.3k stars 1.01k forks source link

Packages required to Pass netns tests #886

Open Ankita-020696 opened 2 years ago

Ankita-020696 commented 2 years ago

Hi, Could you please tell what are the required/must packages to make all netns tests Pass?

It will be great help.

Thanks

metan-ucw commented 2 years ago

Actually we should probably add a code to detect if the ip utility is from busybox or iproute2.

Peter can you please have a look at this later on?

pevik commented 2 years ago

Sure. Also FYI @akodanev

pevik commented 2 years ago

I tested ip from busybox implementation on older BusyBox v1.21.1 (SLES 12-SP5) and new BusyBox v1.30.1 (Debian) and at least nfs07.sh works. The only issues are nodad supported and prefix not found:

nfs07 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
nfs07 1 TINFO: add local addr 10.0.0.2/24
nfs07 1 TINFO: add local addr fd00:1:1:1::2/64
ip: either "local" is duplicate, or "nodad" is garbage
nfs07 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
nfs07 1 TINFO: add remote addr 10.0.0.1/24
nfs07 1 TINFO: add remote addr fd00:1:1:1::1/64
ip: either "local" is duplicate, or "nodad" is garbage
# tst_net_iface_prefix.c:133: TINFO: prefix and interface not found for 'fd00:1:1:1::2'.

nfs07 1 TINFO: Network config (local -- remote):
nfs07 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
nfs07 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
nfs07 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
nfs07 1 TINFO: timeout per run is 0h 5m 0s
nfs07 1 TINFO: setup NFSv4, socket type tcp
nfs07 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=4 10.0.0.2:/tmp/LTP_nfs07.XsCWkh8ySK/4/tcp /tmp/LTP_nfs07.XsCWkh8ySK/4/0
nfs07 1 TPASS: All files and directories were correctly listed
nfs07 2 TINFO: Cleaning up testcase

nodad issue is probably harmless. Also missing prefix and iface is harmless on the default setup (uses the default values for {L,R}HOST_IFACES, IPV{4,6}_{L,R}PREFIX) - thus problematic only if tester uses predefined netns (IMHO very rare, maybe only @akodanev did).

Thus, I'd say ip implementation from busybox is possible to use and no check is needed. @Ankita-020696 Feel free to fix these issues if important for you.

Also ip and other optional dependencies (e.g. ping, ssh, awk for tst_net.sh, tests list the dependencies with TST_NEEDS_CMDS) are checked and reported if missing with tst_require_cmds. But maybe testcases/network/README.md could be further improved.