Skip to content

Commit

Permalink
test_net.sh: don't waste time waiting 1 sec in tst_ping()
Browse files Browse the repository at this point in the history
The current user of this function is 'icmp-uni-basic.sh' ipsec test
group that includes 17 tests. Usually, it takes about 50 seconds for
each test run. This change allows to run the same test in ~5 seconds
because interval is 0 and default number of packets transmitted for
each size parameter increased from 10 to 500.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
  • Loading branch information
akodanev committed Oct 13, 2016
1 parent 5cd7b8b commit 9272a23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testcases/lib/test_net.sh
Expand Up @@ -323,7 +323,7 @@ tst_netload()
tst_ping()
{
# The max number of ICMP echo request
PING_MAX=${PING_MAX:-"10"}
PING_MAX=${PING_MAX:-"500"}

local src_iface=${1:-"$(tst_iface)"}
local dst_addr=${2:-"$(tst_ipaddr rhost)"}; shift 2
Expand All @@ -333,7 +333,7 @@ tst_ping()
# ping cmd use 56 as default message size
for size in ${msg_sizes:-"56"}; do
ping$TST_IPV6 -I $src_iface -c $PING_MAX $dst_addr \
-s $size > /dev/null 2>&1
-s $size -i 0 > /dev/null 2>&1
ret=$?
if [ $ret -eq 0 ]; then
tst_resm TINFO "tst_ping IPv${TST_IPV6:-4} msg_size $size pass"
Expand Down

0 comments on commit 9272a23

Please sign in to comment.