network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
--- runtest/network_stress.icmp | 29 ++--- testcases/network/stress/icmp/icmp-multi-diffip.sh | 138 +++++++++++++++++++++ 2 files changed, 153 insertions(+), 14 deletions(-) create mode 100755 testcases/network/stress/icmp/icmp-multi-diffip.sh
runtest/network_stress.icmp +15 -14
@@ -36,21 +36,22 @@ icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 icmp6-uni-basic06 icmp-uni-basic.sh -6 -p ipcomp -m transport -s "10 100 1000 10000 65000" icmp6-uni-basic07 icmp-uni-basic.sh -6 -p ipcomp -m tunnel -s "10 100 1000 10000 65000" -icmp4-multi-diffip01 icmp4-multi-diffip01 -icmp4-multi-diffip02 icmp4-multi-diffip02 -icmp4-multi-diffip03 icmp4-multi-diffip03 -icmp4-multi-diffip04 icmp4-multi-diffip04 -icmp4-multi-diffip05 icmp4-multi-diffip05 -icmp4-multi-diffip06 icmp4-multi-diffip06 -icmp4-multi-diffip07 icmp4-multi-diffip07 +# networkstress.sh set IP_TOTAL=10000 by default, which is too much for these tests +icmp4-multi-diffip01 icmp-multi-diffip.sh -n 100 +icmp4-multi-diffip02 icmp-multi-diffip.sh -n 100 -p ah -m transport +icmp4-multi-diffip03 icmp-multi-diffip.sh -n 100 -p ah -m tunnel +icmp4-multi-diffip04 icmp-multi-diffip.sh -n 100 -p esp -m transport +icmp4-multi-diffip05 icmp-multi-diffip.sh -n 100 -p esp -m tunnel +icmp4-multi-diffip06 icmp-multi-diffip.sh -n 100 -p ipcomp -m transport +icmp4-multi-diffip07 icmp-multi-diffip.sh -n 100 -p ipcomp -m tunnel -icmp6-multi-diffip01 icmp6-multi-diffip01 -icmp6-multi-diffip02 icmp6-multi-diffip02 -icmp6-multi-diffip03 icmp6-multi-diffip03 -icmp6-multi-diffip04 icmp6-multi-diffip04 -icmp6-multi-diffip05 icmp6-multi-diffip05 -icmp6-multi-diffip06 icmp6-multi-diffip06 -icmp6-multi-diffip07 icmp6-multi-diffip07 +icmp6-multi-diffip01 icmp-multi-diffip.sh -6 -n 100 +icmp6-multi-diffip02 icmp-multi-diffip.sh -6 -n 100 -p ah -m transport +icmp6-multi-diffip03 icmp-multi-diffip.sh -6 -n 100 -p ah -m tunnel +icmp6-multi-diffip04 icmp-multi-diffip.sh -6 -n 100 -p esp -m transport +icmp6-multi-diffip05 icmp-multi-diffip.sh -6 -n 100 -p esp -m tunnel +icmp6-multi-diffip06 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m transport +icmp6-multi-diffip07 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m tunnel icmp4-multi-diffnic01 icmp4-multi-diffnic01 icmp4-multi-diffnic02 icmp4-multi-diffnic02
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +138 -0
138 lines not on this page · raw message
Signature · 1 line
2.5.5
PATCH 2/4 network/stress/icmp: remove old multi-diffip/* tests
multi-diffip/* tests have been rewritten and the new version can be found in icmp/icmp-multi-diffip.sh.
--- .../stress/icmp/multi-diffip/00_Descriptions.txt | 56 --- .../network/stress/icmp/multi-diffip/Makefile | 31 -- .../stress/icmp/multi-diffip/icmp4-multi-diffip01 | 378 --------------------- .../stress/icmp/multi-diffip/icmp4-multi-diffip02 | 66 ---- .../stress/icmp/multi-diffip/icmp4-multi-diffip03 | 67 ---- .../stress/icmp/multi-diffip/icmp4-multi-diffip04 | 66 ---- .../stress/icmp/multi-diffip/icmp4-multi-diffip05 | 67 ---- .../stress/icmp/multi-diffip/icmp4-multi-diffip06 | 67 ---- .../stress/icmp/multi-diffip/icmp4-multi-diffip07 | 66 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip01 | 56 --- .../stress/icmp/multi-diffip/icmp6-multi-diffip02 | 66 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip03 | 67 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip04 | 66 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip05 | 67 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip06 | 67 ---- .../stress/icmp/multi-diffip/icmp6-multi-diffip07 | 66 ---- 16 files changed, 1319 deletions(-) delete mode 100644 testcases/network/stress/icmp/multi-diffip/00_Descriptions.txt delete mode 100644 testcases/network/stress/icmp/multi-diffip/Makefile delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip01 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip02 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip03 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip04 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip05 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip06 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip07 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip01 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip02 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip03 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip04 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip05 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip06 delete mode 100644 testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip07
testcases/network/stress/icmp/multi-diffip/00_Descriptions.txt deleted +0 -56
@@ -1,56 +0,0 @@ -Verify that the kernel is not crashed with receiving and sending various -size of ICMP message at the different IP address(alias) simultaneously - -icmp4-multi-diffip01 - IPv4 - -icmp4-multi-diffip02 - IPv4 - IPsec [ AH / transport ] - -icmp4-multi-diffip03 - IPv4 - IPsec [ AH / tunnel ] - -icmp4-multi-diffip04 - IPv4 - IPsec [ ESP / transport ] - -icmp4-multi-diffip05 - IPv4 - IPsec [ ESP / tunnel ] - -icmp4-multi-diffip06 - IPv4 - IPcomp [ transport ] - -icmp4-multi-diffip07 - IPv4 - IPcomp [ tunnel ] - -icmp6-multi-diffip01 - IPv6 - -icmp6-multi-diffip02 - IPv6 - IPsec [ AH / transport ] - -icmp6-multi-diffip03 - IPv6 - IPsec [ AH / tunnel ] - -icmp6-multi-diffip04 - IPv6 - IPsec [ ESP / transport ] - -icmp6-multi-diffip05 - IPv6 - IPsec [ ESP / tunnel ] - -icmp6-multi-diffip06 - IPv6 - IPcomp [ transport ] - -icmp6-multi-diffip07 - IPv6 - IPcomp [ tunnel ]
testcases/network/stress/icmp/multi-diffip/Makefile deleted +0 -31
@@ -1,31 +0,0 @@ -# -# network/stress/icmp/multi-diffip testcases Makefile. -# -# Copyright (C) 2009, Cisco Systems Inc. -# -# 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 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. -# -# Garrett Cooper, October 2009 -# - -top_srcdir ?= ../../../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -INSTALL_TARGETS := icmp* - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip01 deleted +0 -378
378 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip02 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip03 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip04 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip05 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip06 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp4-multi-diffip07 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip01 deleted +0 -56
56 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip02 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip03 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip04 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip05 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip06 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffip/icmp6-multi-diffip07 deleted +0 -66
66 lines not on this page · raw message
Signature · 1 line
2.5.5
PATCH 3/4 network/stress/icmp: add icmp-multi-diffnic.sh to implement diffnic stress test
In reply to Hangbin Liu--- runtest/network_stress.icmp | 28 ++-- .../network/stress/icmp/icmp-multi-diffnic.sh | 153 +++++++++++++++++++++ 2 files changed, 167 insertions(+), 14 deletions(-) create mode 100755 testcases/network/stress/icmp/icmp-multi-diffnic.sh
runtest/network_stress.icmp +14 -14
@@ -53,18 +53,18 @@ icmp6-multi-diffip05 icmp-multi-diffip.sh -6 -n 100 -p esp -m tunnel icmp6-multi-diffip06 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m transport icmp6-multi-diffip07 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m tunnel -icmp4-multi-diffnic01 icmp4-multi-diffnic01 -icmp4-multi-diffnic02 icmp4-multi-diffnic02 -icmp4-multi-diffnic03 icmp4-multi-diffnic03 -icmp4-multi-diffnic04 icmp4-multi-diffnic04 -icmp4-multi-diffnic05 icmp4-multi-diffnic05 -icmp4-multi-diffnic06 icmp4-multi-diffnic06 -icmp4-multi-diffnic07 icmp4-multi-diffnic07 +icmp4-multi-diffnic01 icmp-multi-diffnic.sh +icmp4-multi-diffnic02 icmp-multi-diffnic.sh -p ah -m transport +icmp4-multi-diffnic03 icmp-multi-diffnic.sh -p ah -m tunnel +icmp4-multi-diffnic04 icmp-multi-diffnic.sh -p esp -m transport +icmp4-multi-diffnic05 icmp-multi-diffnic.sh -p esp -m tunnel +icmp4-multi-diffnic06 icmp-multi-diffnic.sh -p ipcomp -m transport +icmp4-multi-diffnic07 icmp-multi-diffnic.sh -p ipcomp -m tunnel -icmp6-multi-diffnic01 icmp6-multi-diffnic01 -icmp6-multi-diffnic02 icmp6-multi-diffnic02 -icmp6-multi-diffnic03 icmp6-multi-diffnic03 -icmp6-multi-diffnic04 icmp6-multi-diffnic04 -icmp6-multi-diffnic05 icmp6-multi-diffnic05 -icmp6-multi-diffnic06 icmp6-multi-diffnic06 -icmp6-multi-diffnic07 icmp6-multi-diffnic07 +icmp6-multi-diffnic01 icmp-multi-diffnic.sh -6 +icmp6-multi-diffnic02 icmp-multi-diffnic.sh -6 -p ah -m transport +icmp6-multi-diffnic03 icmp-multi-diffnic.sh -6 -p ah -m tunnel +icmp6-multi-diffnic04 icmp-multi-diffnic.sh -6 -p esp -m transport +icmp6-multi-diffnic05 icmp-multi-diffnic.sh -6 -p esp -m tunnel +icmp6-multi-diffnic06 icmp-multi-diffnic.sh -6 -p ipcomp -m transport +icmp6-multi-diffnic07 icmp-multi-diffnic.sh -6 -p ipcomp -m tunnel
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +153 -0
153 lines not on this page · raw message
Signature · 1 line
2.5.5
PATCH 3/4 network/stress/icmp: add icmp-multi-diffnic.sh to implement diffnic stress test
Hi,
Quoted 68 lines · Hangbin Liu
Signed-off-by Hangbin Liu <[email protected]>--- runtest/network_stress.icmp | 28 ++-- .../network/stress/icmp/icmp-multi-diffnic.sh | 153 +++++++++++++++++++++ 2 files changed, 167 insertions(+), 14 deletions(-)create mode 100755
testcases/network/stress/icmp/icmp-multi-diffnic.shruntest/network_stress.icmp +14
-14@@ -53,18 +53,18 @@ icmp6-multi-diffip05 icmp-multi-diffip.sh -6 -n 100 -p esp -m tunnel icmp6-multi-diffip06 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m transport icmp6-multi-diffip07 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m tunnel -icmp4-multi-diffnic01 icmp4-multi-diffnic01 -icmp4-multi-diffnic02 icmp4-multi-diffnic02 -icmp4-multi-diffnic03 icmp4-multi-diffnic03 -icmp4-multi-diffnic04 icmp4-multi-diffnic04 -icmp4-multi-diffnic05 icmp4-multi-diffnic05 -icmp4-multi-diffnic06 icmp4-multi-diffnic06 -icmp4-multi-diffnic07 icmp4-multi-diffnic07 +icmp4-multi-diffnic01 icmp-multi-diffnic.sh +icmp4-multi-diffnic02 icmp-multi-diffnic.sh -p ah -m transport +icmp4-multi-diffnic03 icmp-multi-diffnic.sh -p ah -m tunnel +icmp4-multi-diffnic04 icmp-multi-diffnic.sh -p esp -m transport +icmp4-multi-diffnic05 icmp-multi-diffnic.sh -p esp -m tunnel +icmp4-multi-diffnic06 icmp-multi-diffnic.sh -p ipcomp -m transport +icmp4-multi-diffnic07 icmp-multi-diffnic.sh -p ipcomp -m tunnel -icmp6-multi-diffnic01 icmp6-multi-diffnic01 -icmp6-multi-diffnic02 icmp6-multi-diffnic02 -icmp6-multi-diffnic03 icmp6-multi-diffnic03 -icmp6-multi-diffnic04 icmp6-multi-diffnic04 -icmp6-multi-diffnic05 icmp6-multi-diffnic05 -icmp6-multi-diffnic06 icmp6-multi-diffnic06 -icmp6-multi-diffnic07 icmp6-multi-diffnic07 +icmp6-multi-diffnic01 icmp-multi-diffnic.sh -6 +icmp6-multi-diffnic02 icmp-multi-diffnic.sh -6 -p ah -m transport +icmp6-multi-diffnic03 icmp-multi-diffnic.sh -6 -p ah -m tunnel +icmp6-multi-diffnic04 icmp-multi-diffnic.sh -6 -p esp -m transport +icmp6-multi-diffnic05 icmp-multi-diffnic.sh -6 -p esp -m tunnel +icmp6-multi-diffnic06 icmp-multi-diffnic.sh -6 -p ipcomp -m transport +icmp6-multi-diffnic07 icmp-multi-diffnic.sh -6 -p ipcomp -m tunneltestcases/network/stress/icmp/icmp-multi-diffnic.sh new file +18
-0@@ -0,0 +1,153 @@ +#!/bin/sh +# Copyright (c) 2016 Red Hat Inc., All Rights Reserved. +# Copyright (c) International Business Machines Corp., 2005 +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# Author: Hangbin Liu <[email protected]>
testcases/network/stress/icmp/icmp-multi-diffnic.sh line 28
Quoted 10 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +10
-0+# +################################################################################ +TCID=${TCID:-icmp-multi-diffnic} +TST_TOTAL=1 +TST_COUNT=1 +TST_CLEANUP="do_cleanup" + +. ipsec_lib.sh + +while getopts "hl:m:n:N:p:s:S:6" opt; do
there is no option 'n'
Quoted 31 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +31
-0+ case "$opt" in + h) + echo "Usage:" + echo "h help" + echo "l n n is the number of test link when tests run" + echo "m x x is ipsec mode, could be transport / tunnel" + echo "N n n is seconds of the network stress duration time" + echo "p x x is ipsec protocol, could be ah / esp / ipcomp" + echo "s x x is icmp messge size array" + echo "S n n is IPsec SPI value" + echo "6 run over IPv6" + exit 0 + ;; + l) LINK_NUM=$OPTARG ;; + m) IPSEC_MODE=$OPTARG ;; + N) NS_DURATION=$OPTARG ;; + p) IPSEC_PROTO=$OPTARG ;; + s) ICMP_SIZE_ARRAY=$OPTARG ;; + S) SPI=$OPTARG ;; + 6) # skip, test_net library already processed it + ;; + *) tst_brkm TBROK "unknown option: $opt" ;; + esac +done + +SPI=${SPI:-1000} +LINK_NUM=${LINK_NUM:-0} +DO_IPSEC=${DO_IPSEC:-false} +NS_DURATION=${NS_DURATION:-"3600"} +# Use large enough pkt size(65000) to fix each encapsulation +ICMP_SIZE_ARRAY=${ICMP_SIZE_ARRAY:-"10 100 1000 10000 65000"}
testcases/network/stress/icmp/icmp-multi-diffnic.sh line 69
Quoted 10 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +10
-0+[ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ] && DO_IPSEC=true || DO_IPSEC=false + +link_total=`echo $LHOST_HWADDRS | wc -w` +rhost_link_total=`echo $RHOST_HWADDRS | wc -w` +if [ $link_total -ne $rhost_link_total ]; then + tst_brkm TBROK "The number of element in LHOST_HWADDRS differs from RHOST_HWADDRS" +elif [ $link_total -lt 2 ]; then + tst_brkm TBROK "This test case requires plural NICs." +fi +
Should we check that the number of interfaces more then 1, otherwise exit with TCONF?
.. not TBROK
Hmm, what is the difference between running those tests
LHOST_IFACE=eth1 ... ./icmp_uni_basic.sh &
LHOST_IFACE=eth2 ... ./icmp_uni_basic.sh &
...
and running multinic script?
Thanks,
Alexey
Quoted 84 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +84
-0+do_cleanup() +{ + pkill -9 ping$TST_IPV6 &> /dev/null + tst_ipsec_cleanup + # Clean up each interface + link_num=0 + while [ $link_num -lt $link_total ]; do + tst_init_iface lhost ${link_num} + tst_init_iface rhost ${link_num} + link_num=`expr $link_num + 1` + done + tst_restore_ipaddr lhost + tst_restore_ipaddr rhost +} + +# Test description +tst_resm TINFO "Sending ICMP messages with the following conditions" +tst_resm TINFO "- Target number of interfaces is $link_total" +tst_resm TINFO "- Version of IP is IPv${TST_IPV6:-4}" +tst_resm TINFO "- Size of packets are ( $ICMP_SIZE_ARRAY )" + +if $DO_IPSEC; then + case $IPSEC_PROTO in + ah) tst_resm TINFO "- IPsec [ AH / $IPSEC_MODE ]" ;; + esp) tst_resm TINFO "- IPsec [ ESP / $IPSEC_MODE ]" ;; + ipcomp) tst_resm TINFO "- IPcomp [ $IPSEC_MODE ]" ;; + esac +fi + +# name of interface of the local/remote host +lhost_iface=`tst_iface lhost $LINK_NUM` +rhost_iface=`tst_iface rhost $LINK_NUM` + +# Loop for NIC configuration +[ "$TST_IPV6" ] && netmask=64 || netmask=24 +for link_num in `seq 0 $((link_total - 1))`; do + # name of interface of the local/remote host + lhost_iface=`tst_iface lhost $link_num` + rhost_iface=`tst_iface rhost $link_num` + + if [ "$TST_IPV6" ]; then + lhost_addr=${IPV6_NET32_UNUSED}:${link_num}:${LHOST_IPV6_HOST} + rhost_addr=${IPV6_NET32_UNUSED}:${link_num}:${RHOST_IPV6_HOST} + else + lhost_addr=${IPV4_NET16_UNUSED}.${link_num}.${LHOST_IPV4_HOST} + rhost_addr=${IPV4_NET16_UNUSED}.${link_num}.${RHOST_IPV4_HOST} + fi + ROD ip addr add $lhost_addr/$netmask dev $lhost_iface + tst_rhost_run -s -c "ip addr add $rhost_addr/$netmask dev $rhost_iface" + + # Configure SAD/SPD + if $DO_IPSEC ; then + tst_ipsec lhost $IPSEC_PROTO $IPSEC_MODE $SPI $lhost_addr $rhost_addr + tst_ipsec rhost $IPSEC_PROTO $IPSEC_MODE $SPI $rhost_addr $lhost_addr + fi + + # Make sure the connectvity + if [ "$IPSEC_PROTO" == ipcomp ]; then + tst_ping $lhost_iface $rhost_addr 2000 + else + tst_ping $lhost_iface $rhost_addr + fi + if [ $? -ne 0 ]; then + tst_resm TFAIL "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity" + else + tst_resm TPASS "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity" + fi + + lhost_iface_array[$link_num]=$lhost_iface + rhost_addr_array[$link_num]=$rhost_addr +done + +# Do Stress testing, ping flood +tst_resm TINFO "start ping flood stress testing" +for link_num in `seq 0 $((link_total - 1))`; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I ${lhost_iface_array[$link_num]} \ + ${rhost_addr_array[$link_num]} -s $size &> /dev/null & + done +done + +sleep ${NS_DURATION} + +tst_exit
PATCH 3/4 network/stress/icmp: add icmp-multi-diffnic.sh to implement diffnic stress test
Hi,
Quoted 9 lines · Alexey Kodanev
testcases/network/stress/icmp/icmp-multi-diffnic.sh line 28
Quoted 8 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +8
-0+TCID=${TCID:-icmp-multi-diffnic} +TST_TOTAL=1 +TST_COUNT=1 +TST_CLEANUP="do_cleanup" + +. ipsec_lib.sh + +while getopts "hl:m:n:N:p:s:S:6" opt; dothere is no option 'n'
Ah, yes, thanks, will fix it.
Quoted 37 lines
Quoted 37 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +37
-0+ case "$opt" in + h) + echo "Usage:" + echo "h help" + echo "l n n is the number of test link when tests run" + echo "m x x is ipsec mode, could be transport / tunnel" + echo "N n n is seconds of the network stress duration time" + echo "p x x is ipsec protocol, could be ah / esp / ipcomp" + echo "s x x is icmp messge size array" + echo "S n n is IPsec SPI value" + echo "6 run over IPv6" + exit 0 + ;; + l) LINK_NUM=$OPTARG ;; + m) IPSEC_MODE=$OPTARG ;; + N) NS_DURATION=$OPTARG ;; + p) IPSEC_PROTO=$OPTARG ;; + s) ICMP_SIZE_ARRAY=$OPTARG ;; + S) SPI=$OPTARG ;; + 6) # skip, test_net library already processed it + ;; + *) tst_brkm TBROK "unknown option: $opt" ;; + esac +done + +SPI=${SPI:-1000} +LINK_NUM=${LINK_NUM:-0} +DO_IPSEC=${DO_IPSEC:-false} +NS_DURATION=${NS_DURATION:-"3600"} +# Use large enough pkt size(65000) to fix each encapsulation +ICMP_SIZE_ARRAY=${ICMP_SIZE_ARRAY:-"10 100 1000 10000 65000"} +[ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ] && DO_IPSEC=true || DO_IPSEC=false + +link_total=`echo $LHOST_HWADDRS | wc -w` +rhost_link_total=`echo $RHOST_HWADDRS | wc -w` +if [ $link_total -ne $rhost_link_total ]; then + tst_brkm TBROK "The number of element in LHOST_HWADDRS differs from RHOST_HWADDRS"
Quoted 8 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh line 69
Quoted 4 lines
testcases/network/stress/icmp/icmp-multi-diffnic.sh new file +4
-0+elif [ $link_total -lt 2 ]; then + tst_brkm TBROK "This test case requires plural NICs." +fi +Should we check that the number of interfaces more then 1, otherwise exit with TCONF?
.. not TBROK
Yeah, that make sense.
Quoted 8 lines
Hmm, what is the difference between running those tests
LHOST_IFACE=eth1 ... ./icmp_uni_basic.sh &
LHOST_IFACE=eth2 ... ./icmp_uni_basic.sh &
...and running multinic script?
The uni_basic test is a basic, functional test, to verify we can handle all kinds of message size with different configures. There is no much stress actually.
And multi-diffnic will only check basic connectvity to make sure the configuration is right. The main purpose of the test is to make sure system do not break/crash under ping flood with various of messages. The same with multi-diffip test.
Thanks
Hangbin
PATCH 4/4 network/stress/icmp: remove old multi-diffnic/* tests
In reply to Hangbin Liumulti-diffnic/* tests have been rewritten and the new version can be found in icmp/icmp-multi-diffnic.sh.
--- .../stress/icmp/multi-diffnic/00_Descriptions.txt | 56 ---- .../network/stress/icmp/multi-diffnic/Makefile | 31 --- .../icmp/multi-diffnic/icmp4-multi-diffnic01 | 301 --------------------- .../icmp/multi-diffnic/icmp4-multi-diffnic02 | 66 ----- .../icmp/multi-diffnic/icmp4-multi-diffnic03 | 67 ----- .../icmp/multi-diffnic/icmp4-multi-diffnic04 | 66 ----- .../icmp/multi-diffnic/icmp4-multi-diffnic05 | 67 ----- .../icmp/multi-diffnic/icmp4-multi-diffnic06 | 67 ----- .../icmp/multi-diffnic/icmp4-multi-diffnic07 | 66 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic01 | 56 ---- .../icmp/multi-diffnic/icmp6-multi-diffnic02 | 66 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic03 | 67 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic04 | 66 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic05 | 67 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic06 | 67 ----- .../icmp/multi-diffnic/icmp6-multi-diffnic07 | 66 ----- 16 files changed, 1242 deletions(-) delete mode 100644 testcases/network/stress/icmp/multi-diffnic/00_Descriptions.txt delete mode 100644 testcases/network/stress/icmp/multi-diffnic/Makefile delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic01 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic02 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic03 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic04 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic05 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic06 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic07 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic01 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic02 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic03 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic04 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic05 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic06 delete mode 100644 testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic07
testcases/network/stress/icmp/multi-diffnic/00_Descriptions.txt deleted +0 -56
@@ -1,56 +0,0 @@ -Verify that the kernel is not crashed with receiving and sending various -size of ICMP message at differnt NIC simultaneously - -icmp4-multi-diffnic01 - IPv4 - -icmp4-multi-diffnic02 - IPv4 - IPsec [ AH / transport ] - -icmp4-multi-diffnic03 - IPv4 - IPsec [ AH / tunnel ] - -icmp4-multi-diffnic04 - IPv4 - IPsec [ ESP / transport ] - -icmp4-multi-diffnic05 - IPv4 - IPsec [ ESP / tunnel ] - -icmp4-multi-diffnic06 - IPv4 - IPcomp [ transport ] - -icmp4-multi-diffnic07 - IPv4 - IPcomp [ tunnel ] - -icmp6-multi-diffnic01 - IPv6 - -icmp6-multi-diffnic02 - IPv6 - IPsec [ AH / transport ] - -icmp6-multi-diffnic03 - IPv6 - IPsec [ AH / tunnel ] - -icmp6-multi-diffnic04 - IPv6 - IPsec [ ESP / transport ] - -icmp6-multi-diffnic05 - IPv6 - IPsec [ ESP / tunnel ] - -icmp6-multi-diffnic06 - IPv6 - IPcomp [ transport ] - -icmp6-multi-diffnic07 - IPv6 - IPcomp [ tunnel ]
testcases/network/stress/icmp/multi-diffnic/Makefile deleted +0 -31
@@ -1,31 +0,0 @@ -# -# network/stress/icmp/multi-diffnic testcases Makefile. -# -# Copyright (C) 2009, Cisco Systems Inc. -# -# 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 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. -# -# Garrett Cooper, October 2009 -# - -top_srcdir ?= ../../../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -INSTALL_TARGETS := icmp* - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic01 deleted +0 -301
301 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic02 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic03 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic04 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic05 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic06 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp4-multi-diffnic07 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic01 deleted +0 -56
56 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic02 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic03 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic04 deleted +0 -66
66 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic05 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic06 deleted +0 -67
67 lines not on this page · raw message
testcases/network/stress/icmp/multi-diffnic/icmp6-multi-diffnic07 deleted +0 -66
66 lines not on this page · raw message
Signature · 1 line
2.5.5
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
In reply to Hangbin LiuHi,
Quoted 13 lines · Hangbin Liu
Signed-off-by Hangbin Liu <[email protected]>--- runtest/network_stress.icmp | 29 ++--- testcases/network/stress/icmp/icmp-multi-diffip.sh | 138 +++++++++++++++++++++ 2 files changed, 153 insertions(+), 14 deletions(-)create mode 100755
testcases/network/stress/icmp/icmp-multi-diffip.shruntest/network_stress.icmp +0
-0@@ -36,21 +36,22 @@ icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 icmp6-uni-basic06 icmp-uni-basic.sh -6 -p ipcomp -m transport -s "10 100 1000 10000 65000"
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 39
Quoted 10 lines
runtest/network_stress.icmp +1
-7icmp6-uni-basic07 icmp-uni-basic.sh -6 -p ipcomp -m tunnel -s "10 100 1000 10000 65000" -icmp4-multi-diffip01 icmp4-multi-diffip01 -icmp4-multi-diffip02 icmp4-multi-diffip02 -icmp4-multi-diffip03 icmp4-multi-diffip03 -icmp4-multi-diffip04 icmp4-multi-diffip04 -icmp4-multi-diffip05 icmp4-multi-diffip05 -icmp4-multi-diffip06 icmp4-multi-diffip06 -icmp4-multi-diffip07 icmp4-multi-diffip07 +# networkstress.sh set IP_TOTAL=10000 by default, which is too much for these tests
if it is too much, I would rather check it in the script and set to the appropriate maximum.
Quoted 140 lines
runtest/network_stress.icmp +14
-7+icmp4-multi-diffip01 icmp-multi-diffip.sh -n 100 +icmp4-multi-diffip02 icmp-multi-diffip.sh -n 100 -p ah -m transport +icmp4-multi-diffip03 icmp-multi-diffip.sh -n 100 -p ah -m tunnel +icmp4-multi-diffip04 icmp-multi-diffip.sh -n 100 -p esp -m transport +icmp4-multi-diffip05 icmp-multi-diffip.sh -n 100 -p esp -m tunnel +icmp4-multi-diffip06 icmp-multi-diffip.sh -n 100 -p ipcomp -m transport +icmp4-multi-diffip07 icmp-multi-diffip.sh -n 100 -p ipcomp -m tunnel -icmp6-multi-diffip01 icmp6-multi-diffip01 -icmp6-multi-diffip02 icmp6-multi-diffip02 -icmp6-multi-diffip03 icmp6-multi-diffip03 -icmp6-multi-diffip04 icmp6-multi-diffip04 -icmp6-multi-diffip05 icmp6-multi-diffip05 -icmp6-multi-diffip06 icmp6-multi-diffip06 -icmp6-multi-diffip07 icmp6-multi-diffip07 +icmp6-multi-diffip01 icmp-multi-diffip.sh -6 -n 100 +icmp6-multi-diffip02 icmp-multi-diffip.sh -6 -n 100 -p ah -m transport +icmp6-multi-diffip03 icmp-multi-diffip.sh -6 -n 100 -p ah -m tunnel +icmp6-multi-diffip04 icmp-multi-diffip.sh -6 -n 100 -p esp -m transport +icmp6-multi-diffip05 icmp-multi-diffip.sh -6 -n 100 -p esp -m tunnel +icmp6-multi-diffip06 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m transport +icmp6-multi-diffip07 icmp-multi-diffip.sh -6 -n 100 -p ipcomp -m tunnel icmp4-multi-diffnic01 icmp4-multi-diffnic01 icmp4-multi-diffnic02 icmp4-multi-diffnic02testcases/network/stress/icmp/icmp-multi-diffip.sh new file +109
-0@@ -0,0 +1,138 @@ +#!/bin/sh +# Copyright (c) 2016 Red Hat Inc., All Rights Reserved. +# Copyright (c) International Business Machines Corp., 2005 +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# Author: Hangbin Liu <[email protected]> +# +################################################################################ +TCID=${TCID:-icmp-multi-diffip} +TST_TOTAL=1 +TST_COUNT=1 +TST_CLEANUP="do_cleanup" + +. ipsec_lib.sh + +while getopts "hl:m:n:N:p:s:S:6" opt; do + case "$opt" in + h) + echo "Usage:" + echo "h help" + echo "l n n is the number of test link when tests run" + echo "m x x is ipsec mode, could be transport / tunnel" + echo "n n n is number of total ip addresses for testing" + echo "N n n is seconds of the network stress duration time" + echo "p x x is ipsec protocol, could be ah / esp / ipcomp" + echo "s x x is icmp messge size array" + echo "S n n is IPsec SPI value" + echo "6 run over IPv6" + exit 0 + ;; + l) LINK_NUM=$OPTARG ;; + m) IPSEC_MODE=$OPTARG ;; + n) IP_TOTAL=$OPTARG ;; + N) NS_DURATION=$OPTARG ;; + p) IPSEC_PROTO=$OPTARG ;; + s) ICMP_SIZE_ARRAY=$OPTARG ;; + S) SPI=$OPTARG ;; + 6) # skip, test_net library already processed it + ;; + *) tst_brkm TBROK "unknown option: $opt" ;; + esac +done + +SPI=${SPI:-1000} +LINK_NUM=${LINK_NUM:-0} +IP_TOTAL=${IP_TOTAL:-100} +DO_IPSEC=${DO_IPSEC:-false} +NS_DURATION=${NS_DURATION:-"3600"} +# Use large enough pkt size(65000) to fix each encapsulation +ICMP_SIZE_ARRAY=${ICMP_SIZE_ARRAY:-"10 100 1000 10000 65000"} +[ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ] && DO_IPSEC=true || DO_IPSEC=false + +do_cleanup() +{ + pkill -9 ping$TST_IPV6 &> /dev/null + tst_ipsec_cleanup + # Clean up each interface + tst_restore_ipaddr lhost ${LINK_NUM} + tst_restore_ipaddr rhost ${LINK_NUM} +} + +# Test description +tst_resm TINFO "Sending ICMP messages with the following conditions" +tst_resm TINFO "- Target number of the connection is $IP_TOTAL" +tst_resm TINFO "- Version of IP is IPv${TST_IPV6:-4}" +tst_resm TINFO "- Size of packets are ( $ICMP_SIZE_ARRAY )" + +if $DO_IPSEC; then + case $IPSEC_PROTO in + ah) tst_resm TINFO "- IPsec [ AH / $IPSEC_MODE ]" ;; + esp) tst_resm TINFO "- IPsec [ ESP / $IPSEC_MODE ]" ;; + ipcomp) tst_resm TINFO "- IPcomp [ $IPSEC_MODE ]" ;; + esac +fi + +# name of interface of the local/remote host +lhost_iface=$(tst_iface lhost $LINK_NUM) +rhost_iface=$(tst_iface rhost $LINK_NUM) + +[ "$TST_IPV6" ] && netmask=64 || netmask=30 +for cnt in $(seq $IP_TOTAL); do + x=`expr $cnt \/ 64 % 255` + y=`expr $cnt % 64 \* 4 + 1` + if [ $x -ge 255 ]; then + tst_resm TCONF "This script cannot add more than $cnt addresses" + break + fi + if [ "$TST_IPV6" ]; then + lhost_addr=${IPV6_NET32_UNUSED}:$x:$y:${LHOST_IPV6_HOST} + rhost_addr=${IPV6_NET32_UNUSED}:$x:$y:${RHOST_IPV6_HOST} + else + lhost_addr=${IPV4_NET16_UNUSED}.$x.$y + rhost_addr=${IPV4_NET16_UNUSED}.$x.$(($y + 1)) + fi + ROD ip addr add $lhost_addr/$netmask dev $lhost_iface + tst_rhost_run -s -c "ip addr add $rhost_addr/$netmask dev $rhost_iface" +
testcases/network/stress/icmp/icmp-multi-diffip.sh line 119
Quoted 10 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +10
-0+ # Configure SAD/SPD + if $DO_IPSEC ; then + tst_ipsec lhost $IPSEC_PROTO $IPSEC_MODE $SPI $lhost_addr $rhost_addr + tst_ipsec rhost $IPSEC_PROTO $IPSEC_MODE $SPI $rhost_addr $lhost_addr + fi + + # Make sure the connectvity + tst_ping $lhost_iface $rhost_addr + if [ $? -ne 0 ]; then + tst_resm TFAIL "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity"
proto/mode were printed in the beginning of the test so it seems redundant to print it again and again during the test.
testcases/network/stress/icmp/icmp-multi-diffip.sh line 122
Quoted 3 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +3
-0+ else + tst_resm TPASS "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity" + fi
TST_TOTAL doesn't match TPASS/TFAIL assertions.
testcases/network/stress/icmp/icmp-multi-diffip.sh line 123
Quoted 1 line
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +1
-0+ rhost_addr_array[$cnt]=$rhost_addr
Please don't use arrays, it's a bash extension.
testcases/network/stress/icmp/icmp-multi-diffip.sh line 136
Quoted 13 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +13
-0+done + +# Do Stress testing, ping flood +tst_resm TINFO "start ping flood stress testing" +for rhost_addr in ${rhost_addr_array[@]}; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I $lhost_iface $rhost_addr -s $size &> /dev/null & + done +done + +sleep ${NS_DURATION} + +tst_resm TPASS "$TCID IPv${TST_IPV6:-4} $IPSEC_PROTO $IPSEC_MODE stress test"
Is the test always passing here with no checks?
Why we need to print $TCID?
testcases/network/stress/icmp/icmp-multi-diffip.sh line 138
Quoted 1 line
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +1
-0+tst_exit
Thanks,
Alexey
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
Quoted 19 lines · Alexey Kodanev
Hi,
Quoted 17 lines · Hangbin Liu
Signed-off-by Hangbin Liu <[email protected]>--- runtest/network_stress.icmp | 29 ++--- testcases/network/stress/icmp/icmp-multi-diffip.sh | 138 +++++++++++++++++++++ 2 files changed, 153 insertions(+), 14 deletions(-) create mode 100755 testcases/network/stress/icmp/icmp-multi-diffip.shruntest/network_stress.icmp +0
-3@@ -36,21 +36,22 @@ icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 icmp6-uni-basic06 icmp-uni-basic.sh -6 -p ipcomp -m transport -s "10 100 1000 10000 65000" icmp6-uni-basic07 icmp-uni-basic.sh -6 -p ipcomp -m tunnel -s "10 100 1000 10000 65000" -icmp4-multi-diffip01 icmp4-multi-diffip01 -icmp4-multi-diffip02 icmp4-multi-diffip02 -icmp4-multi-diffip03 icmp4-multi-diffip03
Quoted 8 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 39
Quoted 5 lines
runtest/network_stress.icmp +1
-4-icmp4-multi-diffip04 icmp4-multi-diffip04 -icmp4-multi-diffip05 icmp4-multi-diffip05 -icmp4-multi-diffip06 icmp4-multi-diffip06 -icmp4-multi-diffip07 icmp4-multi-diffip07 +# networkstress.sh set IP_TOTAL=10000 by default, which is too much for these testsif it is too much, I would rather check it in the script and set to the appropriate maximum.
OK, I will do it in the script.
Quoted 8 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 43
Quoted 5 lines
runtest/network_stress.icmp +5
-0+ + # Make sure the connectvity + tst_ping $lhost_iface $rhost_addr + if [ $? -ne 0 ]; then + tst_resm TFAIL "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity"proto/mode were printed in the beginning of the test so it seems redundant to print it again and again during the test.
Ah, yes, exactly. I will simplify it.
Quoted 6 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 46
Quoted 4 lines
runtest/network_stress.icmp +3
-0+ else + tst_resm TPASS "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity" + fi
TST_TOTALdoesn't match TPASS/TFAIL assertions.
Hmm...I didn't notice about this. We should to make sure the connectivity. But the checking times is based on $IP_TOTAL.
OK, I will use tst_brkm TCONF instead of tst_resm TFAIL. Which report you feel is better,
tst_brkm TCONF "IPv${TST_IPV6:-4} connectivity after add $cnt addresses" or
tst_brkm TCONF "$cnt addr: IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask connectivity"
Quoted 4 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 47
Quoted 2 lines
runtest/network_stress.icmp +1
-0+ rhost_addr_array[$cnt]=$rhost_addrPlease don't use arrays, it's a bash extension.
Is there a better way to store the addresses? Use a temp file?
Quoted 16 lines
Quoted 4 lines
runtest/network_stress.icmp +3
-0+done + +# Do Stress testing, ping floodruntest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65
Quoted 10 lines
runtest/network_stress.icmp +10
-0+tst_resm TINFO "start ping flood stress testing" +for rhost_addr in ${rhost_addr_array[@]}; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I $lhost_iface $rhost_addr -s $size &> /dev/null & + done +done + +sleep ${NS_DURATION} + +tst_resm TPASS "$TCID IPv${TST_IPV6:-4} $IPSEC_PROTO $IPSEC_MODE stress test"Is the test always passing here with no checks?
Yes, if the system under test do not crash with ping flood after ${NS_DURATION} seconds, we can pass the test.
Quoted 2 lines
Why we need to print $TCID?
No reason. I just want to contain as much info in the report log. If you think there is no need for the info since we have print it at the begining. I can do like the previous way. i.e.
tst_resm TPASS "Test is finished successfully."
Thanks
Hangbin
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
Hi,
Quoted 48 lines · Hangbin Liu
Quoted 18 lines · Alexey Kodanev
Hi,
Quoted 16 lines · Hangbin Liu
Signed-off-by Hangbin Liu <[email protected]>--- runtest/network_stress.icmp | 29 ++--- testcases/network/stress/icmp/icmp-multi-diffip.sh | 138 +++++++++++++++++++++ 2 files changed, 153 insertions(+), 14 deletions(-)create mode 100755
testcases/network/stress/icmp/icmp-multi-diffip.shruntest/network_stress.icmp +0
-2@@ -36,21 +36,22 @@ icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 icmp6-uni-basic06 icmp-uni-basic.sh -6 -p ipcomp -m transport -s "10 100 1000 10000 65000" icmp6-uni-basic07 icmp-uni-basic.sh -6 -p ipcomp -m tunnel -s "10 100 1000 10000 65000" -icmp4-multi-diffip01 icmp4-multi-diffip01 -icmp4-multi-diffip02 icmp4-multi-diffip02Quoted 8 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 39
Quoted 6 lines
runtest/network_stress.icmp +1
-5-icmp4-multi-diffip03 icmp4-multi-diffip03 -icmp4-multi-diffip04 icmp4-multi-diffip04 -icmp4-multi-diffip05 icmp4-multi-diffip05 -icmp4-multi-diffip06 icmp4-multi-diffip06 -icmp4-multi-diffip07 icmp4-multi-diffip07 +# networkstress.sh set IP_TOTAL=10000 by default, which is too much for these testsif it is too much, I would rather check it in the script and set to the appropriate maximum.
OK, I will do it in the script.
Quoted 7 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 43
Quoted 5 lines
runtest/network_stress.icmp +5
-0+ + # Make sure the connectvity + tst_ping $lhost_iface $rhost_addr + if [ $? -ne 0 ]; then + tst_resm TFAIL "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity"proto/mode were printed in the beginning of the test so it seems redundant to print it again and again during the test.
Ah, yes, exactly. I will simplify it.
Quoted 4 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 46
Quoted 3 lines
runtest/network_stress.icmp +3
-0+ else + tst_resm TPASS "IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask $IPSEC_PROTO $IPSEC_MODE connectivity" + fi
TST_TOTALdoesn't match TPASS/TFAIL assertions.Hmm...I didn't notice about this. We should to make sure the connectivity. But the checking times is based on $IP_TOTAL.
OK, I will use
tst_brkmTCONF instead oftst_resmTFAIL. Which report you feel is better,
Quoted 8 lines
tst_brkmTCONF "IPv${TST_IPV6:-4} connectivity after add $cnt addresses" or
tst_brkmTCONF "$cnt addr: IPv${TST_IPV6:-4} $lhost_addr/$netmask -- $rhost_addr/$netmask connectivity"Quoted 2 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 47
Quoted 1 line
runtest/network_stress.icmp +1
-0+ rhost_addr_array[$cnt]=$rhost_addrPlease don't use arrays, it's a bash extension.
Is there a better way to store the addresses? Use a temp file?
We can easily calculate them again, why store them... number might be quite big.
Quoted 9 lines
Quoted 9 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65 · line 56
Quoted 9 lines
runtest/network_stress.icmp +9
-0+done + +# Do Stress testing, ping flood +tst_resm TINFO "start ping flood stress testing" +for rhost_addr in ${rhost_addr_array[@]}; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I $lhost_iface $rhost_addr -s $size &> /dev/null & + done +done
Can we start ping test in background after adding each IP, i.e. after tst_ping finished?
Quoted 7 lines
Quoted 5 lines
runtest/network_stress.icmp icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65
Quoted 4 lines
runtest/network_stress.icmp +4
-0+ +sleep ${NS_DURATION} + +tst_resm TPASS "$TCID IPv${TST_IPV6:-4} $IPSEC_PROTO $IPSEC_MODE stress test"Is the test always passing here with no checks?
Yes, if the system under test do not crash with ping flood after ${NS_DURATION} seconds, we can pass the test.
What if remote host crashed somehow, and local not... test would pass in that case.
May be we should kill ping processes (or add -w deadline) and check connectivity again,
what do you think?
Thanks,
Alexey
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
Hi,
Quoted 6 lines · Alexey Kodanev
Quoted 3 lines
Quoted 2 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh line 123
Quoted 1 line
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +1
-0+ rhost_addr_array[$cnt]=$rhost_addrPlease don't use arrays, it's a bash extension.
Is there a better way to store the addresses? Use a temp file?
We can easily calculate them again, why store them... number might be quite big.
OK
Quoted 13 lines
Quoted 10 lines
Quoted 10 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh line 132
Quoted 10 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +9
-0+done + +# Do Stress testing, ping flood +tst_resm TINFO "start ping flood stress testing" +for rhost_addr in ${rhost_addr_array[@]}; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I $lhost_iface $rhost_addr -s $size &> /dev/null & + done +doneCan we start ping test in background after adding each IP, i.e. after
tst_pingfinished?
OK
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh line 136
Quoted 5 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +4
-0+ +sleep ${NS_DURATION} + +tst_resm TPASS "$TCID IPv${TST_IPV6:-4} $IPSEC_PROTO $IPSEC_MODE stress test"Is the test always passing here with no checks?
Yes, if the system under test do not crash with ping flood after ${NS_DURATION} seconds, we can pass the test.
Quoted 6 lines
What if remote host crashed somehow, and local not... test would pass in that case.
May be we should kill ping processes (or add -w deadline) and check connectivity again,
what do you think?
Good advice. Will add this check.
Thanks
Hangbin
PATCH 1/4 network/stress/icmp: add icmp-multi-diffip.sh to implement diffip stress test
Quoted 10 lines · Hangbin Liu
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh line 132
Quoted 7 lines
testcases/network/stress/icmp/icmp-multi-diffip.sh new file +7
-0+# Do Stress testing, ping flood +tst_resm TINFO "start ping flood stress testing" +for rhost_addr in ${rhost_addr_array[@]}; do + for size in ${ICMP_SIZE_ARRAY}; do + ping$TST_IPV6 -f -q -I $lhost_iface $rhost_addr -s $size &> /dev/null & + done +doneCan we start ping test in background after adding each IP, i.e. after
tst_pingfinished?
Ah, suddenly come in mind, If we start ping flood just after adding each IP, there will have packets loose when we test later added IP address, which may cause tst_ping failed. What do you think?
Thanks
Hangbin