* [LTP] [PATCH 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files
@ 2017-01-31 18:35 Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Petr Vorel @ 2017-01-31 18:35 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
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%)
diff --git a/runtest/rpc_tests b/runtest/net.rpc_tests
similarity index 100%
rename from runtest/rpc_tests
rename to runtest/net.rpc_tests
diff --git a/runtest/tirpc_tests b/runtest/net.tirpc_tests
similarity index 100%
rename from runtest/tirpc_tests
rename to runtest/net.tirpc_tests
diff --git a/testcases/network/rpc/rpc-tirpc/README b/testcases/network/rpc/rpc-tirpc/README
index d87024c41..139162751 100644
--- a/testcases/network/rpc/rpc-tirpc/README
+++ b/testcases/network/rpc/rpc-tirpc/README
@@ -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.
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/4] network: Add TI-RPC and TS-RPC tests into network.sh
2017-01-31 18:35 [LTP] [PATCH 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
@ 2017-01-31 18:35 ` Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
2 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2017-01-31 18:35 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testscripts/network.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/testscripts/network.sh b/testscripts/network.sh
index 2d2c6762c..fce59f576 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -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";;
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 3/4] network: Minor doc, copyright and whitespace fixes
2017-01-31 18:35 [LTP] [PATCH 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
@ 2017-01-31 18:35 ` Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
2 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2017-01-31 18:35 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/lib/test_net.sh | 3 ++-
testscripts/network.sh | 18 +++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 37cc93914..64c17e924 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -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 <pvorel@suse.cz>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
diff --git a/testscripts/network.sh b/testscripts/network.sh
index fce59f576..ada4dec84 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh
2017-01-31 18:35 [LTP] [PATCH 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
@ 2017-01-31 18:35 ` Petr Vorel
2017-02-08 11:48 ` Alexey Kodanev
2 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2017-01-31 18:35 UTC (permalink / raw)
To: ltp
This fixes missing LTPROOT environment variable.
Many tests are failing when using netns.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/dctcp/dctcp01.sh | 1 +
testcases/network/rpc/rpc-tirpc/rpc_test.sh | 29 ++++++-----------------------
2 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/testcases/network/dctcp/dctcp01.sh b/testcases/network/dctcp/dctcp01.sh
index 5c401ce82..97154ca8e 100755
--- a/testcases/network/dctcp/dctcp01.sh
+++ b/testcases/network/dctcp/dctcp01.sh
@@ -1,5 +1,6 @@
#!/bin/sh
# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2017 Petr Vorel <pvorel@suse.cz>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
index 17fc5ed09..30f84c56e 100755
--- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
+++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh
2017-01-31 18:35 ` [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
@ 2017-02-08 11:48 ` Alexey Kodanev
0 siblings, 0 replies; 5+ messages in thread
From: Alexey Kodanev @ 2017-02-08 11:48 UTC (permalink / raw)
To: ltp
Hi Petr,
On 01/31/2017 09:35 PM, Petr Vorel wrote:
> This fixes missing LTPROOT environment variable.
>
> Many tests are failing when using netns.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/network/dctcp/dctcp01.sh | 1 +
> testcases/network/rpc/rpc-tirpc/rpc_test.sh | 29 ++++++-----------------------
> 2 files changed, 7 insertions(+), 23 deletions(-)
>
> diff --git a/testcases/network/dctcp/dctcp01.sh b/testcases/network/dctcp/dctcp01.sh
> index 5c401ce82..97154ca8e 100755
> --- a/testcases/network/dctcp/dctcp01.sh
> +++ b/testcases/network/dctcp/dctcp01.sh
> @@ -1,5 +1,6 @@
> #!/bin/sh
> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
> +# Copyright (c) 2017 Petr Vorel <pvorel@suse.cz>
Is something missing here?
> #
> # This program is free software; you can redistribute it and/or
> # modify it under the terms of the GNU General Public License as
> diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> index 17fc5ed09..30f84c56e 100755
> --- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> +++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> @@ -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`}
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).
> 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" &
tst_rhost_run() has '-b' option to run a command in background.
Thanks,
Alexey
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-08 11:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 18:35 [LTP] [PATCH 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
2017-01-31 18:35 ` [LTP] [PATCH 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
2017-02-08 11:48 ` Alexey Kodanev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.