It is almost a copy of macvlan01 test as it has the similar 'ip' command interface.
Signed-off-by: Alexey Kodanev <alexey.koda...@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.koda...@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