Repository: linux-test-project/ltp

Issue #128: Rewrite remaining network tests into new API
Created: 2017-01-18T14:59:10Z
Original report:
Tests failing because rsh doesn't exist
Even though we set LTP_RSH=ssh, tests are failing because testcases/network/stress/ns-tools/check_envval has a hardwired check for the existence of rsh. We don't allow rsh on our systems.
UPDATE (pevik): remaining tests which use old API (TST_USE_LEGACY_API=1) needs to be rewritten:
$ git grep -l TST_USE_LEGACY_API=1
testcases/network/multicast/mc_cmds/mc_cmds.sh
testcases/network/multicast/mc_commo/mc_commo.sh
testcases/network/multicast/mc_member/mc_member.sh
testcases/network/multicast/mc_opts/mc_opts.sh
testcases/network/stress/dns/dns-stress.sh
testcases/network/stress/ftp/ftp-download-stress.sh
testcases/network/stress/ftp/ftp-upload-stress.sh
testcases/network/stress/http/http-stress.sh
testcases/network/tcp_cmds/tcpdump/tcpdump01.sh
testcases/network/tcp_cmds/telnet/telnet01.sh

Tests which are using LTP_RSH are even older and it's a question if they have any value (from 2005):
$ git grep -l LTP_RSH |grep -v -e README -e tst_net.sh -e ns-tools
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip01
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic01
testcases/network/stress/tcp/multi-diffip/tcp4-multi-diffip01
testcases/network/stress/tcp/multi-diffnic/tcp4-multi-diffnic01
testcases/network/stress/tcp/multi-diffport/tcp4-multi-diffport01
testcases/network/stress/tcp/multi-sameport/tcp4-multi-sameport01
testcases/network/stress/tcp/uni-basic/tcp4-uni-basic01
testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01
testcases/network/stress/udp/multi-diffnic/udp4-multi-diffnic01
testcases/network/stress/udp/multi-diffport/udp4-multi-diffport01
testcases/network/stress/udp/uni-basic/udp4-uni-basic01

These tests using similar IPsec proto/mode params, which are in runtest/net_stress.ipsec_{dccp,icmp,sctp,tcp,udp}. These new and well working tests are using ipsec_lib.sh and are testing either with ping via tst_ping().
(ICMP tests) or with netstress.c via tst_netload()
(the rest of the tests).
The old legacy tests are using various TCP/UDP client-server and ICMP sender tools from testcases/network/stress/ns-tools/.  To decide whether they can be safely deleted or should be kept (and cleanup and possibly migrated to ipsec_lib.sh) is whether their C tools they use test other kernel functionality than netstress.c and ping.
There is also ns-igmp_querier.c, which is used in mcast-lib.sh, which should be cleaned (probably not a candidate to put the code into netstress.c), but that's another case.
Once this all is solved, several shell scripts in testcases/network/stress/ns-tools/ can be deleted.
@coolgw particularly easy should be testcases/network/tcp_cmds/tcpdump/tcpdump01.sh.

Duplicate issue #565: rsh/rcp does not exist in rhel8 - tests fail
Created: 2019-09-06T19:03:20Z
rcp01.sh    1  TFAIL  :  ltpapicmd.c:188: Test broken: rcp: command not found
rsh01.sh    1  TFAIL  :  ltpapicmd.c:188: Test broken: rsh: command not found
4.18.0-135.el8.ppc64le #1 SMP Fri Aug 16 19:25:25 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux
needs to identify if on rhel8+ and not run rsh/rcp tests

Closing comment (2019-09-08T09:29:46Z): No, we don't fix issues like this by identifying a distro, we rather check whether particular command is available. There is TST_NEEDS_CMDS="rsh", but that's only in new shell API (in tst_test.sh, for network tests used via tst_net.sh). For these tests it's already reported in #128.
There is ongoing rewrite of both C and shell tests, but still many tests need to be rewritten, you're more then welcome to help :).