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.koda...@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.koda...@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