aboutsummaryrefslogtreecommitdiff
path: root/testcases/network
diff options
context:
space:
mode:
authorAlexey Kodanev <alexey.kodanev@oracle.com>2015-07-03 21:01:09 +0300
committerAlexey Kodanev <alexey.kodanev@oracle.com>2015-08-19 21:25:06 +0300
commit8188aa690ef8aac7adc13669efcd5b7354d44c48 (patch)
tree241565604e0ad74176e2e71723c719ce27281f3e /testcases/network
parent21ed8c7861d6e1af8d18f81068b51b8f15ebf33a (diff)
network/virt/vlan03.sh: add protocol, loose_binding and hdr options
protocol {802.1Q | 802.1ad}, loose_binding {off | on} and reorder_hdr {off | on}. The options combinations are less than in vlan01 test in order to not waste too much time for no good reason. Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Diffstat (limited to 'testcases/network')
-rwxr-xr-xtestcases/network/virt/vlan03.sh39
1 files changed, 29 insertions, 10 deletions
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index 4cc9a0589..c3aedaf02 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -24,7 +24,7 @@
# to communicate only within the same VLAN segment.
TCID=vlan03
-TST_TOTAL=2
+TST_TOTAL=6
virt_type="vlan"
@@ -51,19 +51,38 @@ if [ -z $ip_local -o -z $ip_remote ]; then
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"
+p0="protocol 802.1Q"
+p1="protocol 802.1ad"
+lb0="loose_binding off"
+lb1="loose_binding on"
+rh0="reorder_hdr off"
+rh1="reorder_hdr on"
-tst_resm $res "done"
+opts=" ,$p0 $lb0 $rh1,$p1 $lb1 $rh1"
-tst_resm TINFO "different VLAN ID shall not work together"
-res="TPASS"
-virt_setup "id 4093" "id 4094"
-virt_compare_netperf && res="TFAIL"
+for n in $(seq 1 3); do
+ params="$(echo $opts | cut -d',' -f$n)"
+
+ virt_add ltp_v0 id 0 $params > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ tst_resm TCONF "iproute or kernel doesn't support '$params'"
+ continue
+ fi
+ ROD_SILENT "ip li delete ltp_v0"
+
+ virt_setup "id 4094 $params" "id 4094 $params"
+ 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 $params" "id 4094 $params"
+ virt_compare_netperf && res="TFAIL"
-tst_resm $res "done"
+ tst_resm $res "done"
+done
tst_exit