Remove -R (record route) option from ping because: * IPv6 doesn't support record route; * many hosts ignore or discard the option;
Also, previous version didn't use EXEC_PREFIX to test ping6 Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> --- runtest/ipv6 | 2 +- testcases/network/tcp_cmds/ping/ping01 | 92 ++++++++++++------------------- 2 files changed, 37 insertions(+), 57 deletions(-) diff --git a/runtest/ipv6 b/runtest/ipv6 index 99f0f54..c8071d6 100644 --- a/runtest/ipv6 +++ b/runtest/ipv6 @@ -3,7 +3,7 @@ echo6 export TCbin=$LTPROOT/testcases/network/ipv6/echo6;echo601 finger6 finger601 ftp6 export TCbin=$LTPROOT/testcases/network/ipv6/ftp6; ftp01 perf_lan6 export TCbin=$LTPROOT/testcases/network/ipv6/perf_lan6; perf_lan6 -ping6 ping601 +ping6 ping01 -6 rcp6 export TCbin=$LTPROOT/testcases/network/ipv6/rcp6; rcp01 rlogin6 rlogin01 rsh6 rsh01 diff --git a/testcases/network/tcp_cmds/ping/ping01 b/testcases/network/tcp_cmds/ping/ping01 index ce0dcfb..5266b7c 100755 --- a/testcases/network/tcp_cmds/ping/ping01 +++ b/testcases/network/tcp_cmds/ping/ping01 @@ -1,25 +1,20 @@ #! /bin/sh -#*********************************************************************** +# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved. +# Copyright (c) International Business Machines Corp., 2000 # -# Copyright (c) International Business Machines Corp., 2000 +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -# the 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 to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# -# -# FILE : ping +# 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 # # PURPOSE: To test the basic functionality of the `ping` command. # @@ -30,57 +25,42 @@ # - Modified testcase to use test APIs and also fixed minor bugs # 03/01 Robbie Williamson (robb...@us.ibm.com) # -Ported -# -# -#*********************************************************************** -#----------------------------------------------------------------------- -# -# FUNCTION: do_setup -# -#----------------------------------------------------------------------- +TST_TOTAL=1 +TCID="ping01" + +. test_net.sh do_setup() { - COUNT=${COUNT:-5} - SLEEPTIME=${SLEEPTIME:-1} - PACKETSIZES=${PACKETSIZES:-"8 16 32 64 128 256 512 1024 2048 4064"} + COUNT=${COUNT:-5} + SLEEPTIME=${SLEEPTIME:-1} + PACKETSIZES=${PACKETSIZES:-"8 16 32 64 128 256 512 1024 2048 4064"} - tst_setup + PING_CMD=ping${TST_EXEC_SUFFIX} - exists ping + tst_check_cmds $PING_CMD - RHOST=${RHOST:-127.0.0.1} + RHOST=${RHOST:-127.0.0.1} } - -#----------------------------------------------------------------------- -# -# FUNCTION: do_test -# PURPOSE: Executes the testcases. -# -#----------------------------------------------------------------------- - do_test() { - tst_resm TINFO "ping with $PACKETSIZES ICMP packets" - for packetsize in $PACKETSIZES; do - tst_resm TINFO "calling ping with packet size = $packetsize" - if ! ping -R -c $COUNT -s $packetsize $RHOST 2>&1 1>/dev/null; then - end_testcase "failed: ping -c $COUNT -s $packetsize $RHOST" - fi - sleep $SLEEPTIME - done + tst_resm TINFO "$PING_CMD with $PACKETSIZES ICMP packets" + for packetsize in $PACKETSIZES; do + tst_resm TINFO "call $PING_CMD with packet size = $packetsize" + $PING_CMD -c $COUNT -s $packetsize $RHOST > /dev/null 2>&1 + if [ $? -ne 0 ]; then + tst_resm TFAIL "$PING_CMD -c $COUNT -s $packetsize $RHOST" + return + fi + sleep $SLEEPTIME + done } -#******************************************************************************* -# -# FUNCTION: MAIN -# -#******************************************************************************* -. net_cmdlib.sh +tst_read_opts $* -read_opts $* do_setup do_test -end_testcase + +tst_exit -- 1.7.1 ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list