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