Align suite/test teardown/setup
[csit.git] / tests / vpp / device / vm_vhost / l2xc / eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot
1 # Copyright (c) 2019 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 | Library | resources.libraries.python.Trace
16 | Library | resources.libraries.python.NodePath
17 | Resource | resources/libraries/robot/shared/default.robot
18 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
19 | Resource | resources/libraries/robot/l2/l2_traffic.robot
20 | Resource | resources/libraries/robot/shared/testing_path.robot
21 | Resource | resources/libraries/robot/shared/interfaces.robot
22 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
23 | ...
24 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
25 | ... | FUNCTEST | L2XCFWD | BASE | ETH | VHOST | 1VM
26 | ...
27 | Test Setup | Set up VPP device test
28 | ...
29 | Test Teardown | Tear down test | packet_trace | vhost
30 | ...
31 | Documentation | *L2 cross-connect test cases with vhost user interface*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
34 | ... | VM and single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
36 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
37 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
38 | ... | (L2XC) switching. Qemu Guest is connected to VPP via vhost-user \
39 | ... | interfaces. Guest is configured with linux bridge interconnecting \
40 | ... | vhost-user interfaces.
41 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
42 | ... | are sent in both directions by TG on links to DUT1 via VM; on receive \
43 | ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr, \
44 | ... | dst-addr and MAC addresses.
45 | ... | *[Ref] Applicable standard specifications:* RFC792
46
47 *** Variables ***
48 | ${sock1}= | /tmp/sock1
49 | ${sock2}= | /tmp/sock2
50
51 *** Test Cases ***
52 | tc01-eth2p-ethip4-l2xcbase-eth-2vhost-1vm-device
53 | | [Documentation]
54 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
55 | | ... | two L2 cross-connects (L2XC), each with one untagged interface \
56 | | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make \
57 | | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
58 | | ... | i/fs to be switched by DUT to and from VM; verify all packets \
59 | | ... | are received. [Ref]
60 | | ...
61 | | Given Configure path in 2-node circular topology
62 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
63 | | And Configure interfaces in path up
64 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
65 | | ... | ${sock1} | ${sock2}
66 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
67 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
68 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
69 | | ... | ${sock2}
70 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
71 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
72 | | And Get Vhost dump | ${dut_node}
73
74 | tc02-eth2p-ethip6-l2xcbase-eth-2vhost-1vm-device
75 | | [Documentation]
76 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \
77 | | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG \
78 | | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send \
79 | | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to \
80 | | ... | be switched by DUT to and from VM; verify all packets are \
81 | | ... | received. [Ref]
82 | | ...
83 | | Given Configure path in 2-node circular topology
84 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
85 | | And Configure interfaces in path up
86 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
87 | | ... | ${sock1} | ${sock2}
88 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
89 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
90 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
91 | | ... | ${sock2}
92 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
93 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}