network/ping01: rename file and update runtest files
PATCH 1/3 network/ping01: rename file and update runtest files
--- runtest/net.ipv6 | 2 +- runtest/net.tcp_cmds | 2 +- testcases/network/tcp_cmds/ping/Makefile | 2 +- testcases/network/tcp_cmds/ping/ping01 | 61 ----------------------------- testcases/network/tcp_cmds/ping/ping01.sh | 61 +++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 64 deletions(-) delete mode 100755 testcases/network/tcp_cmds/ping/ping01 create mode 100755 testcases/network/tcp_cmds/ping/ping01.sh
runtest/net.ipv6 +1 -1
@@ -1,5 +1,5 @@ #DESCRIPTION:IPV6 related tests -ping601 ping01 -6 +ping601 ping01.sh -6 sendfile601 sendfile01 -6 tcpdump601 tcpdump01 -6 tracepath601 tracepath01.sh -6
runtest/net.tcp_cmds +1 -1
@@ -10,7 +10,7 @@ finger finger01 ftp export TCbin=$LTPROOT/testcases/network/tcp_cmds/ftp; ftp01 host host01 netstat netstat01 -ping export LTPROOT; ping01 +ping01 ping01.sh rcp export TCbin=$LTPROOT/testcases/network/tcp_cmds/rcp; rcp01 rdist export TCbin=$LTPROOT/testcases/network/tcp_cmds/rdist; rdist01 rlogin rlogin01
testcases/network/tcp_cmds/ping/Makefile +1 -1
@@ -24,7 +24,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/env_pre.mk -INSTALL_TARGETS := ping01 +INSTALL_TARGETS := ping01.sh MAKE_TARGETS :=
testcases/network/tcp_cmds/ping/ping01 deleted +0 -61
61 lines not on this page · raw message
testcases/network/tcp_cmds/ping/ping01.sh new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 2/3 network/ping01: use ROD_SILENT and report test result
--- testcases/network/tcp_cmds/ping/ping01.sh | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-)
testcases/network/tcp_cmds/ping/ping01.sh +5 -8
@@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) 2014-2016 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2000 # # This program is free software; you can redistribute it and/or
@@ -13,8 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # PURPOSE: To test the basic functionality of the `ping` command. #
@@ -47,12 +46,10 @@ do_test() local ipaddr=$(tst_ipaddr rhost) for packetsize in $PACKETSIZES; do tst_resm TINFO "call $PING_CMD with packet size = $packetsize" - $PING_CMD -c $COUNT -s $packetsize $ipaddr > /dev/null 2>&1 - if [ $? -ne 0 ]; then - tst_resm TFAIL "$PING_CMD -c $COUNT -s $packetsize $ipaddr" - return - fi + ROD_SILENT $PING_CMD -c $COUNT -s $packetsize $ipaddr done + + tst_resm TPASS "$PING_CMD test completed" } do_setup
Signature · 1 line
1.7.1
PATCH 2/3 network/ping01: use ROD_SILENT and report test result
Hi!
testcases/network/tcp_cmds/ping/ping01.sh do_test() · line 49
Quoted 10 lines
testcases/network/tcp_cmds/ping/ping01.sh +1
-5@@ -47,12 +46,10 @@ do_test() local ipaddr=$(tst_ipaddr rhost) for packetsize in $PACKETSIZES; do tst_resm TINFO "call $PING_CMD with packet size = $packetsize" - $PING_CMD -c $COUNT -s $packetsize $ipaddr > /dev/null 2>&1 - if [ $? -ne 0 ]; then - tst_resm TFAIL "$PING_CMD -c $COUNT -s $packetsize $ipaddr" - return - fi + ROD_SILENT $PING_CMD -c $COUNT -s $packetsize $ipaddr
What about we use the EXPECT_PASS here? The ROD_SILENT would produce TBROK instead of TFAIL in case of failure.
I know that EXPECT_PASS wouldn't exit the test on first failure, do we really need that anyway? And it also wouldn't silence the ping output, which shouldn't be so much of a problem since the $COUNT is small.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 2/3 network/ping01: use ROD_SILENT and report test result
Hi,
Quoted 14 lines · Cyril Hrubis
Hi!
testcases/network/tcp_cmds/ping/ping01.sh do_test() · line 49
Quoted 10 lines
testcases/network/tcp_cmds/ping/ping01.sh +1
-5@@ -47,12 +46,10 @@ do_test() local ipaddr=$(tst_ipaddr rhost) for packetsize in $PACKETSIZES; do tst_resm TINFO "call $PING_CMD with packet size = $packetsize" - $PING_CMD -c $COUNT -s $packetsize $ipaddr > /dev/null 2>&1 - if [ $? -ne 0 ]; then - tst_resm TFAIL "$PING_CMD -c $COUNT -s $packetsize $ipaddr" - return - fi + ROD_SILENT $PING_CMD -c $COUNT -s $packetsize $ipaddrWhat about we use the
EXPECT_PASShere? TheROD_SILENTwould produce TBROK instead of TFAIL in case of failure.
Quoted 3 lines
I know that
EXPECT_PASSwouldn't exit the test on first failure, do we really need that anyway? And it also wouldn't silence the ping output, which shouldn't be so much of a problem since the $COUNT is small.
Yes, $COUNT is small but we should multiply it by $PACKETSIZES. Even with '-q' there will be a lot of output.
What about adding redirection to /dev/null and removing tst_resm() as below:
-TST_TOTAL=1
+TST_TOTAL=10
TCID="ping01"
. test_net.sh
@@ -45,11 +45,8 @@ do_test()
tst_resm TINFO "$PING_CMD with $PACKETSIZES ICMP packets" local ipaddr=$(tst_ipaddr rhost)
for packetsize in $PACKETSIZES; do
- tst_resm TINFO "call $PING_CMD with packet size =
$packetsize"
- ROD_SILENT $PING_CMD -c $COUNT -s $packetsize $ipaddr
+ EXPECT_PASS $PING_CMD -c $COUNT -s $packetsize $ipaddr
\>/dev/null
done
-
- tst_resm TPASS "$PING_CMD test completed"
}
Thanks,
Alexey
PATCH 2/3 network/ping01: use ROD_SILENT and report test result
Hi!
Quoted 19 lines
Yes, $COUNT is small but we should multiply it by $PACKETSIZES. Even with '-q' there will be a lot of output.
What about adding redirection to/dev/nulland removingtst_resm()as below:testcases/network/tcp_cmds/ping/ping01.sh +1
-2-TST_TOTAL=1 +TST_TOTAL=10 TCID="ping01" . test_net.sh@@ -45,11 +45,8 @@ do_test() tst_resm TINFO "$PING_CMD with $PACKETSIZES ICMP packets" local ipaddr=$(tst_ipaddr rhost) for packetsize in $PACKETSIZES; do - tst_resm TINFO "call $PING_CMD with packet size =$packetsize"
(quoted diff) +1
-1- ROD_SILENT $PING_CMD -c $COUNT -s $packetsize $ipaddr + EXPECT_PASS $PING_CMD -c $COUNT -s $packetsize $ipaddr\>/dev/null
done
Review
Quoted 3 lines
(quoted diff) +0
-2- - tst_resm TPASS "$PING_CMD test completed" }
Looks good.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 3/3 network/ping02: add new flood ping test
In reply to Alexey Kodanev* test sends packets without delay;
* packets filled out with a predefined pattern.
--- runtest/net.ipv6 | 1 + runtest/net.tcp_cmds | 1 + testcases/network/tcp_cmds/ping/Makefile | 3 +- testcases/network/tcp_cmds/ping/ping02.sh | 50 +++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletions(-) create mode 100755 testcases/network/tcp_cmds/ping/ping02.sh
runtest/net.ipv6 +1 -0
@@ -1,5 +1,6 @@ #DESCRIPTION:IPV6 related tests ping601 ping01.sh -6 +ping602 ping02.sh -6 sendfile601 sendfile01 -6 tcpdump601 tcpdump01 -6 tracepath601 tracepath01.sh -6
runtest/net.tcp_cmds +1 -0
@@ -11,6 +11,7 @@ ftp export TCbin=$LTPROOT/testcases/network/tcp_cmds/ftp; ftp01 host host01 netstat netstat01 ping01 ping01.sh +ping02 ping02.sh rcp export TCbin=$LTPROOT/testcases/network/tcp_cmds/rcp; rcp01 rdist export TCbin=$LTPROOT/testcases/network/tcp_cmds/rdist; rdist01 rlogin rlogin01
testcases/network/tcp_cmds/ping/Makefile +2 -1
@@ -24,7 +24,8 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/env_pre.mk -INSTALL_TARGETS := ping01.sh +INSTALL_TARGETS := ping01.sh \ + ping02.sh MAKE_TARGETS :=
testcases/network/tcp_cmds/ping/ping02.sh new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
1.7.1