Add BD vpp-vm-vpp tests
[csit.git] / tests / suites / bridge_domain / bridge_domain_untagged.robot
index badc7a6..bc5eac2 100644 (file)
@@ -14,6 +14,7 @@
 *** Settings ***
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/bridge_domain.robot
+| Resource | resources/libraries/robot/qemu.robot
 | Library  | resources.libraries.python.Trace
 | Force Tags | HW_ENV | VM_ENV
 | Test Setup | Run Keywords | Setup all DUTs before test
 | ... | header MAC addresses are matching MAC addresses of the TG node.
 
 *** Variables ***
-| ${bd_id1} = | 1
-| ${bd_id2} = | 2
+| ${bd_id1}= | 1
+| ${bd_id2}= | 2
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
 
 *** Test Cases ***
 | VPP reports interfaces
 | | ...                                                | ${dut2_node}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
 | | ...                                          | ${tg_to_dut2}
+
+| VPP forwards packets through VM via two L2 bridge domains
+| | [Documentation] | Setup and run VM connected to VPP via Vhost-User
+| | ...             | interfaces and check packet forwarding through VM via two
+| | ...             | L2 bridge domains with learning enabled.
+| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
+| | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
+| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
+| | ...                                                     | ${sock1}
+| | ...                                                     | ${sock2}
+| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
+| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ...                                     | ${bd_id1}
+| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
+| | ...                                     | ${bd_id1}
+| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
+| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ...                                     | ${bd_id2}
+| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
+| | ...                                     | ${bd_id2}
+| | And Interfaces on all VPP nodes in the path are up | ${dut_node}
+| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
+| | ...                                       | ${sock2}
+| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
+| | ...                                          | ${tg_to_dut_if2}
+| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
+| | ...        | AND          | Stop and Clear QEMU | ${dut_node} | ${vm_node}
+
+| VPP forwards packets through VM via two L2 bridge domains with static L2FIB entries
+| | [Documentation] | Setup and run VM connected to VPP via Vhost-User
+| | ...             | interfaces and check packet forwarding through VM via two
+| | ...             | L2 bridge domains with learning disabled (static L2BFIB
+| | ...             | entries).
+| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
+| | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
+| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
+| | ...                                                     | ${sock1}
+| | ...                                                     | ${sock2}
+| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
+| | ...                                      | learn=${FALSE}
+| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ...                                     | ${bd_id1}
+| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
+| | ...                                     | ${bd_id1}
+| | And Destination port is added to L2FIB on DUT node | ${tg_node}
+| | ...                                                | ${tg_to_dut_if1}
+| | ...                                                | ${dut_node}
+| | ...                                                | ${dut_to_tg_if1}
+| | ...                                                | ${bd_id1}
+| | And Destination port is added to L2FIB on DUT node | ${tg_node}
+| | ...                                                | ${tg_to_dut_if2}
+| | ...                                                | ${dut_node}
+| | ...                                                | ${vhost_if1}
+| | ...                                                | ${bd_id1}
+| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
+| | ...                                      | learn=${FALSE}
+| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ...                                     | ${bd_id2}
+| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
+| | ...                                     | ${bd_id2}
+| | And Interfaces on all VPP nodes in the path are up | ${dut_node}
+| | And Destination port is added to L2FIB on DUT node | ${tg_node}
+| | ...                                                | ${tg_to_dut_if2}
+| | ...                                                | ${dut_node}
+| | ...                                                | ${dut_to_tg_if2}
+| | ...                                                | ${bd_id2}
+| | And Destination port is added to L2FIB on DUT node | ${tg_node}
+| | ...                                                | ${tg_to_dut_if1}
+| | ...                                                | ${dut_node}
+| | ...                                                | ${vhost_if2}
+| | ...                                                | ${bd_id2}
+| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
+| | ...                                       | ${sock2}
+| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
+| | ...                                          | ${tg_to_dut_if2}
+| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
+| | ...        | AND          | Stop and Clear QEMU | ${dut_node} | ${vm_node}