[LTP] [PATCH 1/1] testscripts/network.sh: Don't load tst_net.sh

Petr Vorel pvorel@suse.cz
Wed Feb 8 11:04:01 CET 2023


> This should not be needed any more for neither new API and legacy tests
> since 04021637f4 ("tst_test.sh: Cleanup getopts usage")
I suppose loading tst_net.sh was not needed even before. I wonder why this was
ever needed.

It was added in 6538f7ab70 ("network: merge networktests.sh/networkstress.sh
into network.sh") when testcases/lib/test_net.sh (predecessor of
testcases/lib/tst_net.sh) was much simpler (e.g. without netns).

I suppose it was due export LTP_RSH=${LTP_RSH:-"rsh -n"} which was moved from
testscripts/network.sh to testcases/lib/test_net.sh.

LTP_RSH was changed to use ssh internally in 40110018e6 ("tst_net.sh: Remove rsh
support"), but the variable is still used in various legacy files, which don't
even use tst_net.sh. But these files aren't in any runtest file (see below),
therefore it should be safe to merge this.

$ for i in $(git grep -l LTP_RSH |grep -v README); do j=$(basename $i); echo "* $j ($i)"; git grep $j runtest/; done
* tst_net.sh (testcases/lib/tst_net.sh)
* icmp4-multi-diffip01 (testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip01)
* icmp4-multi-diffnic01 (testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic01)
* add_ipv6addr (testcases/network/stress/ns-tools/add_ipv6addr)
* check_envval (testcases/network/stress/ns-tools/check_envval)
* check_netem (testcases/network/stress/ns-tools/check_netem)
* check_setkey (testcases/network/stress/ns-tools/check_setkey)
* get_ifname (testcases/network/stress/ns-tools/get_ifname)
* initialize_if (testcases/network/stress/ns-tools/initialize_if)
* killall_icmp_traffic (testcases/network/stress/ns-tools/killall_icmp_traffic)
* killall_tcp_traffic (testcases/network/stress/ns-tools/killall_tcp_traffic)
* killall_udp_traffic (testcases/network/stress/ns-tools/killall_udp_traffic)
* set_ipv4addr (testcases/network/stress/ns-tools/set_ipv4addr)
* tcp4-multi-diffip01 (testcases/network/stress/tcp/multi-diffip/tcp4-multi-diffip01)
* tcp4-multi-diffnic01 (testcases/network/stress/tcp/multi-diffnic/tcp4-multi-diffnic01)
* tcp4-multi-diffport01 (testcases/network/stress/tcp/multi-diffport/tcp4-multi-diffport01)
* tcp4-multi-sameport01 (testcases/network/stress/tcp/multi-sameport/tcp4-multi-sameport01)
* tcp4-uni-basic01 (testcases/network/stress/tcp/uni-basic/tcp4-uni-basic01)
* udp4-multi-diffip01 (testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01)
* udp4-multi-diffnic01 (testcases/network/stress/udp/multi-diffnic/udp4-multi-diffnic01)
* udp4-multi-diffport01 (testcases/network/stress/udp/multi-diffport/udp4-multi-diffport01)
* udp4-uni-basic01 (testcases/network/stress/udp/uni-basic/udp4-uni-basic01)

Tools in testcases/network/stress/ns-tools/ will be removed once the rest of
testcases/network/stress/{icmp,udp}/ is migrated to use tst_net.sh or removed.

Kind regards,
Petr


More information about the ltp mailing list