Report: Remove *CHK tests from report
[csit.git] / tests / vpp / func / vm_vhost / l2bd / eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
17 | Resource | resources/libraries/robot/shared/testing_path.robot
18 | Resource | resources/libraries/robot/vm/qemu.robot
19 | Library  | resources.libraries.python.Trace
20 | Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV
21 | Test Setup | Set up functional test
22 | Test Teardown | Tear down functional test
23 | Documentation | *L2 bridge-domain test cases*
24 | ...
25 | ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM
26 | ... | and double parallel links.
27 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
28 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply
29 | ... | to all links.
30 | ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge-domains
31 | ... | (L2BD) switching combined with static MACs.
32 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets
33 | ... | are sent in both directions by TG on links to DUT1 via VM; on
34 | ... | receive TG verifies packets for correctness and their IPv4 (IPv6)
35 | ... | src-addr, dst-addr and MAC addresses.
36 | ... | *[Ref] Applicable standard specifications:*
37
38 *** Variables ***
39 | ${bd_id1}= | 1
40 | ${bd_id2}= | 2
41
42 | ${sock1}= | /tmp/sock1
43 | ${sock2}= | /tmp/sock2
44
45 *** Test Cases ***
46 | TC01: DUT with two L2BDs (static MACs) switches ICMPv4 between TG and VM links
47 | | [Documentation]
48 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \
49 | | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM
50 | | ... | and i/f to TG; configure VM to loop pkts back betwen its two
51 | | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are
52 | | ... | switched thru DUT1 and VM in both directions and are correct on
53 | | ... | receive. [Ref]
54 | | ...
55 | | [Teardown] | Run Keywords | Stop and clear QEMU | ${dut_node} | ${vm_node}
56 | | ... | AND | Tear down functional test
57 | | ...
58 | | Given Configure path in 2-node circular topology
59 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
60 | | And Set interfaces in 2-node circular topology up
61 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
62 | | ... | ${sock1} | ${sock2}
63 | | And Create bridge domain | ${dut_node} | ${bd_id1}
64 | | ... | learn=${FALSE}
65 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
66 | | ... | ${bd_id1}
67 | | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} | ${bd_id1}
68 | | And Add destination port to L2FIB | ${tg_node}
69 | | ... | ${tg_to_dut_if1}
70 | | ... | ${dut_node}
71 | | ... | ${dut_to_tg_if1}
72 | | ... | ${bd_id1}
73 | | And Add destination port to L2FIB | ${tg_node}
74 | | ... | ${tg_to_dut_if2}
75 | | ... | ${dut_node}
76 | | ... | ${vhost_if1}
77 | | ... | ${bd_id1}
78 | | And Create bridge domain | ${dut_node} | ${bd_id2}
79 | | ... | learn=${FALSE}
80 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
81 | | ... | ${bd_id2}
82 | | And Add interface to bridge domain | ${dut_node} | ${vhost_if2}
83 | | ... | ${bd_id2}
84 | | And Add destination port to L2FIB | ${tg_node}
85 | | ... | ${tg_to_dut_if2}
86 | | ... | ${dut_node}
87 | | ... | ${dut_to_tg_if2}
88 | | ... | ${bd_id2}
89 | | And Add destination port to L2FIB | ${tg_node}
90 | | ... | ${tg_to_dut_if1}
91 | | ... | ${dut_node}
92 | | ... | ${vhost_if2}
93 | | ... | ${bd_id2}
94 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
95 | | ... | ${sock2}
96 | | Then Send ICMPv4 bidirectionally and verify received packets
97 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
98
99 | TC02: DUT with two L2BDs (static MACs) switches ICMPv6 between TG and VM links
100 | | [Documentation]
101 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \
102 | | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM
103 | | ... | and i/f to TG; configure VM to loop pkts back betwen its two
104 | | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are
105 | | ... | switched thru DUT1 and VM in both directions and are correct on
106 | | ... | receive. [Ref]
107 | | ...
108 | | [Teardown] | Run Keywords | Stop and clear QEMU | ${dut_node} | ${vm_node}
109 | | ... | AND | Tear down functional test
110 | | ...
111 | | Given Configure path in 2-node circular topology
112 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
113 | | And Set interfaces in 2-node circular topology up
114 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
115 | | ... | ${sock1}
116 | | ... | ${sock2}
117 | | And Create bridge domain | ${dut_node} | ${bd_id1}
118 | | ... | learn=${FALSE}
119 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
120 | | ... | ${bd_id1}
121 | | And Add interface to bridge domain | ${dut_node} | ${vhost_if1}
122 | | ... | ${bd_id1}
123 | | And Add destination port to L2FIB | ${tg_node}
124 | | ... | ${tg_to_dut_if1}
125 | | ... | ${dut_node}
126 | | ... | ${dut_to_tg_if1}
127 | | ... | ${bd_id1}
128 | | And Add destination port to L2FIB | ${tg_node}
129 | | ... | ${tg_to_dut_if2}
130 | | ... | ${dut_node}
131 | | ... | ${vhost_if1}
132 | | ... | ${bd_id1}
133 | | And Create bridge domain | ${dut_node} | ${bd_id2}
134 | | ... | learn=${FALSE}
135 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
136 | | ... | ${bd_id2}
137 | | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} | ${bd_id2}
138 | | And Add destination port to L2FIB | ${tg_node}
139 | | ... | ${tg_to_dut_if2}
140 | | ... | ${dut_node}
141 | | ... | ${dut_to_tg_if2}
142 | | ... | ${bd_id2}
143 | | And Add destination port to L2FIB | ${tg_node}
144 | | ... | ${tg_to_dut_if1}
145 | | ... | ${dut_node}
146 | | ... | ${vhost_if2}
147 | | ... | ${bd_id2}
148 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
149 | | ... | ${sock2}
150 | | Then Send ICMPv6 bidirectionally and verify received packets
151 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}