* [LTP] [PATCH v3 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files
@ 2017-02-16 22:37 Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Petr Vorel @ 2017-02-16 22:37 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] 6+ messages in thread
* [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh
2017-02-16 22:37 [LTP] [PATCH v3 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
@ 2017-02-16 22:37 ` Petr Vorel
2017-02-20 15:46 ` Alexey Kodanev
2017-02-16 22:37 ` [LTP] [PATCH v3 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
2 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2017-02-16 22:37 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v2->v3:
* Use -d as -s has already been used as option for SCTP.
---
testscripts/network.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/testscripts/network.sh b/testscripts/network.sh
index 2d2c6762c..ae9bf6042 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 6mnrstaebcdiTURMFf: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";;
+ d) 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] 6+ messages in thread
* [LTP] [PATCH v3 3/4] network: Minor doc, copyright and whitespace fixes
2017-02-16 22:37 [LTP] [PATCH v3 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
@ 2017-02-16 22:37 ` Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2017-02-16 22:37 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 6135032b9..e67f23304 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 ae9bf6042..6d5765444 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 6mnrstaebcdiTURMFf: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";;
d) 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] 6+ messages in thread
* [LTP] [PATCH v3 4/4] network: migrate rpc_test.sh to use test_net.sh
2017-02-16 22:37 [LTP] [PATCH v3 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
@ 2017-02-16 22:37 ` Petr Vorel
2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2017-02-16 22:37 UTC (permalink / raw)
To: ltp
This fixes missing LTPROOT environment variable.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
I got these errors:
* -c (TI-RPC tests)
rpc_clnt_broadcast 1 TBROK: 'rpc_clnt_broadcast 10.0.0.2 536875000 ' failed on '': 'RPC: Timed out
rpc_svc_destroy 1 TBROK: 'rpc_svc_destroy 10.0.0.2 536875000 ' failed on '': 'rpc_svc_destroy: svc_fd_create: could not retrieve local addr
rpc_svcfd_create 1 TBROK: 'rpc_svcfd_create 10.0.0.2 536875000 ' failed on '': 'rpc_svcfd_create: svc_fd_create: could not retrieve local addr
rpc_xprt_register 1 TBROK: 'rpc_xprt_register 10.0.0.2 536875000 ' failed on '': 'rpc_xprt_register: svc_fd_create: could not retrieve local addr
rpc_xprt_unregister 1 TBROK: 'rpc_xprt_unregister 10.0.0.2 536875000 ' failed on '': 'rpc_xprt_unregister: svc_fd_create: could not retrieve local addr
* -d (TS-RPC tests)
tirpc_authdes_create 1 TBROK: 'tirpc_authdes_create 10.0.0.2 536875000 ' failed on '': '1'
tirpc_authdes_seccreate 1 TBROK: 'tirpc_authdes_seccreate 10.0.0.2 536875000 ' failed on '': '1'
I tested it with libtirpc3 1.0.1-3 from Tumbleweed and with libtirpc1 0.2.5-1.1 on Debian
testing.
---
testcases/network/rpc/rpc-tirpc/rpc_test.sh | 66 ++++++++++-------------------
1 file changed, 22 insertions(+), 44 deletions(-)
diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
index 17fc5ed09..e265725f0 100755
--- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
+++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
@@ -1,6 +1,7 @@
#!/bin/sh
#
# Copyright (c) 2014 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
@@ -17,18 +18,8 @@
# 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=""
CLIENT=""
CLIENT_EXTRA_OPTS=""
@@ -37,38 +28,29 @@ 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"
+ killall -9 $SERVER
+ $CLEANER $PROGNUMNOSVC
fi
}
usage()
{
- echo "USAGE: $0 [-s sprog] -c clprog [ -e extra ]"
- echo ""
- echo "sprog - server program binary"
- echo "clprog - client program binary"
- echo "extra - extra client options"
- echo ""
- echo "This scripts connects to the RHOST host by rsh and starts"
- echo "sprog there. After that it executes clprog passing it the"
- echo "RHOST value."
- echo "After the test completes, this script kills sprog on RHOST"
- echo "and performs a cleaning operation."
- echo ""
- echo "If RHOST is not set, the local host is used."
+ cat << EOF
+USAGE: $0 [-s sprog] -c clprog [ -e extra ]
+
+sprog - server program binary
+clprog - client program binary
+extra - extra client options
+
+This scripts connects to the remote host and starts sprog there. After that it
+executes clprog passing it the remote host value.
+
+After the test completes, this script kills sprog on remote and performs a
+cleaning operation.
+EOF
exit 1
}
@@ -99,21 +81,17 @@ 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" &
+ $SERVER $PROGNUMNOSVC &
sleep "$SERVER_STARTUP_SLEEP"
fi
-"$CLIENT" "$SERVER_HOST" "$PROGNUMNOSVC" $CLIENT_EXTRA_OPTS
-ret=$?
+tst_rhost_run -sc "$CLIENT $(tst_ipaddr) $PROGNUMNOSVC $CLIENT_EXTRA_OPTS"
-if [ "$ret" -eq 0 ]; then
- tst_resm TPASS "Test passed"
-else
- tst_resm TFAIL "Test failed"
-fi
+tst_resm TPASS "Test passed"
tst_exit
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh
2017-02-16 22:37 ` [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
@ 2017-02-20 15:46 ` Alexey Kodanev
2017-02-21 7:13 ` Petr Vorel
0 siblings, 1 reply; 6+ messages in thread
From: Alexey Kodanev @ 2017-02-20 15:46 UTC (permalink / raw)
To: ltp
Hi,
On 17.02.2017 1:37, Petr Vorel wrote:
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes v2->v3:
> * Use -d as -s has already been used as option for SCTP.
> ---
> ...
> echo " -t TCP/IP command tests"
> + echo " -c TI-RPC tests"
> + echo " -s TS-RPC tests"
Changed the above to '-d' option and pushed, thanks!
Best regards,
Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh
2017-02-20 15:46 ` Alexey Kodanev
@ 2017-02-21 7:13 ` Petr Vorel
0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2017-02-21 7:13 UTC (permalink / raw)
To: ltp
Hi Alexey,
> Changed the above to '-d' option and pushed, thanks!
Thanks for push and sorry for this error.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-21 7:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 22:37 [LTP] [PATCH v3 1/4] network: Add 'net.' prefix to TI-RPC and TS-RPC tests files Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 2/4] network: Add TI-RPC and TS-RPC tests into network.sh Petr Vorel
2017-02-20 15:46 ` Alexey Kodanev
2017-02-21 7:13 ` Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 3/4] network: Minor doc, copyright and whitespace fixes Petr Vorel
2017-02-16 22:37 ` [LTP] [PATCH v3 4/4] network: migrate rpc_test.sh to use test_net.sh Petr Vorel
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.