[LTP] [PATCH 2/9] tst_net.sh: Check for disabled IPv6 in legacy tests

Petr Vorel pvorel@suse.cz
Thu Jan 26 22:53:54 CET 2023


Before tests timeout:

    # ./tcpdump01.sh -6

    tcpdump01 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
    tcpdump01 1 TINFO: add local addr 10.0.0.2/24
    tcpdump01 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
    tcpdump01 1 TINFO: add remote addr 10.0.0.1/24
    tcpdump01 1 TINFO: Network config (local -- remote):
    tcpdump01 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
    tcpdump01 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
    tcpdump01 1 TINFO: fd00:1:1:1::2/64/ -- fd00:1:1:1::1/64/
    tcpdump01 1 TINFO: start ping6 in background
    tcpdump01 1 TINFO: running tcpdump...
    (timeout)

With this patch:
    tcpdump01 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
    ...
    tcpdump01 1 TCONF: IPv6 disabled

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 925cf50e1c..b76734210a 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -1094,6 +1094,7 @@ export NS_ICMPV6_SENDER_DATA_MAXSIZE=1452
 # in the following document: testcases/network/stress/README
 
 if [ -n "$TST_USE_LEGACY_API" ]; then
+	[ "$TST_IPVER" = 6 ] && tst_net_require_ipv6
 	tst_net_remote_tmpdir
 fi
 
-- 
2.39.1



More information about the ltp mailing list