1f08c3bdfSopenharmony_ci#!/bin/sh 2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later 3f08c3bdfSopenharmony_ci# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz> 4f08c3bdfSopenharmony_ci# Copyright (c) 2015-2017 Oracle and/or its affiliates. 5f08c3bdfSopenharmony_ci# Author: Alexey Kodanev <alexey.kodanev@oracle.com> 6f08c3bdfSopenharmony_ci# 7f08c3bdfSopenharmony_ci# Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual 8f08c3bdfSopenharmony_ci# sub-nets between two hosts, then will compare TCP performance 9f08c3bdfSopenharmony_ci# with and without VLAN using ping or netstress test. 10f08c3bdfSopenharmony_ci# 11f08c3bdfSopenharmony_ci# Test-case 2: The same as above but must fail, because VLAN allows 12f08c3bdfSopenharmony_ci# to communicate only within the same VLAN segment. 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_cip0="protocol 802.1Q" 15f08c3bdfSopenharmony_cip1="protocol 802.1ad" 16f08c3bdfSopenharmony_cilb0="loose_binding off" 17f08c3bdfSopenharmony_cilb1="loose_binding on" 18f08c3bdfSopenharmony_cirh0="reorder_hdr off" 19f08c3bdfSopenharmony_cirh1="reorder_hdr on" 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_civirt_type="vlan" 22f08c3bdfSopenharmony_ci 23f08c3bdfSopenharmony_ciTST_NEEDS_TMPDIR=1 24f08c3bdfSopenharmony_ciTST_TEST_DATA=",$p0 $lb0 $rh1,$p1 $lb1 $rh1" 25f08c3bdfSopenharmony_ciTST_TEST_DATA_IFS="," 26f08c3bdfSopenharmony_ciTST_TESTFUNC=do_test 27f08c3bdfSopenharmony_ciTST_SETUP=virt_lib_setup 28f08c3bdfSopenharmony_ciTST_CLEANUP=virt_cleanup 29f08c3bdfSopenharmony_ci 30f08c3bdfSopenharmony_cido_test() 31f08c3bdfSopenharmony_ci{ 32f08c3bdfSopenharmony_ci virt_check_cmd virt_add ltp_v0 id 0 $2 || return 33f08c3bdfSopenharmony_ci 34f08c3bdfSopenharmony_ci tst_res TINFO "networks with the same VLAN ID must work" 35f08c3bdfSopenharmony_ci virt_setup "id 4094 $2" "id 4094 $2" 36f08c3bdfSopenharmony_ci virt_netperf_msg_sizes 37f08c3bdfSopenharmony_ci virt_cleanup_rmt 38f08c3bdfSopenharmony_ci 39f08c3bdfSopenharmony_ci tst_res TINFO "different VLAN ID shall not work together" 40f08c3bdfSopenharmony_ci virt_setup "id 4093 $2" "id 4094 $2" 41f08c3bdfSopenharmony_ci virt_minimize_timeout 42f08c3bdfSopenharmony_ci virt_compare_netperf "fail" 43f08c3bdfSopenharmony_ci virt_cleanup_rmt 44f08c3bdfSopenharmony_ci} 45f08c3bdfSopenharmony_ci 46f08c3bdfSopenharmony_ci. virt_lib.sh 47f08c3bdfSopenharmony_citst_run 48