It is based on vxlan03 test-case and use the same approach.

Signed-off-by: Alexey Kodanev <alexey.koda...@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.koda...@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

Reply via email to