* [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces
@ 2015-07-09 6:47 Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 01/23] network/vxlan: make names more abstract, use 'virt' Alexey Kodanev
` (23 more replies)
0 siblings, 24 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Most interfaces share the same ip command syntax and the same test
scenarious can be applied to them. So rename vxlan directory to more
general 'virt' directory and add those interfaces to it.
Alexey Kodanev (23):
network/vxlan: make names more abstract, use 'virt'
network/vxlan: rename vxlan dir and library to 'virt'
network/virt_lib.sh: add virt_add() and virt_add_rhost()
network/virt_lib.sh: use ROD_SILENT in cleanup
network/virt_lib.sh: fix regexpr in cleanup
network/virt/vlan01: add new test-case
network/virt/vlan02: add new test-case
network/virt: rename virt_max to virt_count
network/virt/vlan03: add new test-case
network/virt/vlan01.sh: add protocol, loose_binding and hdr options
network/virt/vlan03.sh: add protocol, loose_binding and hdr options
network/virt: add new macvlan01 test
network/virt: add new ipvlan01 test
network/virt/vxlan01.sh: add parameters
network/virt/vxlan03.sh: add VXLAN-GBP (group policy context) test
network/virt: add macvtap01 test
network/virt: add test-case 01 to virt_lib.sh
network/virt: move checking for command support to virt_lib.sh
network/virt: add test-case 02 to virt_lib.sh
network/virt/vxlan03.sh: fix vxlan_compare_netperf()
network/virt: add gre tunnel test
network/virt: adjust virt_threshold parameter
network/virt: don't skip when feature options not supported
runtest/network_stress.features | 12 ++
testcases/network/virt/Makefile | 33 +++
testcases/network/virt/gre01.sh | 63 ++++++
testcases/network/virt/ipvlan01.sh | 34 ++++
testcases/network/virt/macvlan01.sh | 34 ++++
testcases/network/virt/macvtap01.sh | 34 ++++
testcases/network/virt/virt_lib.sh | 363 ++++++++++++++++++++++++++++++++++
testcases/network/virt/vlan01.sh | 42 ++++
testcases/network/virt/vlan02.sh | 34 ++++
testcases/network/virt/vlan03.sh | 87 ++++++++
testcases/network/virt/vxlan01.sh | 36 ++++
testcases/network/virt/vxlan02.sh | 37 ++++
testcases/network/virt/vxlan03.sh | 95 +++++++++
testcases/network/vxlan/Makefile | 26 ---
testcases/network/vxlan/vxlan01.sh | 47 -----
testcases/network/vxlan/vxlan02.sh | 40 ----
testcases/network/vxlan/vxlan03.sh | 72 -------
testcases/network/vxlan/vxlan_lib.sh | 210 --------------------
18 files changed, 904 insertions(+), 395 deletions(-)
create mode 100644 testcases/network/virt/Makefile
create mode 100755 testcases/network/virt/gre01.sh
create mode 100755 testcases/network/virt/ipvlan01.sh
create mode 100755 testcases/network/virt/macvlan01.sh
create mode 100755 testcases/network/virt/macvtap01.sh
create mode 100644 testcases/network/virt/virt_lib.sh
create mode 100755 testcases/network/virt/vlan01.sh
create mode 100755 testcases/network/virt/vlan02.sh
create mode 100755 testcases/network/virt/vlan03.sh
create mode 100755 testcases/network/virt/vxlan01.sh
create mode 100755 testcases/network/virt/vxlan02.sh
create mode 100755 testcases/network/virt/vxlan03.sh
delete mode 100644 testcases/network/vxlan/Makefile
delete mode 100755 testcases/network/vxlan/vxlan01.sh
delete mode 100755 testcases/network/vxlan/vxlan02.sh
delete mode 100755 testcases/network/vxlan/vxlan03.sh
delete mode 100644 testcases/network/vxlan/vxlan_lib.sh
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* [LTP] [PATCH 01/23] network/vxlan: make names more abstract, use 'virt'
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 02/23] network/vxlan: rename vxlan dir and library to 'virt' Alexey Kodanev
` (22 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
* rename vxlan -> virt, ltp_vxl0 -> ltp_v0
* move some vxlan specific comments and params to vxlan test
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/vxlan/vxlan01.sh | 25 +++--
testcases/network/vxlan/vxlan02.sh | 21 +++--
testcases/network/vxlan/vxlan03.sh | 23 ++++-
testcases/network/vxlan/vxlan_lib.sh | 171 +++++++++++++++++-----------------
4 files changed, 129 insertions(+), 111 deletions(-)
diff --git a/testcases/network/vxlan/vxlan01.sh b/testcases/network/vxlan/vxlan01.sh
index 574e9c0..85a57ea 100755
--- a/testcases/network/vxlan/vxlan01.sh
+++ b/testcases/network/vxlan/vxlan01.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-
-# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -13,8 +12,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/>.
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
@@ -23,23 +21,28 @@
TCID=vxlan01
TST_TOTAL=1
+
+virt_type="vxlan"
+start_id=16700000
+virt_max=5000
+
. test_net.sh
. vxlan_lib.sh
-max=$(( $start_vni + $vxlan_max ))
-tst_resm TINFO "create $vxlan_max VXLANs, then delete them"
+max=$(( $start_id + $virt_max ))
+tst_resm TINFO "create $virt_max VXLANs, then delete them"
opt="group 239.1.1.1"
-vnis=$(seq $start_vni $max)
+vnis=$(seq $start_id $max)
for i in $vnis; do
- ROD_SILENT "ip link add ltp_vxl${i} type vxlan id $i $opt"
- ROD_SILENT "ip link set ltp_vxl${i} up"
+ ROD_SILENT "ip link add ltp_v${i} type vxlan id $i $opt"
+ ROD_SILENT "ip link set ltp_v${i} up"
done
for i in $vnis; do
- ROD_SILENT "ip link set ltp_vxl${i} down"
- ROD_SILENT "ip link delete ltp_vxl${i}"
+ ROD_SILENT "ip link set ltp_v${i} down"
+ ROD_SILENT "ip link delete ltp_v${i}"
done
tst_resm TPASS "done"
diff --git a/testcases/network/vxlan/vxlan02.sh b/testcases/network/vxlan/vxlan02.sh
index 6220a0d..ca82c58 100755
--- a/testcases/network/vxlan/vxlan02.sh
+++ b/testcases/network/vxlan/vxlan02.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-
-# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -13,8 +12,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/>.
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
@@ -24,16 +22,21 @@
TCID=vxlan02
TST_TOTAL=1
+
+virt_type="vxlan"
+start_id=16700000
+virt_max=5000
+
. test_net.sh
. vxlan_lib.sh
opt="group 239.1.1.1"
-tst_resm TINFO "create, delete ltp_vxl1 $vxlan_max times"
+tst_resm TINFO "create, delete ltp_v0 $virt_max times"
-for i in $(seq 0 $vxlan_max); do
- ROD_SILENT "ip link add ltp_vxl1 type vxlan id $start_vni $opt"
- ROD_SILENT "ip link set ltp_vxl1 up"
- ROD_SILENT "ip link delete ltp_vxl1"
+for i in $(seq 0 $virt_max); do
+ ROD_SILENT "ip link add ltp_v0 type vxlan id $start_id $opt"
+ ROD_SILENT "ip link set ltp_v0 up"
+ ROD_SILENT "ip link delete ltp_v0"
done
tst_resm TPASS "done"
diff --git a/testcases/network/vxlan/vxlan03.sh b/testcases/network/vxlan/vxlan03.sh
index 8ee412d..7e8ffd1 100755
--- a/testcases/network/vxlan/vxlan03.sh
+++ b/testcases/network/vxlan/vxlan03.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-
-# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -13,8 +12,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/>.
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
@@ -27,13 +25,26 @@
TCID=vxlan03
TST_TOTAL=2
+
+virt_type="vxlan"
+start_id=16700000
+
+# In average cases (with small packets less then 150 bytes) vxlan slower
+# by 10-30%. If hosts are too close to each one, e.g. connected to the same
+# switch the performance can be slower by 50%. Set 60% as default, the above
+# will be an error in VXLAN.
+virt_threshold=60
+
+# Destination address, can be unicast or multicast address
+vxlan_dst_addr="uni"
+
. test_net.sh
. vxlan_lib.sh
cleanup()
{
- cleanup_vxlans
- tst_rhost_run -c "ip link delete ltp_vxl0"
+ cleanup_vifaces
+ tst_rhost_run -c "ip link delete ltp_v0"
if [ "$net_load" = "TFO" ]; then
tst_rhost_run -c "pkill -9 tcp_fastopen\$"
pkill -9 "tcp_fastopen\$"
diff --git a/testcases/network/vxlan/vxlan_lib.sh b/testcases/network/vxlan/vxlan_lib.sh
index f9cd49f..d6ae77c 100644
--- a/testcases/network/vxlan/vxlan_lib.sh
+++ b/testcases/network/vxlan/vxlan_lib.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-
# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
@@ -13,46 +12,37 @@
# 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/>.
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Virtual eXtensible Local Area Network (VXLAN) provides L2 networks
+# VxLAN
+# -----
+# Virtual eXtensible Local Area Network (VxLAN) provides L2 networks
# over existed L3 networks. It is using UDP (port 8472) to encapsulate
# data packets. More information:
# http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-08
#
-# Warning: Test assumes that machines don't have any existed VXLANs.
-# If machine has VXLANs, the test might fail or eventually delete
+# Warning: Test assumes that machines don't have any existed VxLANs.
+# If machine has VxLANs, the test might fail or eventually delete
# them in cleanup function. See "start_vni" variable which can
# solve it.
ip_local=$(tst_ipaddr)
-ip_vxlan_local="192.168.124.1"
-ip6_vxlan_local="fe80::381c:c0ff:fea8:7c01"
-mac_vxlan_local="3A:1C:C0:A8:7C:01"
+ip_virt_local="192.168.124.1"
+ip6_virt_local="fe80::381c:c0ff:fea8:7c01"
+mac_virt_local="3A:1C:C0:A8:7C:01"
ip_remote=$(tst_ipaddr rhost)
-ip_vxlan_remote="192.168.124.2"
-ip6_vxlan_remote="fe80::381c:c0ff:fea8:7c02"
-mac_vxlan_remote="3A:1C:C0:A8:7C:02"
+ip_virt_remote="192.168.124.2"
+ip6_virt_remote="fe80::381c:c0ff:fea8:7c02"
+mac_virt_remote="3A:1C:C0:A8:7C:02"
-vxlan_max=5000
-start_vni=16700000
clients_num=2
client_requests=500000
max_requests=3
net_load="TFO"
-
-# In average cases (with small packets less then 150 bytes) vxlan slower
-# by 10-30%. If hosts are too close to each one, e.g. connected to the same
-# switch the performance can be slower by 50%. Set 60% as default, the above
-# will be an error in VXLAN.
-vxlan_threshold=60
-
-# Destination address, can be unicast or multicast address
-vxlan_dst_addr="uni"
+virt_threshold=30
while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
case "$opt" in
@@ -60,32 +50,32 @@ while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
echo "Usage:"
echo "h help"
echo "s use ssh to run remote cmds"
- echo "x n n is a number of VXLANs for tc1 and tc2"
- echo "i n start VNI to use"
+ echo "x n n is a number of interfaces for tc1 and tc2"
+ echo "i n start ID to use"
echo "r n client requests for TCP performance test"
echo "c n clients run concurrently in TCP perf"
echo "R n num of reqs, after which conn.closed in TCP perf"
echo "p x x and x + 1 are ports in TCP perf"
- echo "n x VXLAN network 192.168.x"
+ echo "n x virtual network 192.168.x"
echo "l x network load: x is PING or TFO(tcp_fastopen)"
- echo "t x VXLAN performance threshold, default is 60%"
- echo "d x VXLAN destination address, 'uni' or 'multi'"
+ echo "t x performance threshold, default is 60%"
+ echo "d x VxLAN destination address, 'uni' or 'multi'"
echo "6 run over IPv6"
exit 0
;;
s) TST_USE_SSH=1 ;;
- x) vxlan_max=$OPTARG ;;
- i) start_vni=$OPTARG ;;
+ x) virt_max=$OPTARG ;;
+ i) start_id=$OPTARG ;;
c) clients_num=$OPTARG ;;
r) client_requests=$OPTARG ;;
R) max_requests=$OPTARG ;;
p) srv_port=$OPTARG ;;
n)
- ip_vxlan_local="192.168.${OPTARG}.1"
- ip_vxlan_remote="192.168.${OPTARG}.2"
+ ip_virt_local="192.168.${OPTARG}.1"
+ ip_virt_remote="192.168.${OPTARG}.2"
;;
l) net_load=$OPTARG ;;
- t) vxlan_threshold=$OPTARG ;;
+ t) virt_threshold=$OPTARG ;;
d) vxlan_dst_addr=$OPTARG ;;
6) # skip, test_net library already processed it
;;
@@ -95,18 +85,38 @@ while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
esac
done
-cleanup_vxlans()
+cleanup_vifaces()
{
- tst_resm TINFO "cleanup vxlans..."
- local vxlans=`ip link | sed -nE 's/^[0-9]+: (ltp_vxl[0-9]+):.+/\1/p'`
- for vx in $vxlans; do
+ tst_resm TINFO "cleanup virtual interfaces..."
+ local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
+ for vx in $viface; do
ip link delete $vx
done
}
-TST_CLEANUP="cleanup_vxlans"
+TST_CLEANUP="cleanup_vifaces"
trap "tst_brkm TBROK 'test interrupted'" INT
+virt_setup()
+{
+ local opt="$1"
+ local opt_r="$2"
+
+ tst_resm TINFO "setup local ${virt_type} with '$opt'"
+
+ ROD_SILENT "ip li add ltp_v0 type $virt_type $opt"
+ ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
+ ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
+ ROD_SILENT "ip li set up ltp_v0"
+
+ tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
+
+ tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $opt_r"
+ tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
+ tst_rhost_run -s -c "ip addr add ${ip_virt_remote}/24 dev ltp_v0"
+ tst_rhost_run -s -c "ip li set up ltp_v0"
+}
+
vxlan_setup_subnet_uni()
{
tst_kvercmp 3 10 0 && \
@@ -115,21 +125,10 @@ vxlan_setup_subnet_uni()
[ "$(ip li add type vxlan help 2>&1 | grep remote)" ] || \
tst_brkm TCONF "iproute doesn't support remote unicast address"
- local opt="remote $(tst_ipaddr rhost)"
-
- tst_resm TINFO "setup VxLANv$ipver with unicast address: '$opt'"
+ local opt="id $1 remote $(tst_ipaddr rhost)"
+ local opt_r="id $2 remote $(tst_ipaddr)"
- ROD_SILENT "ip li add ltp_vxl0 type vxlan id $1 $opt"
- ROD_SILENT "ip li set ltp_vxl0 address $mac_vxlan_local"
- ROD_SILENT "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
- ROD_SILENT "ip li set up ltp_vxl0"
-
- opt="remote $(tst_ipaddr)"
-
- tst_rhost_run -s -c "ip li add ltp_vxl0 type vxlan id $2 $opt"
- tst_rhost_run -s -c "ip li set ltp_vxl0 address $mac_vxlan_remote"
- tst_rhost_run -s -c "ip addr add ${ip_vxlan_remote}/24 dev ltp_vxl0"
- tst_rhost_run -s -c "ip li set up ltp_vxl0"
+ virt_setup "$opt" "$opt_r"
}
vxlan_setup_subnet_multi()
@@ -139,35 +138,27 @@ vxlan_setup_subnet_multi()
local b2=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
local b3=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
- local opt=
+ local grp=
if [ "$TST_IPV6" ]; then
- opt="group ff05::$(printf '%x:%x%x' $b1 $b2 $b3)"
+ grp="group ff05::$(printf '%x:%x%x' $b1 $b2 $b3)"
else
- opt="group 239.$b1.$b2.$b3"
+ grp="group 239.$b1.$b2.$b3"
fi
- tst_resm TINFO "setup VxLANv$ipver with multicast address: '$opt'"
-
- ROD_SILENT "ip li add ltp_vxl0 type vxlan id $1 $opt dev $(tst_iface)"
- ROD_SILENT "ip li set ltp_vxl0 address $mac_vxlan_local"
- ROD_SILENT "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
- ROD_SILENT "ip li set up ltp_vxl0"
+ local opt="id $1 $grp dev $(tst_iface)"
+ local opt_r="id $2 $grp dev $(tst_iface rhost)"
- tst_rhost_run -s -c "ip li add ltp_vxl0 type vxlan id $2 $opt \
- dev $(tst_iface rhost)"
- tst_rhost_run -s -c "ip li set ltp_vxl0 address $mac_vxlan_remote"
- tst_rhost_run -s -c "ip addr add ${ip_vxlan_remote}/24 dev ltp_vxl0"
- tst_rhost_run -s -c "ip li set up ltp_vxl0"
+ virt_setup "$opt" "$opt_r"
}
-vxlan_compare_netperf()
+virt_compare_netperf()
{
local ret=0
- tst_netload $ip_vxlan_remote res_ipv4 $net_load || ret=1
- tst_netload ${ip6_vxlan_remote}%ltp_vxl0 res_ipv6 $net_load || ret=1
+ tst_netload $ip_virt_remote res_ipv4 $net_load || ret=1
+ tst_netload ${ip6_virt_remote}%ltp_v0 res_ipv6 $net_load || ret=1
- ROD_SILENT "ip link delete ltp_vxl0"
- tst_rhost_run -s -c "ip link delete ltp_vxl0"
+ ROD_SILENT "ip link delete ltp_v0"
+ tst_rhost_run -s -c "ip link delete ltp_v0"
[ "$ret" -eq 1 ] && return 1
local vt="$(cat res_ipv4)"
local vt6="$(cat res_ipv6)"
@@ -175,15 +166,21 @@ vxlan_compare_netperf()
tst_netload $ip_remote res_ipv4 $net_load || return 1
local lt="$(cat res_ipv4)"
- tst_resm TINFO "time lan($lt) vxlan IPv4($vt) and IPv6($vt6) ms"
+ tst_resm TINFO "time lan($lt) $virt_type IPv4($vt) and IPv6($vt6) ms"
per=$(( $vt * 100 / $lt - 100 ))
per6=$(( $vt6 * 100 / $lt - 100 ))
- tst_resm TINFO "IPv4 VxLAN over IPv$ipver slower by $per %"
- tst_resm TINFO "IPv6 VxLAN over IPv$ipver slower by $per6 %"
-
- [ "$per" -ge "$vxlan_threshold" -o "$per6" -ge "$vxlan_threshold" ] \
+ case "$virt_type" in
+ vxlan)
+ tst_resm TINFO "IPv4 VxLAN over IPv$ipver slower by $per %"
+ tst_resm TINFO "IPv6 VxLAN over IPv$ipver slower by $per6 %"
+ ;;
+ *)
+ tst_resm TINFO "IPv4 $virt_type slower by $per %"
+ tst_resm TINFO "IPv6 $virt_type slower by $per6 %"
+ esac
+ [ "$per" -ge "$virt_threshold" -o "$per6" -ge "$virt_threshold" ] \
&& ret=1
return $ret
@@ -191,20 +188,24 @@ vxlan_compare_netperf()
tst_require_root
-tst_kvercmp 3 8 0 && \
- tst_brkm TCONF "test must be run with kernel 3.8 or newer"
+case "$virt_type" in
+vxlan)
+ tst_kvercmp 3 8 0 && \
+ tst_brkm TCONF "test must be run with kernel 3.8 or newer"
-if [ "$TST_IPV6" ]; then
- tst_kvercmp 3 12 0 && \
- tst_brkm TCONF "test must be run with kernel 3.12 or newer"
-fi
+ if [ "$TST_IPV6" ]; then
+ tst_kvercmp 3 12 0 && \
+ tst_brkm TCONF "test must be run with kernels >= 3.12"
+ fi
+;;
+esac
ipver=${TST_IPV6:-'4'}
tst_check_cmds "ip"
-ip link add ltp_vxl type vxlan id $start_vni > /dev/null 2>&1
+ip link add ltp_v0 type $virt_type > /dev/null 2>&1
if [ $? -ne 0 ]; then
- tst_brkm TCONF "iproute2 or kernel doesn't support vxlan"
+ tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
fi
-ROD_SILENT "ip link delete ltp_vxl"
+ROD_SILENT "ip link delete ltp_v0"
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 02/23] network/vxlan: rename vxlan dir and library to 'virt'
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 01/23] network/vxlan: make names more abstract, use 'virt' Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 03/23] network/virt_lib.sh: add virt_add() and virt_add_rhost() Alexey Kodanev
` (21 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Also change vxlan_lib.sh -> virt_lib.sh in Makefile and in
vxlan*.sh tests that source it.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/Makefile | 26 ++++
testcases/network/virt/virt_lib.sh | 211 ++++++++++++++++++++++++++++++++++
testcases/network/virt/vxlan01.sh | 50 ++++++++
testcases/network/virt/vxlan02.sh | 43 +++++++
testcases/network/virt/vxlan03.sh | 83 +++++++++++++
testcases/network/vxlan/Makefile | 26 ----
testcases/network/vxlan/vxlan01.sh | 50 --------
testcases/network/vxlan/vxlan02.sh | 43 -------
testcases/network/vxlan/vxlan03.sh | 83 -------------
testcases/network/vxlan/vxlan_lib.sh | 211 ----------------------------------
10 files changed, 413 insertions(+), 413 deletions(-)
create mode 100644 testcases/network/virt/Makefile
create mode 100644 testcases/network/virt/virt_lib.sh
create mode 100755 testcases/network/virt/vxlan01.sh
create mode 100755 testcases/network/virt/vxlan02.sh
create mode 100755 testcases/network/virt/vxlan03.sh
delete mode 100644 testcases/network/vxlan/Makefile
delete mode 100755 testcases/network/vxlan/vxlan01.sh
delete mode 100755 testcases/network/vxlan/vxlan02.sh
delete mode 100755 testcases/network/vxlan/vxlan03.sh
delete mode 100644 testcases/network/vxlan/vxlan_lib.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
new file mode 100644
index 0000000..d05890f
--- /dev/null
+++ b/testcases/network/virt/Makefile
@@ -0,0 +1,26 @@
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+top_srcdir ?= ../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INSTALL_TARGETS := virt_lib.sh \
+ vxlan01.sh \
+ vxlan02.sh \
+ vxlan03.sh \
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
new file mode 100644
index 0000000..d6ae77c
--- /dev/null
+++ b/testcases/network/virt/virt_lib.sh
@@ -0,0 +1,211 @@
+#!/bin/sh
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# VxLAN
+# -----
+# Virtual eXtensible Local Area Network (VxLAN) provides L2 networks
+# over existed L3 networks. It is using UDP (port 8472) to encapsulate
+# data packets. More information:
+# http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-08
+#
+# Warning: Test assumes that machines don't have any existed VxLANs.
+# If machine has VxLANs, the test might fail or eventually delete
+# them in cleanup function. See "start_vni" variable which can
+# solve it.
+
+ip_local=$(tst_ipaddr)
+ip_virt_local="192.168.124.1"
+ip6_virt_local="fe80::381c:c0ff:fea8:7c01"
+mac_virt_local="3A:1C:C0:A8:7C:01"
+
+ip_remote=$(tst_ipaddr rhost)
+ip_virt_remote="192.168.124.2"
+ip6_virt_remote="fe80::381c:c0ff:fea8:7c02"
+mac_virt_remote="3A:1C:C0:A8:7C:02"
+
+clients_num=2
+client_requests=500000
+max_requests=3
+net_load="TFO"
+virt_threshold=30
+
+while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
+ case "$opt" in
+ h)
+ echo "Usage:"
+ echo "h help"
+ echo "s use ssh to run remote cmds"
+ echo "x n n is a number of interfaces for tc1 and tc2"
+ echo "i n start ID to use"
+ echo "r n client requests for TCP performance test"
+ echo "c n clients run concurrently in TCP perf"
+ echo "R n num of reqs, after which conn.closed in TCP perf"
+ echo "p x x and x + 1 are ports in TCP perf"
+ echo "n x virtual network 192.168.x"
+ echo "l x network load: x is PING or TFO(tcp_fastopen)"
+ echo "t x performance threshold, default is 60%"
+ echo "d x VxLAN destination address, 'uni' or 'multi'"
+ echo "6 run over IPv6"
+ exit 0
+ ;;
+ s) TST_USE_SSH=1 ;;
+ x) virt_max=$OPTARG ;;
+ i) start_id=$OPTARG ;;
+ c) clients_num=$OPTARG ;;
+ r) client_requests=$OPTARG ;;
+ R) max_requests=$OPTARG ;;
+ p) srv_port=$OPTARG ;;
+ n)
+ ip_virt_local="192.168.${OPTARG}.1"
+ ip_virt_remote="192.168.${OPTARG}.2"
+ ;;
+ l) net_load=$OPTARG ;;
+ t) virt_threshold=$OPTARG ;;
+ d) vxlan_dst_addr=$OPTARG ;;
+ 6) # skip, test_net library already processed it
+ ;;
+ *)
+ tst_brkm TBROK "unknown option: $opt"
+ ;;
+ esac
+done
+
+cleanup_vifaces()
+{
+ tst_resm TINFO "cleanup virtual interfaces..."
+ local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
+ for vx in $viface; do
+ ip link delete $vx
+ done
+}
+
+TST_CLEANUP="cleanup_vifaces"
+trap "tst_brkm TBROK 'test interrupted'" INT
+
+virt_setup()
+{
+ local opt="$1"
+ local opt_r="$2"
+
+ tst_resm TINFO "setup local ${virt_type} with '$opt'"
+
+ ROD_SILENT "ip li add ltp_v0 type $virt_type $opt"
+ ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
+ ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
+ ROD_SILENT "ip li set up ltp_v0"
+
+ tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
+
+ tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $opt_r"
+ tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
+ tst_rhost_run -s -c "ip addr add ${ip_virt_remote}/24 dev ltp_v0"
+ tst_rhost_run -s -c "ip li set up ltp_v0"
+}
+
+vxlan_setup_subnet_uni()
+{
+ tst_kvercmp 3 10 0 && \
+ tst_brkm TCONF "test must be run with kernel 3.10 or newer"
+
+ [ "$(ip li add type vxlan help 2>&1 | grep remote)" ] || \
+ tst_brkm TCONF "iproute doesn't support remote unicast address"
+
+ local opt="id $1 remote $(tst_ipaddr rhost)"
+ local opt_r="id $2 remote $(tst_ipaddr)"
+
+ virt_setup "$opt" "$opt_r"
+}
+
+vxlan_setup_subnet_multi()
+{
+ tst_check_cmds "od"
+ local b1=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
+ local b2=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
+ local b3=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
+
+ local grp=
+ if [ "$TST_IPV6" ]; then
+ grp="group ff05::$(printf '%x:%x%x' $b1 $b2 $b3)"
+ else
+ grp="group 239.$b1.$b2.$b3"
+ fi
+
+ local opt="id $1 $grp dev $(tst_iface)"
+ local opt_r="id $2 $grp dev $(tst_iface rhost)"
+
+ virt_setup "$opt" "$opt_r"
+}
+
+virt_compare_netperf()
+{
+ local ret=0
+ tst_netload $ip_virt_remote res_ipv4 $net_load || ret=1
+ tst_netload ${ip6_virt_remote}%ltp_v0 res_ipv6 $net_load || ret=1
+
+ ROD_SILENT "ip link delete ltp_v0"
+ tst_rhost_run -s -c "ip link delete ltp_v0"
+ [ "$ret" -eq 1 ] && return 1
+ local vt="$(cat res_ipv4)"
+ local vt6="$(cat res_ipv6)"
+
+ tst_netload $ip_remote res_ipv4 $net_load || return 1
+
+ local lt="$(cat res_ipv4)"
+ tst_resm TINFO "time lan($lt) $virt_type IPv4($vt) and IPv6($vt6) ms"
+
+ per=$(( $vt * 100 / $lt - 100 ))
+ per6=$(( $vt6 * 100 / $lt - 100 ))
+
+ case "$virt_type" in
+ vxlan)
+ tst_resm TINFO "IPv4 VxLAN over IPv$ipver slower by $per %"
+ tst_resm TINFO "IPv6 VxLAN over IPv$ipver slower by $per6 %"
+ ;;
+ *)
+ tst_resm TINFO "IPv4 $virt_type slower by $per %"
+ tst_resm TINFO "IPv6 $virt_type slower by $per6 %"
+ esac
+ [ "$per" -ge "$virt_threshold" -o "$per6" -ge "$virt_threshold" ] \
+ && ret=1
+
+ return $ret
+}
+
+tst_require_root
+
+case "$virt_type" in
+vxlan)
+ tst_kvercmp 3 8 0 && \
+ tst_brkm TCONF "test must be run with kernel 3.8 or newer"
+
+ if [ "$TST_IPV6" ]; then
+ tst_kvercmp 3 12 0 && \
+ tst_brkm TCONF "test must be run with kernels >= 3.12"
+ fi
+;;
+esac
+
+ipver=${TST_IPV6:-'4'}
+
+tst_check_cmds "ip"
+
+ip link add ltp_v0 type $virt_type > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+ tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
+fi
+ROD_SILENT "ip link delete ltp_v0"
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
new file mode 100755
index 0000000..a8624a3
--- /dev/null
+++ b/testcases/network/virt/vxlan01.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create 5000 VXLAN interfaces.
+#
+
+TCID=vxlan01
+TST_TOTAL=1
+
+virt_type="vxlan"
+start_id=16700000
+virt_max=5000
+
+. test_net.sh
+. virt_lib.sh
+
+max=$(( $start_id + $virt_max ))
+tst_resm TINFO "create $virt_max VXLANs, then delete them"
+opt="group 239.1.1.1"
+
+vnis=$(seq $start_id $max)
+
+for i in $vnis; do
+ ROD_SILENT "ip link add ltp_v${i} type vxlan id $i $opt"
+ ROD_SILENT "ip link set ltp_v${i} up"
+done
+
+for i in $vnis; do
+ ROD_SILENT "ip link set ltp_v${i} down"
+ ROD_SILENT "ip link delete ltp_v${i}"
+done
+
+tst_resm TPASS "done"
+
+tst_exit
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
new file mode 100755
index 0000000..a0b9267
--- /dev/null
+++ b/testcases/network/virt/vxlan02.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create and then delete VXLAN
+# interface 5000 times.
+#
+
+TCID=vxlan02
+TST_TOTAL=1
+
+virt_type="vxlan"
+start_id=16700000
+virt_max=5000
+
+. test_net.sh
+. virt_lib.sh
+
+opt="group 239.1.1.1"
+tst_resm TINFO "create, delete ltp_v0 $virt_max times"
+
+for i in $(seq 0 $virt_max); do
+ ROD_SILENT "ip link add ltp_v0 type vxlan id $start_id $opt"
+ ROD_SILENT "ip link set ltp_v0 up"
+ ROD_SILENT "ip link delete ltp_v0"
+done
+tst_resm TPASS "done"
+
+tst_exit
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
new file mode 100755
index 0000000..033d801
--- /dev/null
+++ b/testcases/network/virt/vxlan03.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
+# sub-nets between two hosts, then will compare TCP performance
+# with and without VxLAN using ping or tcp_fastopen test.
+#
+# Test-case 2: The same as above but must fail, because VXLAN allows
+# to communicate only within the same VXLAN segment.
+
+TCID=vxlan03
+TST_TOTAL=2
+
+virt_type="vxlan"
+start_id=16700000
+
+# In average cases (with small packets less then 150 bytes) vxlan slower
+# by 10-30%. If hosts are too close to each one, e.g. connected to the same
+# switch the performance can be slower by 50%. Set 60% as default, the above
+# will be an error in VXLAN.
+virt_threshold=60
+
+# Destination address, can be unicast or multicast address
+vxlan_dst_addr="uni"
+
+. test_net.sh
+. virt_lib.sh
+
+cleanup()
+{
+ cleanup_vifaces
+ tst_rhost_run -c "ip link delete ltp_v0"
+ if [ "$net_load" = "TFO" ]; then
+ tst_rhost_run -c "pkill -9 tcp_fastopen\$"
+ pkill -9 "tcp_fastopen\$"
+ fi
+}
+TST_CLEANUP="cleanup"
+
+if [ "$net_load" = "TFO" ]; then
+ tst_check_cmds "tcp_fastopen"
+fi
+
+if [ -z $ip_local -o -z $ip_remote ]; then
+ tst_brkm TBROK "you must specify IP address"
+fi
+
+tst_resm TINFO "networks with the same VNI must work"
+# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
+res="TPASS"
+
+if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
+ tst_brkm TBROK "wrong destination address, can be 'uni' or 'multi'"
+fi
+
+vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFE"
+vxlan_compare_netperf || res="TFAIL"
+
+tst_resm $res "done"
+
+tst_resm TINFO "different VNI shall not work together"
+res="TPASS"
+vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFD"
+vxlan_compare_netperf && res="TFAIL"
+
+tst_resm $res "done"
+
+tst_exit
diff --git a/testcases/network/vxlan/Makefile b/testcases/network/vxlan/Makefile
deleted file mode 100644
index 407d88a..0000000
--- a/testcases/network/vxlan/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
-#
-# 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, write the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-top_srcdir ?= ../../..
-
-include $(top_srcdir)/include/mk/env_pre.mk
-
-INSTALL_TARGETS := vxlan_lib.sh \
- vxlan01.sh \
- vxlan02.sh \
- vxlan03.sh \
-
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/vxlan/vxlan01.sh b/testcases/network/vxlan/vxlan01.sh
deleted file mode 100755
index 85a57ea..0000000
--- a/testcases/network/vxlan/vxlan01.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
-#
-# Test-case 1: Local test, check if we can create 5000 VXLAN interfaces.
-#
-
-TCID=vxlan01
-TST_TOTAL=1
-
-virt_type="vxlan"
-start_id=16700000
-virt_max=5000
-
-. test_net.sh
-. vxlan_lib.sh
-
-max=$(( $start_id + $virt_max ))
-tst_resm TINFO "create $virt_max VXLANs, then delete them"
-opt="group 239.1.1.1"
-
-vnis=$(seq $start_id $max)
-
-for i in $vnis; do
- ROD_SILENT "ip link add ltp_v${i} type vxlan id $i $opt"
- ROD_SILENT "ip link set ltp_v${i} up"
-done
-
-for i in $vnis; do
- ROD_SILENT "ip link set ltp_v${i} down"
- ROD_SILENT "ip link delete ltp_v${i}"
-done
-
-tst_resm TPASS "done"
-
-tst_exit
diff --git a/testcases/network/vxlan/vxlan02.sh b/testcases/network/vxlan/vxlan02.sh
deleted file mode 100755
index ca82c58..0000000
--- a/testcases/network/vxlan/vxlan02.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
-#
-# Test-case 1: Local test, check if we can create and then delete VXLAN
-# interface 5000 times.
-#
-
-TCID=vxlan02
-TST_TOTAL=1
-
-virt_type="vxlan"
-start_id=16700000
-virt_max=5000
-
-. test_net.sh
-. vxlan_lib.sh
-
-opt="group 239.1.1.1"
-tst_resm TINFO "create, delete ltp_v0 $virt_max times"
-
-for i in $(seq 0 $virt_max); do
- ROD_SILENT "ip link add ltp_v0 type vxlan id $start_id $opt"
- ROD_SILENT "ip link set ltp_v0 up"
- ROD_SILENT "ip link delete ltp_v0"
-done
-tst_resm TPASS "done"
-
-tst_exit
diff --git a/testcases/network/vxlan/vxlan03.sh b/testcases/network/vxlan/vxlan03.sh
deleted file mode 100755
index 7e8ffd1..0000000
--- a/testcases/network/vxlan/vxlan03.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
-#
-# Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
-# sub-nets between two hosts, then will compare TCP performance
-# with and without VxLAN using ping or tcp_fastopen test.
-#
-# Test-case 2: The same as above but must fail, because VXLAN allows
-# to communicate only within the same VXLAN segment.
-
-TCID=vxlan03
-TST_TOTAL=2
-
-virt_type="vxlan"
-start_id=16700000
-
-# In average cases (with small packets less then 150 bytes) vxlan slower
-# by 10-30%. If hosts are too close to each one, e.g. connected to the same
-# switch the performance can be slower by 50%. Set 60% as default, the above
-# will be an error in VXLAN.
-virt_threshold=60
-
-# Destination address, can be unicast or multicast address
-vxlan_dst_addr="uni"
-
-. test_net.sh
-. vxlan_lib.sh
-
-cleanup()
-{
- cleanup_vifaces
- tst_rhost_run -c "ip link delete ltp_v0"
- if [ "$net_load" = "TFO" ]; then
- tst_rhost_run -c "pkill -9 tcp_fastopen\$"
- pkill -9 "tcp_fastopen\$"
- fi
-}
-TST_CLEANUP="cleanup"
-
-if [ "$net_load" = "TFO" ]; then
- tst_check_cmds "tcp_fastopen"
-fi
-
-if [ -z $ip_local -o -z $ip_remote ]; then
- tst_brkm TBROK "you must specify IP address"
-fi
-
-tst_resm TINFO "networks with the same VNI must work"
-# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
-res="TPASS"
-
-if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
- tst_brkm TBROK "wrong destination address, can be 'uni' or 'multi'"
-fi
-
-vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFE"
-vxlan_compare_netperf || res="TFAIL"
-
-tst_resm $res "done"
-
-tst_resm TINFO "different VNI shall not work together"
-res="TPASS"
-vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFD"
-vxlan_compare_netperf && res="TFAIL"
-
-tst_resm $res "done"
-
-tst_exit
diff --git a/testcases/network/vxlan/vxlan_lib.sh b/testcases/network/vxlan/vxlan_lib.sh
deleted file mode 100644
index d6ae77c..0000000
--- a/testcases/network/vxlan/vxlan_lib.sh
+++ /dev/null
@@ -1,211 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
-#
-# VxLAN
-# -----
-# Virtual eXtensible Local Area Network (VxLAN) provides L2 networks
-# over existed L3 networks. It is using UDP (port 8472) to encapsulate
-# data packets. More information:
-# http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-08
-#
-# Warning: Test assumes that machines don't have any existed VxLANs.
-# If machine has VxLANs, the test might fail or eventually delete
-# them in cleanup function. See "start_vni" variable which can
-# solve it.
-
-ip_local=$(tst_ipaddr)
-ip_virt_local="192.168.124.1"
-ip6_virt_local="fe80::381c:c0ff:fea8:7c01"
-mac_virt_local="3A:1C:C0:A8:7C:01"
-
-ip_remote=$(tst_ipaddr rhost)
-ip_virt_remote="192.168.124.2"
-ip6_virt_remote="fe80::381c:c0ff:fea8:7c02"
-mac_virt_remote="3A:1C:C0:A8:7C:02"
-
-clients_num=2
-client_requests=500000
-max_requests=3
-net_load="TFO"
-virt_threshold=30
-
-while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
- case "$opt" in
- h)
- echo "Usage:"
- echo "h help"
- echo "s use ssh to run remote cmds"
- echo "x n n is a number of interfaces for tc1 and tc2"
- echo "i n start ID to use"
- echo "r n client requests for TCP performance test"
- echo "c n clients run concurrently in TCP perf"
- echo "R n num of reqs, after which conn.closed in TCP perf"
- echo "p x x and x + 1 are ports in TCP perf"
- echo "n x virtual network 192.168.x"
- echo "l x network load: x is PING or TFO(tcp_fastopen)"
- echo "t x performance threshold, default is 60%"
- echo "d x VxLAN destination address, 'uni' or 'multi'"
- echo "6 run over IPv6"
- exit 0
- ;;
- s) TST_USE_SSH=1 ;;
- x) virt_max=$OPTARG ;;
- i) start_id=$OPTARG ;;
- c) clients_num=$OPTARG ;;
- r) client_requests=$OPTARG ;;
- R) max_requests=$OPTARG ;;
- p) srv_port=$OPTARG ;;
- n)
- ip_virt_local="192.168.${OPTARG}.1"
- ip_virt_remote="192.168.${OPTARG}.2"
- ;;
- l) net_load=$OPTARG ;;
- t) virt_threshold=$OPTARG ;;
- d) vxlan_dst_addr=$OPTARG ;;
- 6) # skip, test_net library already processed it
- ;;
- *)
- tst_brkm TBROK "unknown option: $opt"
- ;;
- esac
-done
-
-cleanup_vifaces()
-{
- tst_resm TINFO "cleanup virtual interfaces..."
- local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
- for vx in $viface; do
- ip link delete $vx
- done
-}
-
-TST_CLEANUP="cleanup_vifaces"
-trap "tst_brkm TBROK 'test interrupted'" INT
-
-virt_setup()
-{
- local opt="$1"
- local opt_r="$2"
-
- tst_resm TINFO "setup local ${virt_type} with '$opt'"
-
- ROD_SILENT "ip li add ltp_v0 type $virt_type $opt"
- ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
- ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
- ROD_SILENT "ip li set up ltp_v0"
-
- tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
-
- tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $opt_r"
- tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
- tst_rhost_run -s -c "ip addr add ${ip_virt_remote}/24 dev ltp_v0"
- tst_rhost_run -s -c "ip li set up ltp_v0"
-}
-
-vxlan_setup_subnet_uni()
-{
- tst_kvercmp 3 10 0 && \
- tst_brkm TCONF "test must be run with kernel 3.10 or newer"
-
- [ "$(ip li add type vxlan help 2>&1 | grep remote)" ] || \
- tst_brkm TCONF "iproute doesn't support remote unicast address"
-
- local opt="id $1 remote $(tst_ipaddr rhost)"
- local opt_r="id $2 remote $(tst_ipaddr)"
-
- virt_setup "$opt" "$opt_r"
-}
-
-vxlan_setup_subnet_multi()
-{
- tst_check_cmds "od"
- local b1=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
- local b2=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
- local b3=$(($(od -An -d -N1 /dev/urandom) % 254 + 1))
-
- local grp=
- if [ "$TST_IPV6" ]; then
- grp="group ff05::$(printf '%x:%x%x' $b1 $b2 $b3)"
- else
- grp="group 239.$b1.$b2.$b3"
- fi
-
- local opt="id $1 $grp dev $(tst_iface)"
- local opt_r="id $2 $grp dev $(tst_iface rhost)"
-
- virt_setup "$opt" "$opt_r"
-}
-
-virt_compare_netperf()
-{
- local ret=0
- tst_netload $ip_virt_remote res_ipv4 $net_load || ret=1
- tst_netload ${ip6_virt_remote}%ltp_v0 res_ipv6 $net_load || ret=1
-
- ROD_SILENT "ip link delete ltp_v0"
- tst_rhost_run -s -c "ip link delete ltp_v0"
- [ "$ret" -eq 1 ] && return 1
- local vt="$(cat res_ipv4)"
- local vt6="$(cat res_ipv6)"
-
- tst_netload $ip_remote res_ipv4 $net_load || return 1
-
- local lt="$(cat res_ipv4)"
- tst_resm TINFO "time lan($lt) $virt_type IPv4($vt) and IPv6($vt6) ms"
-
- per=$(( $vt * 100 / $lt - 100 ))
- per6=$(( $vt6 * 100 / $lt - 100 ))
-
- case "$virt_type" in
- vxlan)
- tst_resm TINFO "IPv4 VxLAN over IPv$ipver slower by $per %"
- tst_resm TINFO "IPv6 VxLAN over IPv$ipver slower by $per6 %"
- ;;
- *)
- tst_resm TINFO "IPv4 $virt_type slower by $per %"
- tst_resm TINFO "IPv6 $virt_type slower by $per6 %"
- esac
- [ "$per" -ge "$virt_threshold" -o "$per6" -ge "$virt_threshold" ] \
- && ret=1
-
- return $ret
-}
-
-tst_require_root
-
-case "$virt_type" in
-vxlan)
- tst_kvercmp 3 8 0 && \
- tst_brkm TCONF "test must be run with kernel 3.8 or newer"
-
- if [ "$TST_IPV6" ]; then
- tst_kvercmp 3 12 0 && \
- tst_brkm TCONF "test must be run with kernels >= 3.12"
- fi
-;;
-esac
-
-ipver=${TST_IPV6:-'4'}
-
-tst_check_cmds "ip"
-
-ip link add ltp_v0 type $virt_type > /dev/null 2>&1
-if [ $? -ne 0 ]; then
- tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
-fi
-ROD_SILENT "ip link delete ltp_v0"
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 03/23] network/virt_lib.sh: add virt_add() and virt_add_rhost()
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 01/23] network/vxlan: make names more abstract, use 'virt' Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 02/23] network/vxlan: rename vxlan dir and library to 'virt' Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup Alexey Kodanev
` (20 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Adding different types of virtual interfaces is almost similar
with ip command, although vxlan has a little bit differ syntax.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index d6ae77c..e8eedca 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -97,6 +97,31 @@ cleanup_vifaces()
TST_CLEANUP="cleanup_vifaces"
trap "tst_brkm TBROK 'test interrupted'" INT
+virt_add()
+{
+ case $virt_type in
+ vxlan)
+ ip li add ltp_v0 type $virt_type $@
+ ;;
+ *)
+ ip li add link $(tst_iface) ltp_v0 type $virt_type $@
+ ;;
+ esac
+}
+
+virt_add_rhost()
+{
+ case $virt_type in
+ vxlan)
+ tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $@"
+ ;;
+ *)
+ tst_rhost_run -s -c "ip li add link $(tst_iface rhost) ltp_v0 \
+ type $virt_type $@"
+ ;;
+ esac
+}
+
virt_setup()
{
local opt="$1"
@@ -104,14 +129,14 @@ virt_setup()
tst_resm TINFO "setup local ${virt_type} with '$opt'"
- ROD_SILENT "ip li add ltp_v0 type $virt_type $opt"
+ ROD_SILENT "virt_add $opt"
ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
ROD_SILENT "ip li set up ltp_v0"
tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
- tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $opt_r"
+ virt_add_rhost "$opt_r"
tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
tst_rhost_run -s -c "ip addr add ${ip_virt_remote}/24 dev ltp_v0"
tst_rhost_run -s -c "ip li set up ltp_v0"
@@ -204,8 +229,7 @@ ipver=${TST_IPV6:-'4'}
tst_check_cmds "ip"
-ip link add ltp_v0 type $virt_type > /dev/null 2>&1
-if [ $? -ne 0 ]; then
+virt_add || \
tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
-fi
+
ROD_SILENT "ip link delete ltp_v0"
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (2 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 03/23] network/virt_lib.sh: add virt_add() and virt_add_rhost() Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:00 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 05/23] network/virt_lib.sh: fix regexpr " Alexey Kodanev
` (19 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index e8eedca..9024a3e 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -90,7 +90,8 @@ cleanup_vifaces()
tst_resm TINFO "cleanup virtual interfaces..."
local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
for vx in $viface; do
- ip link delete $vx
+ ROD_SILENT "ip link set $vx down"
+ ROD_SILENT "ip link delete $vx"
done
}
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 05/23] network/virt_lib.sh: fix regexpr in cleanup
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (3 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 06/23] network/virt/vlan01: add new test-case Alexey Kodanev
` (18 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
So that 'ltp_v0@xxx' names are included too.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 9024a3e..22e4415 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -88,7 +88,7 @@ done
cleanup_vifaces()
{
tst_resm TINFO "cleanup virtual interfaces..."
- local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
+ local viface=`ip li | sed -nE 's/^[0-9]+: (ltp_v[0-9]+)[@:].+/\1/p'`
for vx in $viface; do
ROD_SILENT "ip link set $vx down"
ROD_SILENT "ip link delete $vx"
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 06/23] network/virt/vlan01: add new test-case
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (4 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 05/23] network/virt_lib.sh: fix regexpr " Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 07/23] network/virt/vlan02: " Alexey Kodanev
` (17 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
This is similar to vxlan01 test. Create test interfaces
in the specified range. So move common code from vxlan01.sh
to virt_lib.sh.
Also some minor fixes:
* add two options to virt_add() so that interface name
could be changed
* add default options to vlan and vxlan
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 2 ++
testcases/network/virt/Makefile | 1 +
testcases/network/virt/virt_lib.sh | 33 +++++++++++++++++++++++++++++----
testcases/network/virt/vlan01.sh | 34 ++++++++++++++++++++++++++++++++++
testcases/network/virt/vxlan01.sh | 18 +-----------------
5 files changed, 67 insertions(+), 21 deletions(-)
create mode 100755 testcases/network/virt/vlan01.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index dd8e1a4..59de5b0 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -13,3 +13,5 @@ vxlan_uni_03 vxlan03.sh -d uni
vxlan_ipv6_multi_03 vxlan03.sh -6 -d multi
vxlan_ipv6_uni_03 vxlan03.sh -6 -d uni
+
+vlan01 vlan01.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index d05890f..7ed0621 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -19,6 +19,7 @@ top_srcdir ?= ../../..
include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := virt_lib.sh \
+ vlan01.sh \
vxlan01.sh \
vxlan02.sh \
vxlan03.sh \
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 22e4415..fb1270a 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -100,12 +100,21 @@ trap "tst_brkm TBROK 'test interrupted'" INT
virt_add()
{
+ local vname=$1
+ local opt="${@:2}"
+
+ case $virt_type in
+ vlan|vxlan)
+ [ -z "$opt" ] && opt="id 4094"
+ ;;
+ esac
+
case $virt_type in
vxlan)
- ip li add ltp_v0 type $virt_type $@
+ ip li add $vname type $virt_type $opt
;;
*)
- ip li add link $(tst_iface) ltp_v0 type $virt_type $@
+ ip li add link $(tst_iface) $vname type $virt_type $opt
;;
esac
}
@@ -123,6 +132,22 @@ virt_add_rhost()
esac
}
+virt_multiple_add_test()
+{
+ local opt="$@"
+ local max=$(($start_id + $virt_max))
+
+ tst_resm TINFO "create $virt_max $virt_type"
+
+ local vnis=$(seq $start_id $max)
+
+ for i in $vnis; do
+ ROD_SILENT "virt_add ltp_v$i id $i $opt"
+ ROD_SILENT "ip link set ltp_v$i up"
+ done
+ tst_resm TPASS "done"
+}
+
virt_setup()
{
local opt="$1"
@@ -130,7 +155,7 @@ virt_setup()
tst_resm TINFO "setup local ${virt_type} with '$opt'"
- ROD_SILENT "virt_add $opt"
+ ROD_SILENT "virt_add ltp_v0 $opt"
ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
ROD_SILENT "ip li set up ltp_v0"
@@ -230,7 +255,7 @@ ipver=${TST_IPV6:-'4'}
tst_check_cmds "ip"
-virt_add || \
+virt_add ltp_v0 || \
tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
ROD_SILENT "ip link delete ltp_v0"
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
new file mode 100755
index 0000000..9136fbb
--- /dev/null
+++ b/testcases/network/virt/vlan01.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create 4095 VLAN interfaces.
+#
+
+TCID=vlan01
+TST_TOTAL=1
+
+virt_type="vlan"
+start_id=0
+virt_max=4094
+
+. test_net.sh
+. virt_lib.sh
+
+virt_multiple_add_test
+
+tst_exit
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index a8624a3..808726c 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -29,22 +29,6 @@ virt_max=5000
. test_net.sh
. virt_lib.sh
-max=$(( $start_id + $virt_max ))
-tst_resm TINFO "create $virt_max VXLANs, then delete them"
-opt="group 239.1.1.1"
-
-vnis=$(seq $start_id $max)
-
-for i in $vnis; do
- ROD_SILENT "ip link add ltp_v${i} type vxlan id $i $opt"
- ROD_SILENT "ip link set ltp_v${i} up"
-done
-
-for i in $vnis; do
- ROD_SILENT "ip link set ltp_v${i} down"
- ROD_SILENT "ip link delete ltp_v${i}"
-done
-
-tst_resm TPASS "done"
+virt_multiple_add_test "group 239.1.1.1"
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 07/23] network/virt/vlan02: add new test-case
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (5 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 06/23] network/virt/vlan01: add new test-case Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 08/23] network/virt: rename virt_max to virt_count Alexey Kodanev
` (16 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Based on vxlan02 test-cases. Common code moved to
virt_lib.sh.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 1 +
testcases/network/virt/Makefile | 1 +
testcases/network/virt/virt_lib.sh | 13 +++++++++++++
testcases/network/virt/vlan02.sh | 34 ++++++++++++++++++++++++++++++++++
testcases/network/virt/vxlan02.sh | 8 +-------
5 files changed, 50 insertions(+), 7 deletions(-)
create mode 100755 testcases/network/virt/vlan02.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index 59de5b0..35bcfaf 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -15,3 +15,4 @@ vxlan_ipv6_multi_03 vxlan03.sh -6 -d multi
vxlan_ipv6_uni_03 vxlan03.sh -6 -d uni
vlan01 vlan01.sh
+vlan02 vlan02.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index 7ed0621..2ef0b37 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -20,6 +20,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := virt_lib.sh \
vlan01.sh \
+ vlan02.sh \
vxlan01.sh \
vxlan02.sh \
vxlan03.sh \
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index fb1270a..6705868 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -148,6 +148,19 @@ virt_multiple_add_test()
tst_resm TPASS "done"
}
+virt_add_delete_test()
+{
+ local opt="$@"
+ tst_resm TINFO "create, delete $virt_type $virt_max times"
+
+ for i in $(seq 0 $virt_max); do
+ ROD_SILENT "virt_add ltp_v0 $opt"
+ ROD_SILENT "ip link set ltp_v0 up"
+ ROD_SILENT "ip link delete ltp_v0"
+ done
+ tst_resm TPASS "done"
+}
+
virt_setup()
{
local opt="$1"
diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
new file mode 100755
index 0000000..a37bd73
--- /dev/null
+++ b/testcases/network/virt/vlan02.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create and then delete VLAN
+# interface 4095 times.
+#
+
+TCID=vlan02
+TST_TOTAL=1
+
+virt_type="vlan"
+virt_max="4094"
+
+. test_net.sh
+. virt_lib.sh
+
+virt_add_delete_test "id 4094"
+
+tst_exit
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index a0b9267..284a469 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -31,13 +31,7 @@ virt_max=5000
. virt_lib.sh
opt="group 239.1.1.1"
-tst_resm TINFO "create, delete ltp_v0 $virt_max times"
-for i in $(seq 0 $virt_max); do
- ROD_SILENT "ip link add ltp_v0 type vxlan id $start_id $opt"
- ROD_SILENT "ip link set ltp_v0 up"
- ROD_SILENT "ip link delete ltp_v0"
-done
-tst_resm TPASS "done"
+virt_add_delete_test "id $start_id $opt"
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 08/23] network/virt: rename virt_max to virt_count
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (6 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 07/23] network/virt/vlan02: " Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case Alexey Kodanev
` (15 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
"virt_max" name could be misleading as it is not the max
value of interfaces but rather the number of interfaces.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 16 ++++++++--------
testcases/network/virt/vlan01.sh | 2 +-
testcases/network/virt/vlan02.sh | 2 +-
testcases/network/virt/vxlan01.sh | 2 +-
testcases/network/virt/vxlan02.sh | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 6705868..77fa788 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -64,7 +64,7 @@ while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
exit 0
;;
s) TST_USE_SSH=1 ;;
- x) virt_max=$OPTARG ;;
+ x) virt_count=$OPTARG ;;
i) start_id=$OPTARG ;;
c) clients_num=$OPTARG ;;
r) client_requests=$OPTARG ;;
@@ -135,13 +135,11 @@ virt_add_rhost()
virt_multiple_add_test()
{
local opt="$@"
- local max=$(($start_id + $virt_max))
+ local max=$(($start_id + $virt_count - 1))
- tst_resm TINFO "create $virt_max $virt_type"
+ tst_resm TINFO "add $virt_count $virt_type, then delete"
- local vnis=$(seq $start_id $max)
-
- for i in $vnis; do
+ for i in $(seq $start_id $max); do
ROD_SILENT "virt_add ltp_v$i id $i $opt"
ROD_SILENT "ip link set ltp_v$i up"
done
@@ -151,9 +149,11 @@ virt_multiple_add_test()
virt_add_delete_test()
{
local opt="$@"
- tst_resm TINFO "create, delete $virt_type $virt_max times"
+ local max=$(($virt_count - 1))
+
+ tst_resm TINFO "add/del $virt_type $virt_count times"
- for i in $(seq 0 $virt_max); do
+ for i in $(seq 0 $max); do
ROD_SILENT "virt_add ltp_v0 $opt"
ROD_SILENT "ip link set ltp_v0 up"
ROD_SILENT "ip link delete ltp_v0"
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index 9136fbb..0e86668 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -24,7 +24,7 @@ TST_TOTAL=1
virt_type="vlan"
start_id=0
-virt_max=4094
+virt_count=4095
. test_net.sh
. virt_lib.sh
diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
index a37bd73..0fb35a3 100755
--- a/testcases/network/virt/vlan02.sh
+++ b/testcases/network/virt/vlan02.sh
@@ -24,7 +24,7 @@ TCID=vlan02
TST_TOTAL=1
virt_type="vlan"
-virt_max="4094"
+virt_count=4095
. test_net.sh
. virt_lib.sh
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index 808726c..6673d7e 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -24,7 +24,7 @@ TST_TOTAL=1
virt_type="vxlan"
start_id=16700000
-virt_max=5000
+virt_count=5000
. test_net.sh
. virt_lib.sh
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index 284a469..1470495 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -25,7 +25,7 @@ TST_TOTAL=1
virt_type="vxlan"
start_id=16700000
-virt_max=5000
+virt_count=5000
. test_net.sh
. virt_lib.sh
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (7 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 08/23] network/virt: rename virt_max to virt_count Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:12 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 10/23] network/virt/vlan01.sh: add protocol, loose_binding and hdr options Alexey Kodanev
` (14 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
It is based on vxlan03 test-case and use the same approach.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 1 +
testcases/network/virt/Makefile | 1 +
testcases/network/virt/vlan03.sh | 69 ++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 0 deletions(-)
create mode 100755 testcases/network/virt/vlan03.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index 35bcfaf..2071d94 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -16,3 +16,4 @@ vxlan_ipv6_uni_03 vxlan03.sh -6 -d uni
vlan01 vlan01.sh
vlan02 vlan02.sh
+vlan03 vlan03.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index 2ef0b37..af19f5b 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -21,6 +21,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := virt_lib.sh \
vlan01.sh \
vlan02.sh \
+ vlan03.sh \
vxlan01.sh \
vxlan02.sh \
vxlan03.sh \
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
new file mode 100755
index 0000000..4cc9a05
--- /dev/null
+++ b/testcases/network/virt/vlan03.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
+# sub-nets between two hosts, then will compare TCP performance
+# with and without VLAN using ping or tcp_fastopen test.
+#
+# Test-case 2: The same as above but must fail, because VLAN allows
+# to communicate only within the same VLAN segment.
+
+TCID=vlan03
+TST_TOTAL=2
+
+virt_type="vlan"
+
+. test_net.sh
+. virt_lib.sh
+
+cleanup()
+{
+ cleanup_vifaces
+ tst_rhost_run -c "ip link delete ltp_v0"
+ if [ "$net_load" = "TFO" ]; then
+ tst_rhost_run -c "pkill -9 tcp_fastopen\$"
+ pkill -9 "tcp_fastopen\$"
+ fi
+}
+TST_CLEANUP="cleanup"
+
+if [ "$net_load" = "TFO" ]; then
+ tst_check_cmds "tcp_fastopen"
+fi
+
+if [ -z $ip_local -o -z $ip_remote ]; then
+ tst_brkm TBROK "you must specify IP address"
+fi
+
+tst_resm TINFO "networks with the same VLAN ID must work"
+
+res="TPASS"
+
+virt_setup "id 4094" "id 4094"
+virt_compare_netperf || res="TFAIL"
+
+tst_resm $res "done"
+
+tst_resm TINFO "different VLAN ID shall not work together"
+res="TPASS"
+virt_setup "id 4093" "id 4094"
+virt_compare_netperf && res="TFAIL"
+
+tst_resm $res "done"
+
+tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 10/23] network/virt/vlan01.sh: add protocol, loose_binding and hdr options
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (8 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 11/23] network/virt/vlan03.sh: " Alexey Kodanev
` (13 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
protocol {802.1Q | 802.1ad}, loose_binding {off | on} and
reorder_hdr {off | on}.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/vlan01.sh | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index 0e86668..c4d56e8 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -23,12 +23,39 @@ TCID=vlan01
TST_TOTAL=1
virt_type="vlan"
-start_id=0
-virt_count=4095
. test_net.sh
. virt_lib.sh
-virt_multiple_add_test
+p0="protocol 802.1Q"
+p1="protocol 802.1ad"
+lb0="loose_binding off"
+lb1="loose_binding on"
+rh0="reorder_hdr off"
+rh1="reorder_hdr on"
+
+opts="$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
+$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1,"
+
+start_id=1
+virt_count=500
+
+for n in $(seq 1 8); do
+ params="$(echo $opts | cut -d',' -f$n)"
+
+ tst_resm TINFO "add $virt_type with '$params'"
+
+ virt_add ltp_v0 id 0 $params > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support '$params'"
+ params=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_multiple_add_test "$params"
+
+ start_id=$(($start_id + $virt_count))
+done
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 11/23] network/virt/vlan03.sh: add protocol, loose_binding and hdr options
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (9 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 10/23] network/virt/vlan01.sh: add protocol, loose_binding and hdr options Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 12/23] network/virt: add new macvlan01 test Alexey Kodanev
` (12 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
protocol {802.1Q | 802.1ad}, loose_binding {off | on} and
reorder_hdr {off | on}.
The options combinations are less than in vlan01 test in order to
not waste too much time for no good reason.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/vlan01.sh | 2 +-
testcases/network/virt/vlan03.sh | 39 ++++++++++++++++++++++++++++---------
2 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index c4d56e8..ac74463 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -20,7 +20,7 @@
#
TCID=vlan01
-TST_TOTAL=1
+TST_TOTAL=8
virt_type="vlan"
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index 4cc9a05..670a241 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -24,7 +24,7 @@
# to communicate only within the same VLAN segment.
TCID=vlan03
-TST_TOTAL=2
+TST_TOTAL=8
virt_type="vlan"
@@ -51,19 +51,38 @@ if [ -z $ip_local -o -z $ip_remote ]; then
fi
tst_resm TINFO "networks with the same VLAN ID must work"
-
res="TPASS"
-virt_setup "id 4094" "id 4094"
-virt_compare_netperf || res="TFAIL"
+p0="protocol 802.1Q"
+p1="protocol 802.1ad"
+lb0="loose_binding off"
+lb1="loose_binding on"
+rh0="reorder_hdr off"
+rh1="reorder_hdr on"
-tst_resm $res "done"
+opts="$p0 $lb0 $rh0,$p0 $lb1 $rh1,$p1 $lb0 $rh0,$p1 $lb1 $rh1"
-tst_resm TINFO "different VLAN ID shall not work together"
-res="TPASS"
-virt_setup "id 4093" "id 4094"
-virt_compare_netperf && res="TFAIL"
+for n in $(seq 1 4); do
+ params="$(echo $opts | cut -d',' -f$n)"
+
+ virt_add ltp_v0 id 0 $params > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support '$params'"
+ continue
+ fi
+ ROD_SILENT "ip li delete ltp_v0"
+
+ virt_setup "id 4094 $params" "id 4094 $params"
+ virt_compare_netperf || res="TFAIL"
+
+ tst_resm $res "done"
+
+ tst_resm TINFO "different VLAN ID shall not work together"
+ res="TPASS"
+ virt_setup "id 4093 $params" "id 4094 $params"
+ virt_compare_netperf && res="TFAIL"
-tst_resm $res "done"
+ tst_resm $res "done"
+done
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 12/23] network/virt: add new macvlan01 test
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (10 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 11/23] network/virt/vlan03.sh: " Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 13/23] network/virt: add new ipvlan01 test Alexey Kodanev
` (11 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Based on vlan02 test. It creates then deletes macvlan interfaces
multiple times with private, vepa, bridge and passthru modes.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 2 +
testcases/network/virt/Makefile | 3 +-
testcases/network/virt/macvlan01.sh | 51 +++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletions(-)
create mode 100755 testcases/network/virt/macvlan01.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index 2071d94..bc62919 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -17,3 +17,5 @@ vxlan_ipv6_uni_03 vxlan03.sh -6 -d uni
vlan01 vlan01.sh
vlan02 vlan02.sh
vlan03 vlan03.sh
+
+macvlan01 macvlan01.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index af19f5b..4cc9de9 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -18,7 +18,8 @@ top_srcdir ?= ../../..
include $(top_srcdir)/include/mk/env_pre.mk
-INSTALL_TARGETS := virt_lib.sh \
+INSTALL_TARGETS := macvlan01.sh \
+ virt_lib.sh \
vlan01.sh \
vlan02.sh \
vlan03.sh \
diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
new file mode 100755
index 0000000..aac9d02
--- /dev/null
+++ b/testcases/network/virt/macvlan01.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create and then delete macvlan
+# interface 500 times.
+
+TCID=macvlan01
+TST_TOTAL=4
+
+virt_type="macvlan"
+
+. test_net.sh
+. virt_lib.sh
+
+modes="private vepa bridge passthru"
+
+start_id=1
+virt_count=500
+
+for m in $modes; do
+ tst_resm TINFO "add $virt_type with mode '$m'"
+
+ virt_add ltp_v0 mode $m > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
+ m=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_add_delete_test "mode $m"
+
+ start_id=$(($start_id + $virt_count))
+done
+
+tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 13/23] network/virt: add new ipvlan01 test
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (11 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 12/23] network/virt: add new macvlan01 test Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 14/23] network/virt/vxlan01.sh: add parameters Alexey Kodanev
` (10 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Based on vlan02 test. It creates then deletes ipvlan
interfaces multiple times with mode l2 and l3.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 2 +
testcases/network/virt/Makefile | 3 +-
testcases/network/virt/ipvlan01.sh | 51 ++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletions(-)
create mode 100755 testcases/network/virt/ipvlan01.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index bc62919..d2451ba 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -19,3 +19,5 @@ vlan02 vlan02.sh
vlan03 vlan03.sh
macvlan01 macvlan01.sh
+
+ipvlan01 ipvlan01.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index 4cc9de9..170852d 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -18,7 +18,8 @@ top_srcdir ?= ../../..
include $(top_srcdir)/include/mk/env_pre.mk
-INSTALL_TARGETS := macvlan01.sh \
+INSTALL_TARGETS := ipvlan01.sh \
+ macvlan01.sh \
virt_lib.sh \
vlan01.sh \
vlan02.sh \
diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
new file mode 100755
index 0000000..2044fb8
--- /dev/null
+++ b/testcases/network/virt/ipvlan01.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create and then delete ipvlan
+# interface 500 times.
+
+TCID=ipvlan01
+TST_TOTAL=2
+
+virt_type="ipvlan"
+
+. test_net.sh
+. virt_lib.sh
+
+modes="l2 l3"
+
+start_id=1
+virt_count=500
+
+for m in $modes; do
+ tst_resm TINFO "add $virt_type with mode '$m'"
+
+ virt_add ltp_v0 mode $m > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
+ m=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_add_delete_test "mode $m"
+
+ start_id=$(($start_id + $virt_count))
+done
+
+tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 14/23] network/virt/vxlan01.sh: add parameters
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (12 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 13/23] network/virt: add new ipvlan01 test Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 15/23] network/virt/vxlan03.sh: add VXLAN-GBP (group policy context) test Alexey Kodanev
` (9 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Add some parameters while adding VxLAN virtual interfaces such as:
l2miss, l3miss, norsc, nolearning, noproxy, ttl, tos, gbp.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/vxlan01.sh | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index 6673d7e..63a52d0 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -24,11 +24,31 @@ TST_TOTAL=1
virt_type="vxlan"
start_id=16700000
-virt_count=5000
. test_net.sh
. virt_lib.sh
-virt_multiple_add_test "group 239.1.1.1"
+opts="l2miss l3miss,norsc nolearning noproxy,ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
+
+start_id=1
+virt_count=1000
+
+for n in $(seq 1 5); do
+ params="$(echo $opts | cut -d',' -f$n)"
+
+ tst_resm TINFO "add $virt_type with '$params'"
+
+ virt_add ltp_v0 id 0 $params > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support '$params'"
+ params=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_multiple_add_test "$params"
+
+ start_id=$(($start_id + $virt_count))
+done
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 15/23] network/virt/vxlan03.sh: add VXLAN-GBP (group policy context) test
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (13 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 14/23] network/virt/vxlan01.sh: add parameters Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 16/23] network/virt: add macvtap01 test Alexey Kodanev
` (8 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
If supported by kernel and iproute, VxLAN header will include the mark
with group policy context. The test performs with and without gbp option.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/vxlan03.sh | 41 ++++++++++++++++++++++++------------
1 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index 033d801..14524d4 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -60,24 +60,37 @@ if [ -z $ip_local -o -z $ip_remote ]; then
tst_brkm TBROK "you must specify IP address"
fi
-tst_resm TINFO "networks with the same VNI must work"
-# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
-res="TPASS"
+opts="dstport 0,dstport 0 gbp"
-if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
- tst_brkm TBROK "wrong destination address, can be 'uni' or 'multi'"
-fi
+for n in $(seq 1 2); do
+ params="$(echo $opts | cut -d',' -f$n)"
+
+ virt_add ltp_v0 id 0 $params > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support '$params'"
+ continue
+ fi
+ ROD_SILENT "ip li delete ltp_v0"
+
+ tst_resm TINFO "networks with the same VNI must work"
+ # VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
+ res="TPASS"
+
+ if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
+ tst_brkm TBROK "wrong dst address, can be 'uni' or 'multi'"
+ fi
-vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFE"
-vxlan_compare_netperf || res="TFAIL"
+ vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFE"
+ vxlan_compare_netperf || res="TFAIL"
-tst_resm $res "done"
+ tst_resm $res "done"
-tst_resm TINFO "different VNI shall not work together"
-res="TPASS"
-vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFD"
-vxlan_compare_netperf && res="TFAIL"
+ tst_resm TINFO "different VNI shall not work together"
+ res="TPASS"
+ vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFD"
+ vxlan_compare_netperf && res="TFAIL"
-tst_resm $res "done"
+ tst_resm $res "done"
+done
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 16/23] network/virt: add macvtap01 test
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (14 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 15/23] network/virt/vxlan03.sh: add VXLAN-GBP (group policy context) test Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:21 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh Alexey Kodanev
` (7 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
It is almost a copy of macvlan01 test as it has the similar
'ip' command interface.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 1 +
testcases/network/virt/Makefile | 1 +
testcases/network/virt/macvtap01.sh | 51 +++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 0 deletions(-)
create mode 100755 testcases/network/virt/macvtap01.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index d2451ba..833258f 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -19,5 +19,6 @@ vlan02 vlan02.sh
vlan03 vlan03.sh
macvlan01 macvlan01.sh
+macvtap01 macvtap01.sh
ipvlan01 ipvlan01.sh
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index 170852d..5b7b847 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -20,6 +20,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := ipvlan01.sh \
macvlan01.sh \
+ macvtap01.sh \
virt_lib.sh \
vlan01.sh \
vlan02.sh \
diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
new file mode 100755
index 0000000..8623080
--- /dev/null
+++ b/testcases/network/virt/macvtap01.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# Test-case 1: Local test, check if we can create and then delete macvtap
+# interface 500 times.
+
+TCID=macvtap01
+TST_TOTAL=4
+
+virt_type="macvtap"
+
+. test_net.sh
+. virt_lib.sh
+
+modes="private vepa bridge passthru"
+
+start_id=1
+virt_count=500
+
+for m in $modes; do
+ tst_resm TINFO "add $virt_type with mode '$m'"
+
+ virt_add ltp_v0 mode $m > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
+ m=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_add_delete_test "mode $m"
+
+ start_id=$(($start_id + $virt_count))
+done
+
+tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (15 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 16/23] network/virt: add macvtap01 test Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:24 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 18/23] network/virt: move checking for command support " Alexey Kodanev
` (6 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
And make use of it in the tests.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 34 ++++++++++++++++++++++++++++++++++
testcases/network/virt/vlan01.sh | 25 +++----------------------
testcases/network/virt/vxlan01.sh | 28 +++++-----------------------
3 files changed, 42 insertions(+), 45 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 77fa788..b27bd6a 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -250,6 +250,40 @@ virt_compare_netperf()
return $ret
}
+# Check if we can create then delete virtual interface n times.
+# virt_test_01 [OPTIONS]
+# OPTIONS - different options separated by comma.
+virt_test_01()
+{
+ start_id=1
+ virt_count=500
+
+ local opts=${1:-""}
+ local n=0
+
+ while ((1)); do
+ n=$((n + 1))
+ p="$(echo $opts | cut -d',' -f$n)"
+ if [ -z "$p" -a $n -gt 1 ]; then
+ break
+ fi
+
+ tst_resm TINFO "add $virt_type with '$p'"
+
+ virt_add ltp_v0 id 0 $p > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute/kernel doesn't support '$p'"
+ p=""
+ else
+ ROD_SILENT "ip li delete ltp_v0"
+ fi
+
+ virt_multiple_add_test "$p"
+
+ start_id=$(($start_id + $virt_count))
+ done
+}
+
tst_require_root
case "$virt_type" in
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index ac74463..fb96562 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -16,7 +16,7 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create 4095 VLAN interfaces.
+# Local test, check if we can create 4000 VLAN interfaces.
#
TCID=vlan01
@@ -34,28 +34,9 @@ lb1="loose_binding on"
rh0="reorder_hdr off"
rh1="reorder_hdr on"
-opts="$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
+options="$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1,"
-start_id=1
-virt_count=500
-
-for n in $(seq 1 8); do
- params="$(echo $opts | cut -d',' -f$n)"
-
- tst_resm TINFO "add $virt_type with '$params'"
-
- virt_add ltp_v0 id 0 $params > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support '$params'"
- params=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
-
- virt_multiple_add_test "$params"
-
- start_id=$(($start_id + $virt_count))
-done
+virt_test_01 "$options"
tst_exit
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index 63a52d0..4dfe3d7 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -16,11 +16,11 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create 5000 VXLAN interfaces.
+# Local test, check if we can create 2500 VXLAN interfaces.
#
TCID=vxlan01
-TST_TOTAL=1
+TST_TOTAL=5
virt_type="vxlan"
start_id=16700000
@@ -28,27 +28,9 @@ start_id=16700000
. test_net.sh
. virt_lib.sh
-opts="l2miss l3miss,norsc nolearning noproxy,ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
+options="l2miss l3miss,norsc nolearning noproxy,\
+ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
-start_id=1
-virt_count=1000
-
-for n in $(seq 1 5); do
- params="$(echo $opts | cut -d',' -f$n)"
-
- tst_resm TINFO "add $virt_type with '$params'"
-
- virt_add ltp_v0 id 0 $params > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support '$params'"
- params=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
-
- virt_multiple_add_test "$params"
-
- start_id=$(($start_id + $virt_count))
-done
+virt_test_01 "$options"
tst_exit
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 18/23] network/virt: move checking for command support to virt_lib.sh
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (16 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:28 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 19/23] network/virt: add test-case 02 " Alexey Kodanev
` (5 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Add new function "virt_check_cmd". Change TCONF to TINFO so that
we just skip not supported options and don't return TCONF as a
end test result.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/ipvlan01.sh | 8 +-------
testcases/network/virt/macvlan01.sh | 8 +-------
testcases/network/virt/macvtap01.sh | 8 +-------
testcases/network/virt/virt_lib.sh | 19 ++++++++++++-------
testcases/network/virt/vlan03.sh | 7 +------
testcases/network/virt/vxlan03.sh | 7 +------
6 files changed, 17 insertions(+), 40 deletions(-)
diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
index 2044fb8..706c1d8 100755
--- a/testcases/network/virt/ipvlan01.sh
+++ b/testcases/network/virt/ipvlan01.sh
@@ -35,13 +35,7 @@ virt_count=500
for m in $modes; do
tst_resm TINFO "add $virt_type with mode '$m'"
- virt_add ltp_v0 mode $m > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
- m=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
+ virt_check_cmd virt_add ltp_v0 mode $m || m=""
virt_add_delete_test "mode $m"
diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
index aac9d02..35febd0 100755
--- a/testcases/network/virt/macvlan01.sh
+++ b/testcases/network/virt/macvlan01.sh
@@ -35,13 +35,7 @@ virt_count=500
for m in $modes; do
tst_resm TINFO "add $virt_type with mode '$m'"
- virt_add ltp_v0 mode $m > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
- m=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
+ virt_check_cmd virt_add ltp_v0 mode $m || m=""
virt_add_delete_test "mode $m"
diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
index 8623080..8bb3636 100755
--- a/testcases/network/virt/macvtap01.sh
+++ b/testcases/network/virt/macvtap01.sh
@@ -35,13 +35,7 @@ virt_count=500
for m in $modes; do
tst_resm TINFO "add $virt_type with mode '$m'"
- virt_add ltp_v0 mode $m > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
- m=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
+ virt_check_cmd virt_add ltp_v0 mode $m || m=""
virt_add_delete_test "mode $m"
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index b27bd6a..2ccba43 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -250,6 +250,17 @@ virt_compare_netperf()
return $ret
}
+virt_check_cmd()
+{
+ $@ > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TINFO "'$@' option(s) not supported, skipping it"
+ return 1
+ fi
+ ROD_SILENT "ip li delete ltp_v0"
+ return 0
+}
+
# Check if we can create then delete virtual interface n times.
# virt_test_01 [OPTIONS]
# OPTIONS - different options separated by comma.
@@ -270,13 +281,7 @@ virt_test_01()
tst_resm TINFO "add $virt_type with '$p'"
- virt_add ltp_v0 id 0 $p > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute/kernel doesn't support '$p'"
- p=""
- else
- ROD_SILENT "ip li delete ltp_v0"
- fi
+ virt_check_cmd virt_add ltp_v0 id 0 $p || p=""
virt_multiple_add_test "$p"
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index 670a241..a067065 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -65,12 +65,7 @@ opts="$p0 $lb0 $rh0,$p0 $lb1 $rh1,$p1 $lb0 $rh0,$p1 $lb1 $rh1"
for n in $(seq 1 4); do
params="$(echo $opts | cut -d',' -f$n)"
- virt_add ltp_v0 id 0 $params > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support '$params'"
- continue
- fi
- ROD_SILENT "ip li delete ltp_v0"
+ virt_check_cmd virt_add ltp_v0 id 0 $params || continue
virt_setup "id 4094 $params" "id 4094 $params"
virt_compare_netperf || res="TFAIL"
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index 14524d4..01fa62d 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -65,12 +65,7 @@ opts="dstport 0,dstport 0 gbp"
for n in $(seq 1 2); do
params="$(echo $opts | cut -d',' -f$n)"
- virt_add ltp_v0 id 0 $params > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TCONF "iproute or kernel doesn't support '$params'"
- continue
- fi
- ROD_SILENT "ip li delete ltp_v0"
+ virt_check_cmd virt_add ltp_v0 id 0 $params || continue
tst_resm TINFO "networks with the same VNI must work"
# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 19/23] network/virt: add test-case 02 to virt_lib.sh
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (17 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 18/23] network/virt: move checking for command support " Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:32 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 20/23] network/virt/vxlan03.sh: fix vxlan_compare_netperf() Alexey Kodanev
` (4 subsequent siblings)
23 siblings, 1 reply; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Add new function virt_test_02() to the library and update
tests with it.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/ipvlan01.sh | 19 ++++---------------
testcases/network/virt/macvlan01.sh | 19 ++++---------------
testcases/network/virt/macvtap01.sh | 19 ++++---------------
testcases/network/virt/virt_lib.sh | 28 ++++++++++++++++++++++++++++
testcases/network/virt/vlan02.sh | 4 ++--
testcases/network/virt/vxlan02.sh | 4 ++--
6 files changed, 44 insertions(+), 49 deletions(-)
diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
index 706c1d8..156de78 100755
--- a/testcases/network/virt/ipvlan01.sh
+++ b/testcases/network/virt/ipvlan01.sh
@@ -16,8 +16,8 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create and then delete ipvlan
-# interface 500 times.
+# Local test, check if we can create and then delete ipvlan
+# interface 1000 times.
TCID=ipvlan01
TST_TOTAL=2
@@ -27,19 +27,8 @@ virt_type="ipvlan"
. test_net.sh
. virt_lib.sh
-modes="l2 l3"
+options="mode l2,mode l3"
-start_id=1
-virt_count=500
-
-for m in $modes; do
- tst_resm TINFO "add $virt_type with mode '$m'"
-
- virt_check_cmd virt_add ltp_v0 mode $m || m=""
-
- virt_add_delete_test "mode $m"
-
- start_id=$(($start_id + $virt_count))
-done
+virt_test_02 "$options"
tst_exit
diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
index 35febd0..402edde 100755
--- a/testcases/network/virt/macvlan01.sh
+++ b/testcases/network/virt/macvlan01.sh
@@ -16,8 +16,8 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create and then delete macvlan
-# interface 500 times.
+# Local test, check if we can create and then delete macvlan
+# interface 2000 times.
TCID=macvlan01
TST_TOTAL=4
@@ -27,19 +27,8 @@ virt_type="macvlan"
. test_net.sh
. virt_lib.sh
-modes="private vepa bridge passthru"
+options="mode private,mode vepa,mode bridge,mode passthru"
-start_id=1
-virt_count=500
-
-for m in $modes; do
- tst_resm TINFO "add $virt_type with mode '$m'"
-
- virt_check_cmd virt_add ltp_v0 mode $m || m=""
-
- virt_add_delete_test "mode $m"
-
- start_id=$(($start_id + $virt_count))
-done
+virt_test_02 "$options"
tst_exit
diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
index 8bb3636..3408c94 100755
--- a/testcases/network/virt/macvtap01.sh
+++ b/testcases/network/virt/macvtap01.sh
@@ -16,8 +16,8 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create and then delete macvtap
-# interface 500 times.
+# Local test, check if we can create and then delete macvtap
+# interface 2000 times.
TCID=macvtap01
TST_TOTAL=4
@@ -27,19 +27,8 @@ virt_type="macvtap"
. test_net.sh
. virt_lib.sh
-modes="private vepa bridge passthru"
+options="mode private,mode vepa,mode bridge,mode passthru"
-start_id=1
-virt_count=500
-
-for m in $modes; do
- tst_resm TINFO "add $virt_type with mode '$m'"
-
- virt_check_cmd virt_add ltp_v0 mode $m || m=""
-
- virt_add_delete_test "mode $m"
-
- start_id=$(($start_id + $virt_count))
-done
+virt_test_02 "$options"
tst_exit
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 2ccba43..d79f7bc 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -289,6 +289,34 @@ virt_test_01()
done
}
+# Check if we can create then delete virtual interface n times.
+# virt_test_02 [OPTIONS]
+# OPTIONS - different options separated by comma.
+virt_test_02()
+{
+ start_id=1
+ virt_count=500
+
+ local opts=${1:-""}
+ local n=0
+
+ while ((1)); do
+ n=$((n + 1))
+ p="$(echo $opts | cut -d',' -f$n)"
+ if [ -z "$p" -a $n -gt 1 ]; then
+ break
+ fi
+
+ tst_resm TINFO "add and then delete $virt_type with '$p'"
+
+ virt_check_cmd virt_add ltp_v0 $p || p=""
+
+ virt_add_delete_test "$p"
+
+ start_id=$(($start_id + $virt_count))
+ done
+}
+
tst_require_root
case "$virt_type" in
diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
index 0fb35a3..60addba 100755
--- a/testcases/network/virt/vlan02.sh
+++ b/testcases/network/virt/vlan02.sh
@@ -16,8 +16,8 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create and then delete VLAN
-# interface 4095 times.
+# Local test, check if we can create and then delete VLAN
+# interface 4095 times.
#
TCID=vlan02
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index 1470495..0b3a21c 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -16,8 +16,8 @@
#
# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
#
-# Test-case 1: Local test, check if we can create and then delete VXLAN
-# interface 5000 times.
+# Local test, check if we can create and then delete VXLAN
+# interface 5000 times.
#
TCID=vxlan02
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 20/23] network/virt/vxlan03.sh: fix vxlan_compare_netperf()
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (18 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 19/23] network/virt: add test-case 02 " Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 21/23] network/virt: add gre tunnel test Alexey Kodanev
` (3 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Also fix number of running test-cases.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 8 ++++----
testcases/network/virt/vxlan03.sh | 24 ++++++++++++------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index d79f7bc..9597c84 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -189,8 +189,8 @@ vxlan_setup_subnet_uni()
[ "$(ip li add type vxlan help 2>&1 | grep remote)" ] || \
tst_brkm TCONF "iproute doesn't support remote unicast address"
- local opt="id $1 remote $(tst_ipaddr rhost)"
- local opt_r="id $2 remote $(tst_ipaddr)"
+ local opt="$1 remote $(tst_ipaddr rhost)"
+ local opt_r="$2 remote $(tst_ipaddr)"
virt_setup "$opt" "$opt_r"
}
@@ -209,8 +209,8 @@ vxlan_setup_subnet_multi()
grp="group 239.$b1.$b2.$b3"
fi
- local opt="id $1 $grp dev $(tst_iface)"
- local opt_r="id $2 $grp dev $(tst_iface rhost)"
+ local opt="$1 $grp dev $(tst_iface)"
+ local opt_r="$2 $grp dev $(tst_iface rhost)"
virt_setup "$opt" "$opt_r"
}
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index 01fa62d..e5015be 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -24,7 +24,7 @@
# to communicate only within the same VXLAN segment.
TCID=vxlan03
-TST_TOTAL=2
+TST_TOTAL=4
virt_type="vxlan"
start_id=16700000
@@ -60,30 +60,30 @@ if [ -z $ip_local -o -z $ip_remote ]; then
tst_brkm TBROK "you must specify IP address"
fi
+if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
+ tst_brkm TBROK "wrong dst address, can be 'uni' or 'multi'"
+fi
+
opts="dstport 0,dstport 0 gbp"
for n in $(seq 1 2); do
- params="$(echo $opts | cut -d',' -f$n)"
+ p="$(echo $opts | cut -d',' -f$n)"
- virt_check_cmd virt_add ltp_v0 id 0 $params || continue
+ virt_check_cmd virt_add ltp_v0 id 0 $p || continue
- tst_resm TINFO "networks with the same VNI must work"
+ tst_resm TINFO "the same VNI must work"
# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
res="TPASS"
- if [ "$vxlan_dst_addr" != 'uni' -a $vxlan_dst_addr != 'multi' ]; then
- tst_brkm TBROK "wrong dst address, can be 'uni' or 'multi'"
- fi
-
- vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFE"
- vxlan_compare_netperf || res="TFAIL"
+ vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $p" "id 0xFFFFFE $p"
+ virt_compare_netperf || res="TFAIL"
tst_resm $res "done"
tst_resm TINFO "different VNI shall not work together"
res="TPASS"
- vxlan_setup_subnet_$vxlan_dst_addr "0xFFFFFE" "0xFFFFFD"
- vxlan_compare_netperf && res="TFAIL"
+ vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $p" "id 0xFFFFFD $p"
+ virt_compare_netperf && res="TFAIL"
tst_resm $res "done"
done
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 21/23] network/virt: add gre tunnel test
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (19 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 20/23] network/virt/vxlan03.sh: fix vxlan_compare_netperf() Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 22/23] network/virt: adjust virt_threshold parameter Alexey Kodanev
` (2 subsequent siblings)
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
It is based on vlan03 test where tunnel is checked by
comparing performance between original link and the tunnel.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
runtest/network_stress.features | 3 ++
testcases/network/virt/Makefile | 1 +
testcases/network/virt/gre01.sh | 63 ++++++++++++++++++++++++++++++++++++
testcases/network/virt/virt_lib.sh | 34 ++++++++++++++++---
4 files changed, 95 insertions(+), 6 deletions(-)
create mode 100755 testcases/network/virt/gre01.sh
diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index 833258f..f48f0a7 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -22,3 +22,6 @@ macvlan01 macvlan01.sh
macvtap01 macvtap01.sh
ipvlan01 ipvlan01.sh
+
+gre_ipv4_01 gre01.sh
+gre_ipv6_01 gre01.sh -6
diff --git a/testcases/network/virt/Makefile b/testcases/network/virt/Makefile
index 5b7b847..54e374f 100644
--- a/testcases/network/virt/Makefile
+++ b/testcases/network/virt/Makefile
@@ -19,6 +19,7 @@ top_srcdir ?= ../../..
include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := ipvlan01.sh \
+ gre01.sh \
macvlan01.sh \
macvtap01.sh \
virt_lib.sh \
diff --git a/testcases/network/virt/gre01.sh b/testcases/network/virt/gre01.sh
new file mode 100755
index 0000000..a900ee3
--- /dev/null
+++ b/testcases/network/virt/gre01.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+# Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
+#
+# 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: Alexey Kodanev <alexey.kodanev@oracle.com>
+#
+# It requires remote host. Test will setup IPv4 and IPv6 virtual
+# tunnel between two hosts, then will compare TCP performance
+# with and without GRE using ping or tcp_fastopen test.
+
+TCID=gre01
+TST_TOTAL=2
+
+. test_net.sh
+
+virt_type="gre"
+[ "$TST_IPV6" ] && virt_type="ip6gre"
+
+. virt_lib.sh
+
+cleanup()
+{
+ cleanup_vifaces
+ tst_rhost_run -c "ip link delete ltp_v0"
+ if [ "$net_load" = "TFO" ]; then
+ tst_rhost_run -c "pkill -9 tcp_fastopen\$"
+ pkill -9 "tcp_fastopen\$"
+ fi
+}
+TST_CLEANUP="cleanup"
+
+if [ "$net_load" = "TFO" ]; then
+ tst_check_cmds "tcp_fastopen"
+fi
+
+if [ -z $ip_local -o -z $ip_remote ]; then
+ tst_brkm TBROK "you must specify IP address"
+fi
+
+res="TPASS"
+
+tst_resm TINFO "test $virt_type"
+
+virt_setup "remote $(tst_ipaddr rhost) dev $(tst_iface)" \
+"remote $(tst_ipaddr) dev $(tst_iface rhost)"
+
+virt_compare_netperf || res="TFAIL"
+
+tst_resm $res "done"
+
+tst_exit
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 9597c84..39fd96a 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -107,12 +107,19 @@ virt_add()
vlan|vxlan)
[ -z "$opt" ] && opt="id 4094"
;;
+ gre|ip6gre)
+ [ -z "$opt" ] && \
+ opt="remote $(tst_ipaddr rhost) dev $(tst_iface)"
+ ;;
esac
case $virt_type in
vxlan)
ip li add $vname type $virt_type $opt
;;
+ gre|ip6gre)
+ ip -f inet$TST_IPV6 tu add $vname mode $virt_type $opt
+ ;;
*)
ip li add link $(tst_iface) $vname type $virt_type $opt
;;
@@ -125,6 +132,10 @@ virt_add_rhost()
vxlan)
tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $@"
;;
+ gre|ip6gre)
+ tst_rhost_run -s -c "ip -f inet$TST_IPV6 tu add ltp_v0 \
+ mode $virt_type $@"
+ ;;
*)
tst_rhost_run -s -c "ip li add link $(tst_iface rhost) ltp_v0 \
type $virt_type $@"
@@ -167,17 +178,28 @@ virt_setup()
local opt_r="$2"
tst_resm TINFO "setup local ${virt_type} with '$opt'"
-
ROD_SILENT "virt_add ltp_v0 $opt"
- ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
- ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
- ROD_SILENT "ip li set up ltp_v0"
tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
-
virt_add_rhost "$opt_r"
- tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
+
+ case $virt_type in
+ gre|ip6gre)
+ # We can't set hwaddr to GRE tunnel, add IPv6 link local
+ # addresses manually.
+ ROD_SILENT "ip addr add ${ip6_virt_local}/64 dev ltp_v0"
+ tst_rhost_run -s -c "ip ad add ${ip6_virt_remote}/64 dev ltp_v0"
+ ;;
+ *)
+ ROD_SILENT "ip li set ltp_v0 address $mac_virt_local"
+ tst_rhost_run -s -c "ip li set ltp_v0 address $mac_virt_remote"
+ ;;
+ esac
+
+ ROD_SILENT "ip addr add ${ip_virt_local}/24 dev ltp_v0"
tst_rhost_run -s -c "ip addr add ${ip_virt_remote}/24 dev ltp_v0"
+
+ ROD_SILENT "ip li set up ltp_v0"
tst_rhost_run -s -c "ip li set up ltp_v0"
}
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 22/23] network/virt: adjust virt_threshold parameter
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (20 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 21/23] network/virt: add gre tunnel test Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 23/23] network/virt: don't skip when feature options not supported Alexey Kodanev
2015-08-11 18:44 ` [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Cyril Hrubis
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Set general virtual tunnel perfomance to 80%, and VxLAN to 160%.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/virt_lib.sh | 2 +-
testcases/network/virt/vxlan03.sh | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 39fd96a..d076d08 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -42,7 +42,7 @@ clients_num=2
client_requests=500000
max_requests=3
net_load="TFO"
-virt_threshold=30
+virt_threshold=80
while getopts :hsx:i:r:c:R:p:n:l:t:d:6 opt; do
case "$opt" in
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index e5015be..613f4c2 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -29,11 +29,11 @@ TST_TOTAL=4
virt_type="vxlan"
start_id=16700000
-# In average cases (with small packets less then 150 bytes) vxlan slower
-# by 10-30%. If hosts are too close to each one, e.g. connected to the same
-# switch the performance can be slower by 50%. Set 60% as default, the above
-# will be an error in VXLAN.
-virt_threshold=60
+# In average cases (with small packets less then 150 bytes) VxLAN slower
+# by 10-30%. If hosts are too close to each other, e.g. connected to the same
+# switch, VxLAN can be much slower when comparing to the performance without
+# any encapsulation.
+virt_threshold=160
# Destination address, can be unicast or multicast address
vxlan_dst_addr="uni"
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [LTP] [PATCH 23/23] network/virt: don't skip when feature options not supported
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (21 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 22/23] network/virt: adjust virt_threshold parameter Alexey Kodanev
@ 2015-07-09 6:47 ` Alexey Kodanev
2015-08-11 18:44 ` [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Cyril Hrubis
23 siblings, 0 replies; 34+ messages in thread
From: Alexey Kodanev @ 2015-07-09 6:47 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Clear parameters variable and proceed, but only once.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/virt/vlan03.sh | 12 ++++++++----
testcases/network/virt/vxlan03.sh | 6 +++++-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index a067065..5c49d41 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -63,18 +63,22 @@ rh1="reorder_hdr on"
opts="$p0 $lb0 $rh0,$p0 $lb1 $rh1,$p1 $lb0 $rh0,$p1 $lb1 $rh1"
for n in $(seq 1 4); do
- params="$(echo $opts | cut -d',' -f$n)"
+ p="$(echo $opts | cut -d',' -f$n)"
- virt_check_cmd virt_add ltp_v0 id 0 $params || continue
+ virt_check_cmd virt_add ltp_v0 id 0 $p
+ if [ $? -ne 0 ]; then
+ [ $n -gt 1 ] && continue
+ p=""
+ fi
- virt_setup "id 4094 $params" "id 4094 $params"
+ virt_setup "id 4094 $p" "id 4094 $p"
virt_compare_netperf || res="TFAIL"
tst_resm $res "done"
tst_resm TINFO "different VLAN ID shall not work together"
res="TPASS"
- virt_setup "id 4093 $params" "id 4094 $params"
+ virt_setup "id 4093 $p" "id 4094 $p"
virt_compare_netperf && res="TFAIL"
tst_resm $res "done"
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index 613f4c2..b105afb 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -69,7 +69,11 @@ opts="dstport 0,dstport 0 gbp"
for n in $(seq 1 2); do
p="$(echo $opts | cut -d',' -f$n)"
- virt_check_cmd virt_add ltp_v0 id 0 $p || continue
+ virt_check_cmd virt_add ltp_v0 id 0 $p
+ if [ $? -ne 0 ]; then
+ [ $n -gt 1 ] && continue
+ p=""
+ fi
tst_resm TINFO "the same VNI must work"
# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
--
1.7.1
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup
2015-07-09 6:47 ` [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup Alexey Kodanev
@ 2015-08-11 18:00 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:00 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> --- a/testcases/network/virt/virt_lib.sh
> +++ b/testcases/network/virt/virt_lib.sh
> @@ -90,7 +90,8 @@ cleanup_vifaces()
> tst_resm TINFO "cleanup virtual interfaces..."
> local viface=`ip link | sed -nE 's/^[0-9]+: (ltp_v[0-9]+):.+/\1/p'`
> for vx in $viface; do
> - ip link delete $vx
> + ROD_SILENT "ip link set $vx down"
> + ROD_SILENT "ip link delete $vx"
Do we really want to exit the cleanup if deleting one of the interfaces
has failed?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case
2015-07-09 6:47 ` [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case Alexey Kodanev
@ 2015-08-11 18:12 ` Cyril Hrubis
[not found] ` <55CB2A43.8060808@oracle.com>
0 siblings, 1 reply; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:12 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> +tst_resm TINFO "networks with the same VLAN ID must work"
> +
> +res="TPASS"
> +
> +virt_setup "id 4094" "id 4094"
> +virt_compare_netperf || res="TFAIL"
> +
> +tst_resm $res "done"
> +
> +tst_resm TINFO "different VLAN ID shall not work together"
> +res="TPASS"
> +virt_setup "id 4093" "id 4094"
> +virt_compare_netperf && res="TFAIL"
> +
> +tst_resm $res "done"
I would rather see the test issuing one PASS/FAIL for each of the
asserting here. Why cannot we use tst_resm TPASS/TFAIL in the
virt_compare_netperf function?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 16/23] network/virt: add macvtap01 test
2015-07-09 6:47 ` [LTP] [PATCH 16/23] network/virt: add macvtap01 test Alexey Kodanev
@ 2015-08-11 18:21 ` Cyril Hrubis
[not found] ` <55CB2DA3.1050706@oracle.com>
0 siblings, 1 reply; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:21 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
> +for m in $modes; do
> + tst_resm TINFO "add $virt_type with mode '$m'"
> +
> + virt_add ltp_v0 mode $m > /dev/null 2>&1
> + if [ $? -ne 0 ]; then
> + tst_resm TCONF "iproute or kernel doesn't support mode '$m'"
shouldn't we rather call continue here, since we issued
TCONF but without it we will proceed with PASS/FAIL from
the virt_add_delete_test. Or am I mistaken?
> + else
> + ROD_SILENT "ip li delete ltp_v0"
> + fi
> +
> + virt_add_delete_test "mode $m"
> +
> + start_id=$(($start_id + $virt_count))
> +done
> +
> +tst_exit
> --
> 1.7.1
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh
2015-07-09 6:47 ` [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh Alexey Kodanev
@ 2015-08-11 18:24 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:24 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> +# Check if we can create then delete virtual interface n times.
> +# virt_test_01 [OPTIONS]
> +# OPTIONS - different options separated by comma.
> +virt_test_01()
> +{
> + start_id=1
> + virt_count=500
> +
> + local opts=${1:-""}
> + local n=0
> +
> + while ((1)); do
This does not work with dash, use "while true; do" instead.
> + n=$((n + 1))
> + p="$(echo $opts | cut -d',' -f$n)"
> + if [ -z "$p" -a $n -gt 1 ]; then
> + break
> + fi
> +
> + tst_resm TINFO "add $virt_type with '$p'"
> +
> + virt_add ltp_v0 id 0 $p > /dev/null 2>&1
> + if [ $? -ne 0 ]; then
> + tst_resm TCONF "iproute/kernel doesn't support '$p'"
> + p=""
Again shouldn't we just continue here instead?
> + else
> + ROD_SILENT "ip li delete ltp_v0"
> + fi
> +
> + virt_multiple_add_test "$p"
> +
> + start_id=$(($start_id + $virt_count))
> + done
> +}
> +
> tst_require_root
>
> case "$virt_type" in
> diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
> index ac74463..fb96562 100755
> --- a/testcases/network/virt/vlan01.sh
> +++ b/testcases/network/virt/vlan01.sh
> @@ -16,7 +16,7 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create 4095 VLAN interfaces.
> +# Local test, check if we can create 4000 VLAN interfaces.
> #
>
> TCID=vlan01
> @@ -34,28 +34,9 @@ lb1="loose_binding on"
> rh0="reorder_hdr off"
> rh1="reorder_hdr on"
>
> -opts="$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
> +options="$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
> $p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1,"
>
> -start_id=1
> -virt_count=500
> -
> -for n in $(seq 1 8); do
> - params="$(echo $opts | cut -d',' -f$n)"
> -
> - tst_resm TINFO "add $virt_type with '$params'"
> -
> - virt_add ltp_v0 id 0 $params > /dev/null 2>&1
> - if [ $? -ne 0 ]; then
> - tst_resm TCONF "iproute or kernel doesn't support '$params'"
> - params=""
> - else
> - ROD_SILENT "ip li delete ltp_v0"
> - fi
> -
> - virt_multiple_add_test "$params"
> -
> - start_id=$(($start_id + $virt_count))
> -done
> +virt_test_01 "$options"
>
> tst_exit
> diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
> index 63a52d0..4dfe3d7 100755
> --- a/testcases/network/virt/vxlan01.sh
> +++ b/testcases/network/virt/vxlan01.sh
> @@ -16,11 +16,11 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create 5000 VXLAN interfaces.
> +# Local test, check if we can create 2500 VXLAN interfaces.
> #
>
> TCID=vxlan01
> -TST_TOTAL=1
> +TST_TOTAL=5
>
> virt_type="vxlan"
> start_id=16700000
> @@ -28,27 +28,9 @@ start_id=16700000
> . test_net.sh
> . virt_lib.sh
>
> -opts="l2miss l3miss,norsc nolearning noproxy,ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
> +options="l2miss l3miss,norsc nolearning noproxy,\
> +ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
>
> -start_id=1
> -virt_count=1000
> -
> -for n in $(seq 1 5); do
> - params="$(echo $opts | cut -d',' -f$n)"
> -
> - tst_resm TINFO "add $virt_type with '$params'"
> -
> - virt_add ltp_v0 id 0 $params > /dev/null 2>&1
> - if [ $? -ne 0 ]; then
> - tst_resm TCONF "iproute or kernel doesn't support '$params'"
> - params=""
> - else
> - ROD_SILENT "ip li delete ltp_v0"
> - fi
> -
> - virt_multiple_add_test "$params"
> -
> - start_id=$(($start_id + $virt_count))
> -done
> +virt_test_01 "$options"
>
> tst_exit
> --
> 1.7.1
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 18/23] network/virt: move checking for command support to virt_lib.sh
2015-07-09 6:47 ` [LTP] [PATCH 18/23] network/virt: move checking for command support " Alexey Kodanev
@ 2015-08-11 18:28 ` Cyril Hrubis
[not found] ` <55CB31E5.1050808@oracle.com>
0 siblings, 1 reply; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:28 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> Add new function "virt_check_cmd". Change TCONF to TINFO so that
> we just skip not supported options and don't return TCONF as a
> end test result.
I would rather see the test doing TCONF for unsupported options and
skipping the actual test. And I know that getting TCONF for testcases
that only skip one test out of many is annoying, which is why I'm
pondering a plan to change bitflags in the test library (both C and bash
one) to counters so that we can say how much of the testcase was
actually skipped.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 19/23] network/virt: add test-case 02 to virt_lib.sh
2015-07-09 6:47 ` [LTP] [PATCH 19/23] network/virt: add test-case 02 " Alexey Kodanev
@ 2015-08-11 18:32 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:32 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
> index 706c1d8..156de78 100755
> --- a/testcases/network/virt/ipvlan01.sh
> +++ b/testcases/network/virt/ipvlan01.sh
> @@ -16,8 +16,8 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create and then delete ipvlan
> -# interface 500 times.
> +# Local test, check if we can create and then delete ipvlan
> +# interface 1000 times.
>
> TCID=ipvlan01
> TST_TOTAL=2
> @@ -27,19 +27,8 @@ virt_type="ipvlan"
> . test_net.sh
> . virt_lib.sh
>
> -modes="l2 l3"
> +options="mode l2,mode l3"
>
> -start_id=1
> -virt_count=500
> -
> -for m in $modes; do
> - tst_resm TINFO "add $virt_type with mode '$m'"
> -
> - virt_check_cmd virt_add ltp_v0 mode $m || m=""
> -
> - virt_add_delete_test "mode $m"
> -
> - start_id=$(($start_id + $virt_count))
> -done
> +virt_test_02 "$options"
>
> tst_exit
> diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
> index 35febd0..402edde 100755
> --- a/testcases/network/virt/macvlan01.sh
> +++ b/testcases/network/virt/macvlan01.sh
> @@ -16,8 +16,8 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create and then delete macvlan
> -# interface 500 times.
> +# Local test, check if we can create and then delete macvlan
> +# interface 2000 times.
>
> TCID=macvlan01
> TST_TOTAL=4
> @@ -27,19 +27,8 @@ virt_type="macvlan"
> . test_net.sh
> . virt_lib.sh
>
> -modes="private vepa bridge passthru"
> +options="mode private,mode vepa,mode bridge,mode passthru"
>
> -start_id=1
> -virt_count=500
> -
> -for m in $modes; do
> - tst_resm TINFO "add $virt_type with mode '$m'"
> -
> - virt_check_cmd virt_add ltp_v0 mode $m || m=""
> -
> - virt_add_delete_test "mode $m"
> -
> - start_id=$(($start_id + $virt_count))
> -done
> +virt_test_02 "$options"
>
> tst_exit
> diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
> index 8bb3636..3408c94 100755
> --- a/testcases/network/virt/macvtap01.sh
> +++ b/testcases/network/virt/macvtap01.sh
> @@ -16,8 +16,8 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create and then delete macvtap
> -# interface 500 times.
> +# Local test, check if we can create and then delete macvtap
> +# interface 2000 times.
>
> TCID=macvtap01
> TST_TOTAL=4
> @@ -27,19 +27,8 @@ virt_type="macvtap"
> . test_net.sh
> . virt_lib.sh
>
> -modes="private vepa bridge passthru"
> +options="mode private,mode vepa,mode bridge,mode passthru"
>
> -start_id=1
> -virt_count=500
> -
> -for m in $modes; do
> - tst_resm TINFO "add $virt_type with mode '$m'"
> -
> - virt_check_cmd virt_add ltp_v0 mode $m || m=""
> -
> - virt_add_delete_test "mode $m"
> -
> - start_id=$(($start_id + $virt_count))
> -done
> +virt_test_02 "$options"
>
> tst_exit
> diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
> index 2ccba43..d79f7bc 100644
> --- a/testcases/network/virt/virt_lib.sh
> +++ b/testcases/network/virt/virt_lib.sh
> @@ -289,6 +289,34 @@ virt_test_01()
> done
> }
>
> +# Check if we can create then delete virtual interface n times.
> +# virt_test_02 [OPTIONS]
> +# OPTIONS - different options separated by comma.
> +virt_test_02()
> +{
> + start_id=1
> + virt_count=500
> +
> + local opts=${1:-""}
> + local n=0
> +
> + while ((1)); do
while true; here as well
> + n=$((n + 1))
> + p="$(echo $opts | cut -d',' -f$n)"
> + if [ -z "$p" -a $n -gt 1 ]; then
> + break
> + fi
> +
> + tst_resm TINFO "add and then delete $virt_type with '$p'"
> +
> + virt_check_cmd virt_add ltp_v0 $p || p=""
> +
> + virt_add_delete_test "$p"
> +
> + start_id=$(($start_id + $virt_count))
> + done
> +}
> +
> tst_require_root
>
> case "$virt_type" in
> diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
> index 0fb35a3..60addba 100755
> --- a/testcases/network/virt/vlan02.sh
> +++ b/testcases/network/virt/vlan02.sh
> @@ -16,8 +16,8 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create and then delete VLAN
> -# interface 4095 times.
> +# Local test, check if we can create and then delete VLAN
> +# interface 4095 times.
> #
>
> TCID=vlan02
> diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
> index 1470495..0b3a21c 100755
> --- a/testcases/network/virt/vxlan02.sh
> +++ b/testcases/network/virt/vxlan02.sh
> @@ -16,8 +16,8 @@
> #
> # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
> #
> -# Test-case 1: Local test, check if we can create and then delete VXLAN
> -# interface 5000 times.
> +# Local test, check if we can create and then delete VXLAN
> +# interface 5000 times.
> #
>
> TCID=vxlan02
> --
> 1.7.1
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
` (22 preceding siblings ...)
2015-07-09 6:47 ` [LTP] [PATCH 23/23] network/virt: don't skip when feature options not supported Alexey Kodanev
@ 2015-08-11 18:44 ` Cyril Hrubis
23 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-11 18:44 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> Most interfaces share the same ip command syntax and the same test
> scenarious can be applied to them. So rename vxlan directory to more
> general 'virt' directory and add those interfaces to it.
Apart from the minor nitpicks this patchset looks good to me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case
[not found] ` <55CB2A43.8060808@oracle.com>
@ 2015-08-12 11:21 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-12 11:21 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> We can use tst_resm there and we would need to provide one more
> parameter to determine was it PASS or FAIL (the expected result). It
> will complicate virt_compare_netperf() a bit but still should be OK.
That sounds reasonable to me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 16/23] network/virt: add macvtap01 test
[not found] ` <55CB2DA3.1050706@oracle.com>
@ 2015-08-12 11:41 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-12 11:41 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> What I have in mind here is to perform add/delete test-case with
> different parameters, in this case different modes. So the total steps
> are the same but if option is supported, use it on some steps, otherwise
> proceed without it. May be the message should be changed to something like:
>
> tst_resm TINFO "'$m' mode not supported by iproute/kernel, use default"
^
using
But when we do that the testing would be slower for no additional value
on systems that does not support these options. I guess I can live with
that, but I don't like it.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [LTP] [PATCH 18/23] network/virt: move checking for command support to virt_lib.sh
[not found] ` <55CB31E5.1050808@oracle.com>
@ 2015-08-12 11:49 ` Cyril Hrubis
0 siblings, 0 replies; 34+ messages in thread
From: Cyril Hrubis @ 2015-08-12 11:49 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> > I would rather see the test doing TCONF for unsupported options and
> > skipping the actual test. And I know that getting TCONF for testcases
> > that only skip one test out of many is annoying, which is why I'm
> > pondering a plan to change bitflags in the test library (both C and bash
> > one) to counters so that we can say how much of the testcase was
> > actually skipped.
>
> That is a great news! OK, I will use TCONF. Will counters be added in
> the ltp-pan log file?
I hope so. I was thinking of producing logfiles in different standart
formats as well. There are at least TAP[1] that comes from perl
community and JUnit that comes from Jenkins.
[1] https://testanything.org/
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2015-08-12 11:49 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 6:47 [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 01/23] network/vxlan: make names more abstract, use 'virt' Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 02/23] network/vxlan: rename vxlan dir and library to 'virt' Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 03/23] network/virt_lib.sh: add virt_add() and virt_add_rhost() Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 04/23] network/virt_lib.sh: use ROD_SILENT in cleanup Alexey Kodanev
2015-08-11 18:00 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 05/23] network/virt_lib.sh: fix regexpr " Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 06/23] network/virt/vlan01: add new test-case Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 07/23] network/virt/vlan02: " Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 08/23] network/virt: rename virt_max to virt_count Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 09/23] network/virt/vlan03: add new test-case Alexey Kodanev
2015-08-11 18:12 ` Cyril Hrubis
[not found] ` <55CB2A43.8060808@oracle.com>
2015-08-12 11:21 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 10/23] network/virt/vlan01.sh: add protocol, loose_binding and hdr options Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 11/23] network/virt/vlan03.sh: " Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 12/23] network/virt: add new macvlan01 test Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 13/23] network/virt: add new ipvlan01 test Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 14/23] network/virt/vxlan01.sh: add parameters Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 15/23] network/virt/vxlan03.sh: add VXLAN-GBP (group policy context) test Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 16/23] network/virt: add macvtap01 test Alexey Kodanev
2015-08-11 18:21 ` Cyril Hrubis
[not found] ` <55CB2DA3.1050706@oracle.com>
2015-08-12 11:41 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 17/23] network/virt: add test-case 01 to virt_lib.sh Alexey Kodanev
2015-08-11 18:24 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 18/23] network/virt: move checking for command support " Alexey Kodanev
2015-08-11 18:28 ` Cyril Hrubis
[not found] ` <55CB31E5.1050808@oracle.com>
2015-08-12 11:49 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 19/23] network/virt: add test-case 02 " Alexey Kodanev
2015-08-11 18:32 ` Cyril Hrubis
2015-07-09 6:47 ` [LTP] [PATCH 20/23] network/virt/vxlan03.sh: fix vxlan_compare_netperf() Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 21/23] network/virt: add gre tunnel test Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 22/23] network/virt: adjust virt_threshold parameter Alexey Kodanev
2015-07-09 6:47 ` [LTP] [PATCH 23/23] network/virt: don't skip when feature options not supported Alexey Kodanev
2015-08-11 18:44 ` [LTP] [PATCH 00/23] Add vlan, ipvlan, gre, macvlan interfaces Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox