Message ID | 20200710172044.21592-3-pvorel@suse.cz |
---|---|
State | Accepted |
Headers | show |
Series | tst_net.sh: Remove rsh, update docs add debug & test | expand |
On 2020/7/11 1:20, Petr Vorel wrote: > for LTP_RSH (rsh fallback) it's better to use ssh instead of rsh by > default, using current user. > > + update docs. > > Suggested-by: Alexey Kodanev <alexey.kodanev@oracle.com> > Signed-off-by: Petr Vorel <pvorel@suse.cz> > --- > testcases/lib/tst_net.sh | 2 +- > testcases/network/stress/README | 9 ++++----- > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh > index 7ba267eda..0a8b2a8ca 100644 > --- a/testcases/lib/tst_net.sh > +++ b/testcases/lib/tst_net.sh > @@ -838,7 +838,7 @@ tst_default_max_pkt() > export RHOST="$RHOST" > export PASSWD="${PASSWD:-}" > # Don't use it in new tests, use tst_rhost_run() from tst_net.sh instead. > -export LTP_RSH="${LTP_RSH:-rsh -n}" > +export LTP_RSH="${LTP_RSH:-ssh -nq}" Hi Petr, Some very old stress tests use check_envval(instead of tst_net.sh) to init LTP_RSH, Do you think if we need to change it as well: -------------------------------------- # LTP_RSH LTP_RSH=${LTP_RSH:=} if [ x"${LTP_RSH}" = x ]; then LTP_RSH="rsh -n" elif [ "$LTP_RSH" = "rsh" ]; then LTP_RSH="rsh -n" fi -------------------------------------- Thanks, Xiao Yang > > # Test Links > # IPV{4,6}_{L,R}HOST can be set with or without prefix (e.g. IP or IP/prefix), > diff --git a/testcases/network/stress/README b/testcases/network/stress/README > index bc51a4cc9..b9537b1ce 100644 > --- a/testcases/network/stress/README > +++ b/testcases/network/stress/README > @@ -48,10 +48,9 @@ To run the network stress testcases, use network.sh script, located in > testscripts directory. For documentation about using network.sh see INSTALL > and testcases/network/README.md > > -Unfortunately some stress tests still depend on rsh for accessing remote host, even > -you decide to use SSH or network namespaces with network.sh. > -Instead of rsh, you can use ssh to set the environment variable LTP_RSH. > -Please refer the `Environment Variable' section of this document. > +Some stress tests originally designed to be tested with rsh for accessing > +remote host are now using ssh using the current user. Old behavior (using rsh > +can be achieved with setting LTP_RSH variable). > > The behaviour of network stress tests is configurable with environment > variables (See `Environment Variable' section). > @@ -146,7 +145,7 @@ Optional environment variables > ------------------------------ > > o LTP_RSH > - The name of the remote shell command, namely rsh or ssh. > + The name of the remote shell command, namely ssh (the default) or rsh. > In ether case, the remote host must accept the login from the local host > without password. >
On 2020/7/20 16:17, Xiao Yang wrote: > On 2020/7/11 1:20, Petr Vorel wrote: >> for LTP_RSH (rsh fallback) it's better to use ssh instead of rsh by >> default, using current user. >> >> + update docs. >> >> Suggested-by: Alexey Kodanev<alexey.kodanev@oracle.com> >> Signed-off-by: Petr Vorel<pvorel@suse.cz> >> --- >> testcases/lib/tst_net.sh | 2 +- >> testcases/network/stress/README | 9 ++++----- >> 2 files changed, 5 insertions(+), 6 deletions(-) >> >> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh >> index 7ba267eda..0a8b2a8ca 100644 >> --- a/testcases/lib/tst_net.sh >> +++ b/testcases/lib/tst_net.sh >> @@ -838,7 +838,7 @@ tst_default_max_pkt() >> export RHOST="$RHOST" >> export PASSWD="${PASSWD:-}" >> # Don't use it in new tests, use tst_rhost_run() from tst_net.sh instead. >> -export LTP_RSH="${LTP_RSH:-rsh -n}" >> +export LTP_RSH="${LTP_RSH:-ssh -nq}" > Hi Petr, > > Some very old stress tests use check_envval(instead of tst_net.sh) to > init LTP_RSH, > Do you think if we need to change it as well: > -------------------------------------- > # LTP_RSH > LTP_RSH=${LTP_RSH:=} > if [ x"${LTP_RSH}" = x ]; then > LTP_RSH="rsh -n" > elif [ "$LTP_RSH" = "rsh" ]; then > LTP_RSH="rsh -n" > fi > -------------------------------------- testscripts/exportfs.sh, tcp_cmds/ftp/ftp01.sh and nfsv4/acl/runtest also use rsh command directly. > Thanks, > Xiao Yang >> >> # Test Links >> # IPV{4,6}_{L,R}HOST can be set with or without prefix (e.g. IP or IP/prefix), >> diff --git a/testcases/network/stress/README b/testcases/network/stress/README >> index bc51a4cc9..b9537b1ce 100644 >> --- a/testcases/network/stress/README >> +++ b/testcases/network/stress/README >> @@ -48,10 +48,9 @@ To run the network stress testcases, use network.sh script, located in >> testscripts directory. For documentation about using network.sh see INSTALL >> and testcases/network/README.md >> >> -Unfortunately some stress tests still depend on rsh for accessing remote host, even >> -you decide to use SSH or network namespaces with network.sh. >> -Instead of rsh, you can use ssh to set the environment variable LTP_RSH. >> -Please refer the `Environment Variable' section of this document. >> +Some stress tests originally designed to be tested with rsh for accessing >> +remote host are now using ssh using the current user. Old behavior (using rsh >> +can be achieved with setting LTP_RSH variable). >> >> The behaviour of network stress tests is configurable with environment >> variables (See `Environment Variable' section). >> @@ -146,7 +145,7 @@ Optional environment variables >> ------------------------------ >> >> o LTP_RSH >> - The name of the remote shell command, namely rsh or ssh. >> + The name of the remote shell command, namely ssh (the default) or rsh. >> In ether case, the remote host must accept the login from the local host >> without password. >> > > >
Hi Yang, > Hi Petr, > Some very old stress tests use check_envval(instead of tst_net.sh) to > init LTP_RSH, > Do you think if we need to change it as well: > -------------------------------------- > # LTP_RSH > LTP_RSH=${LTP_RSH:=} > if [ x"${LTP_RSH}" = x ]; then > LTP_RSH="rsh -n" > elif [ "$LTP_RSH" = "rsh" ]; then > LTP_RSH="rsh -n" > fi > -------------------------------------- No, I wouldn't touch this legacy code. The goal is to rewrite this old code, there is a ticket for it: https://github.com/linux-test-project/ltp/issues/440 > Thanks, > Xiao Yang Kind regards, Petr
> testscripts/exportfs.sh, tcp_cmds/ftp/ftp01.sh and nfsv4/acl/runtest also > use rsh command directly. That's a sign of legacy code with questionable usability. Although runltp-ng [1] has not been merged yet, I'm going to sent RFC patch to remove exportfs.sh. I'll also send RFC to drop network/nfsv4 (NFS maintainers use their own pynfs [2] anyway). [1] https://github.com/metan-ucw/runltp-ng [2] http://git.linux-nfs.org/?p=bfields/pynfs.git;a=summary Kind regards, Petr
diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index 7ba267eda..0a8b2a8ca 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -838,7 +838,7 @@ tst_default_max_pkt() export RHOST="$RHOST" export PASSWD="${PASSWD:-}" # Don't use it in new tests, use tst_rhost_run() from tst_net.sh instead. -export LTP_RSH="${LTP_RSH:-rsh -n}" +export LTP_RSH="${LTP_RSH:-ssh -nq}" # Test Links # IPV{4,6}_{L,R}HOST can be set with or without prefix (e.g. IP or IP/prefix), diff --git a/testcases/network/stress/README b/testcases/network/stress/README index bc51a4cc9..b9537b1ce 100644 --- a/testcases/network/stress/README +++ b/testcases/network/stress/README @@ -48,10 +48,9 @@ To run the network stress testcases, use network.sh script, located in testscripts directory. For documentation about using network.sh see INSTALL and testcases/network/README.md -Unfortunately some stress tests still depend on rsh for accessing remote host, even -you decide to use SSH or network namespaces with network.sh. -Instead of rsh, you can use ssh to set the environment variable LTP_RSH. -Please refer the `Environment Variable' section of this document. +Some stress tests originally designed to be tested with rsh for accessing +remote host are now using ssh using the current user. Old behavior (using rsh +can be achieved with setting LTP_RSH variable). The behaviour of network stress tests is configurable with environment variables (See `Environment Variable' section). @@ -146,7 +145,7 @@ Optional environment variables ------------------------------ o LTP_RSH - The name of the remote shell command, namely rsh or ssh. + The name of the remote shell command, namely ssh (the default) or rsh. In ether case, the remote host must accept the login from the local host without password.
for LTP_RSH (rsh fallback) it's better to use ssh instead of rsh by default, using current user. + update docs. Suggested-by: Alexey Kodanev <alexey.kodanev@oracle.com> Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/lib/tst_net.sh | 2 +- testcases/network/stress/README | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-)