network: Add 'net.' prefix to TI-RPC and TS-RPC tests files
PATCH 1/4 network: Add 'net.' prefix to TI-RPC and TS-RPC tests files
---
runtest/{rpc_tests => net.rpc_tests} | 0
runtest/{tirpc_tests => net.tirpc_tests} | 0
testcases/network/rpc/rpc-tirpc/README | 4 ++--
3 files changed, 2 insertions(+), 2 deletions(-)
rename runtest/{rpc_tests => net.rpc_tests} (100%)
rename runtest/{tirpc_tests => net.tirpc_tests} (100%)runtest/net.rpc_tests renamed from runtest/rpc_tests +0 -0
runtest/net.tirpc_tests renamed from runtest/tirpc_tests +0 -0
testcases/network/rpc/rpc-tirpc/README +2 -2
@@ -44,8 +44,8 @@ The sources here are modified a bit to use the LTP wrapper - rpc_test.sh - instead of a bunch of scripts from the above web page. The basic group of test cases can be executed from - * runtest/rpc_tests - for TS-RPC testing - * runtest/tirpc_tests - for TI-RPC testing + * runtest/net.rpc_tests - for TS-RPC testing + * runtest/net.tirpc_tests - for TI-RPC testing using the LTP framework (ltp-pan, runltp and etc). Additional test cases (like stress, complex and etc) are to be integrated.
Signature · 1 line
2.11.0
PATCH 2/4 network: Add TI-RPC and TS-RPC tests into network.sh
--- testscripts/network.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
testscripts/network.sh +5 -1
@@ -24,6 +24,8 @@ usage() echo " -r RPC tests" echo " -s SCTP tests" echo " -t TCP/IP command tests" + echo " -c TI-RPC tests" + echo " -s TS-RPC tests" echo " -a Application tests (HTTP, SSH, DNS)" echo " -e Interface stress tests" echo " -b Stress tests with malformed ICMP packets"
@@ -40,7 +42,7 @@ usage() TEST_CASES= -while getopts 6mnrstaebiTURMFf:Vvh OPTION +while getopts 6mnrstaebcsiTURMFf:Vvh OPTION do case $OPTION in 6) TEST_CASES="$TEST_CASES net.ipv6 net.ipv6_lib";;
@@ -49,6 +51,8 @@ do r) TEST_CASES="$TEST_CASES net.rpc" ;; s) TEST_CASES="$TEST_CASES net.sctp" ;; t) TEST_CASES="$TEST_CASES net.tcp_cmds" ;; + c) TEST_CASES="$TEST_CASES net.rpc_tests";; + s) TEST_CASES="$TEST_CASES net.tirpc_tests";; a) TEST_CASES="$TEST_CASES net_stress.appl";; e) TEST_CASES="$TEST_CASES net_stress.interface";; b) TEST_CASES="$TEST_CASES net_stress.broken_ip";;
Signature · 1 line
2.11.0
PATCH 3/4 network: Minor doc, copyright and whitespace fixes
In reply to Petr Vorel--- testcases/lib/test_net.sh | 3 ++- testscripts/network.sh | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-)
testcases/lib/test_net.sh +2 -1
@@ -1,5 +1,6 @@ #!/bin/sh -# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2014-2016 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2016-2017 Petr Vorel <[email protected]> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as
testscripts/network.sh +9 -9
@@ -26,7 +26,7 @@ usage() echo " -t TCP/IP command tests" echo " -c TI-RPC tests" echo " -s TS-RPC tests" - echo " -a Application tests (HTTP, SSH, DNS)" + echo " -a Application stress tests (HTTP, SSH, DNS)" echo " -e Interface stress tests" echo " -b Stress tests with malformed ICMP packets" echo " -i IPsec ICMP stress tests"
@@ -46,11 +46,11 @@ while getopts 6mnrstaebcsiTURMFf:Vvh OPTION do case $OPTION in 6) TEST_CASES="$TEST_CASES net.ipv6 net.ipv6_lib";; - m) TEST_CASES="$TEST_CASES net.multicast" ;; - n) TEST_CASES="$TEST_CASES net.nfs" ;; - r) TEST_CASES="$TEST_CASES net.rpc" ;; - s) TEST_CASES="$TEST_CASES net.sctp" ;; - t) TEST_CASES="$TEST_CASES net.tcp_cmds" ;; + m) TEST_CASES="$TEST_CASES net.multicast";; + n) TEST_CASES="$TEST_CASES net.nfs";; + r) TEST_CASES="$TEST_CASES net.rpc";; + s) TEST_CASES="$TEST_CASES net.sctp";; + t) TEST_CASES="$TEST_CASES net.tcp_cmds";; c) TEST_CASES="$TEST_CASES net.rpc_tests";; s) TEST_CASES="$TEST_CASES net.tirpc_tests";; a) TEST_CASES="$TEST_CASES net_stress.appl";;
@@ -62,10 +62,10 @@ do R) TEST_CASES="$TEST_CASES net_stress.route";; M) TEST_CASES="$TEST_CASES net_stress.multicast";; F) TEST_CASES="$TEST_CASES net.features";; - f) TEST_CASES=${OPTARG} ;; + f) TEST_CASES=${OPTARG};; V|v) VERBOSE="yes";; - h) usage; exit 0 ;; - *) echo "Error: invalid option..."; usage; exit 1 ;; + h) usage; exit 0;; + *) echo "Error: invalid option..."; usage; exit 1;; esac done
Signature · 1 line
2.11.0
PATCH 4/4 network: migrate rpc_test.sh to use test_net.sh
In reply to Petr VorelThis fixes missing LTPROOT environment variable.
Many tests are failing when using netns.
--- testcases/network/dctcp/dctcp01.sh | 1 + testcases/network/rpc/rpc-tirpc/rpc_test.sh | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 23 deletions(-)
testcases/network/dctcp/dctcp01.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2017 Petr Vorel <[email protected]> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as
testcases/network/rpc/rpc-tirpc/rpc_test.sh +6 -23
@@ -17,16 +17,7 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # This is a wrapper script to execute tests from the RPC/TI-RPC tests -# suite (http://nfsv4.bullopensource.org/doc/rpc_testsuite.php) in LTP -# -# This wrapper uses the RHOST environment variable: -# -# If the RHOST variable is set, then the rpc server instance (if needed) -# is started on RHOST, using rsh, and the client program is passed -# the RHOST value. -# -# If the RHOST variable is not set, then the rpc server instance (if needed) -# is started on the local host, and the client program is passed `hostname`. +# suite (http://nfsv4.bullopensource.org/doc/rpc_testsuite.php) in LTP. SERVER_HOST=${RHOST:-`hostname`} SERVER=""
@@ -37,20 +28,11 @@ CLEANER="" PROGNUMNOSVC=536875000 SERVER_STARTUP_SLEEP=1 -run_cmd() -{ - if [ ! -z "$RHOST" ]; then - rsh -n "$RHOST" "$1" - else - $1 - fi -} - cleanup() { if [ ! -z "$SERVER" ]; then - run_cmd "killall -9 $SERVER" - run_cmd "$CLEANER $PROGNUMNOSVC" + tst_rhost_run -c "killall -9 $SERVER" + tst_rhost_run -c "$CLEANER $PROGNUMNOSVC" fi }
@@ -99,11 +81,12 @@ fi TCID="$CLIENT" TST_TOTAL=1 TST_COUNT=1 -. test.sh TST_CLEANUP=cleanup +. test_net.sh + if [ ! -z "$SERVER" ]; then - run_cmd "$SERVER $PROGNUMNOSVC" & + tst_rhost_run -c "$SERVER $PROGNUMNOSVC" & sleep "$SERVER_STARTUP_SLEEP" fi
Signature · 1 line
2.11.0
PATCH 4/4 network: migrate rpc_test.sh to use test_net.sh
Hi Petr,
Quoted 15 lines · Petr Vorel
This fixes missing LTPROOT environment variable.
Many tests are failing when using netns.
Signed-off-by Petr Vorel <[email protected]>--- testcases/network/dctcp/dctcp01.sh | 1 + testcases/network/rpc/rpc-tirpc/rpc_test.sh | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 23 deletions(-)testcases/network/dctcp/dctcp01.sh +0
-0
testcases/network/dctcp/dctcp01.sh line 3
Quoted 3 lines
testcases/network/dctcp/dctcp01.sh +1
-0@@ -1,5 +1,6 @@ #!/bin/sh # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2017 Petr Vorel <[email protected]>
Is something missing here?
Quoted 14 lines
testcases/network/dctcp/dctcp01.sh +0
-0# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License astestcases/network/rpc/rpc-tirpc/rpc_test.sh +0
-3@@ -17,16 +17,7 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # This is a wrapper script to execute tests from the RPC/TI-RPC tests -# suite (http://nfsv4.bullopensource.org/doc/rpc_testsuite.php) in LTP -# -# This wrapper uses the RHOST environment variable:
testcases/network/rpc/rpc-tirpc/rpc_test.sh line 22
Quoted 10 lines
testcases/network/rpc/rpc-tirpc/rpc_test.sh +1
-7-# -# If the RHOST variable is set, then the rpc server instance (if needed) -# is started on RHOST, using rsh, and the client program is passed -# the RHOST value. -# -# If the RHOST variable is not set, then the rpc server instance (if needed) -# is started on the local host, and the client program is passed `hostname`. +# suite (http://nfsv4.bullopensource.org/doc/rpc_testsuite.php) in LTP. SERVER_HOST=${RHOST:-`hostname`}
I would remove this as well as the corresponded usage of the variable in the test, because RHOST not used directly but via tst_rhost_run(). So if we need IP addresess for local and remote machine we can get them with $(tst_ipaddr) and $(tst_ipaddr rhost).
Quoted 26 lines
testcases/network/rpc/rpc-tirpc/rpc_test.sh +2
-11SERVER=""@@ -37,20 +28,11 @@ CLEANER="" PROGNUMNOSVC=536875000 SERVER_STARTUP_SLEEP=1 -run_cmd() -{ - if [ ! -z "$RHOST" ]; then - rsh -n "$RHOST" "$1" - else - $1 - fi -} - cleanup() { if [ ! -z "$SERVER" ]; then - run_cmd "killall -9 $SERVER" - run_cmd "$CLEANER $PROGNUMNOSVC" + tst_rhost_run -c "killall -9 $SERVER" + tst_rhost_run -c "$CLEANER $PROGNUMNOSVC" fi }@@ -99,11 +81,12 @@ fi TCID="$CLIENT"
testcases/network/rpc/rpc-tirpc/rpc_test.sh fi · line 89
Quoted 10 lines
testcases/network/rpc/rpc-tirpc/rpc_test.sh +3
-2TST_TOTAL=1 TST_COUNT=1 -. test.sh TST_CLEANUP=cleanup +. test_net.sh + if [ ! -z "$SERVER" ]; then - run_cmd "$SERVER $PROGNUMNOSVC" & + tst_rhost_run -c "$SERVER $PROGNUMNOSVC" &
tst_rhost_run() has '-b' option to run a command in background.
Thanks,
Alexey