Based on vxlan02 test-cases. Common code moved to virt_lib.sh. Signed-off-by: Alexey Kodanev <alexey.koda...@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.koda...@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