aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2020-12-15 13:39:56 +0100
committerVratko Polak <vrpolak@cisco.com>2020-12-17 12:28:57 +0000
commita33b52ae0f255021d89307ebc694f6e907906151 (patch)
tree133f7cc93cd5475d211982c952244e96a223ba59 /tests
parent37877d670e7e2d81673222b6c3d9e7649ccd5cd5 (diff)
PAPI: Cache connected client instances
Disconnect+connect cycle is expensive and slow. This change tracks connected client instances so later "connect" to the same target uses it. Explicit disconnects are allowed (and executed before VPP ends), but once again disconnected instances are cached and reused, as creating a new instance is more expensive than just connect. + Add missing checks on interfaces being up to appropriate keyword. + Use appropriate keywords. + Add a comment explaining why a simpler keyword is not appropriate. + Improve VPP checks in containers. + Fix the vppctl check to actually work. + Add PAPI check to ensure VPP is really ready. + Delay/reorder checks to make them faster with multiple containers. + Leave some TODOs to improve various lifecycles later. + As we do not stop VPP in test/suite teardown: + One final disconnect is needed, added to __init__.robot teardowns. - Import of the final disconnect keyword is ugly, but it works. - We could use a hashable class for distinguishing node+socket pairs. - Are we connecting to VPP inside VMs? Change-Id: I49cd726740c3e8cae1591c7c84b85a447241228f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/vpp/device/__init__.robot4
-rw-r--r--tests/vpp/device/container_memif/eth2p-ethipv4-l2bdbasemaclrn-eth-2memif-1dcr-dev.robot3
-rw-r--r--tests/vpp/device/container_memif/eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot3
-rw-r--r--tests/vpp/perf/__init__.robot4
-rw-r--r--tests/vpp/perf/container_memif/10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1lxc-ndrpdr.robot2
-rw-r--r--tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1dcr-ndrpdr.robot2
6 files changed, 12 insertions, 6 deletions
diff --git a/tests/vpp/device/__init__.robot b/tests/vpp/device/__init__.robot
index 38197167a8..1a669e67fd 100644
--- a/tests/vpp/device/__init__.robot
+++ b/tests/vpp/device/__init__.robot
@@ -15,6 +15,7 @@
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
|
+| Library | resources.libraries.python.PapiExecutor.Disconnector
| Library | resources.libraries.python.SetupFramework
| Library | resources.libraries.python.SetupFramework.CleanupFramework
| Library | resources.libraries.python.CpuUtils
@@ -27,7 +28,8 @@
| ... | AND | Get CPU Info from All Nodes | ${nodes}
| ... | AND | Update All Interface Data on All Nodes | ${nodes}
|
-| Suite Teardown | Cleanup Framework | ${nodes}
+| Suite Teardown | Run Keywords | Disconnect All Papi Connections
+| ... | AND | Cleanup Framework | ${nodes}
*** Keywords ***
| Setup Global Variables
diff --git a/tests/vpp/device/container_memif/eth2p-ethipv4-l2bdbasemaclrn-eth-2memif-1dcr-dev.robot b/tests/vpp/device/container_memif/eth2p-ethipv4-l2bdbasemaclrn-eth-2memif-1dcr-dev.robot
index 833e7b0c4c..5fbf2d2d4c 100644
--- a/tests/vpp/device/container_memif/eth2p-ethipv4-l2bdbasemaclrn-eth-2memif-1dcr-dev.robot
+++ b/tests/vpp/device/container_memif/eth2p-ethipv4-l2bdbasemaclrn-eth-2memif-1dcr-dev.robot
@@ -77,7 +77,8 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Start containers for test | auto_scale=${False} | pinning=${False}
-| | And Initialize L2 Bridge Domain with memif pairs | auto_scale=${False}
+| | And Initialize L2 Bridge Domain for multiple chains with memif pairs
+| | ... | auto_scale=${False}
| | Then Send IPv4 bidirectionally and verify received packets
| | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0]
diff --git a/tests/vpp/device/container_memif/eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot b/tests/vpp/device/container_memif/eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot
index a067bbcbe3..56e1cddc6f 100644
--- a/tests/vpp/device/container_memif/eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot
+++ b/tests/vpp/device/container_memif/eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot
@@ -78,11 +78,12 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Start containers for test | auto_scale=${False} | pinning=${False}
-| | And Set interfaces in path up
| | And Set up memif interfaces on DUT node
| | ... | ${dut1} | memif-DUT1_CNF | memif-DUT1_CNF
| | ... | memif_if1=memif_if1 | memif_if2=memif_if2
| | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
+| | # It takes some time for memifs to go up.
+| | And Set interfaces in path up
| | And Add Fib Table | ${dut1} | 20 | ipv6=${True}
| | And Assign Interface To Fib Table
| | ... | ${dut1} | ${memif_if2} | 20 | ipv6=${True}
diff --git a/tests/vpp/perf/__init__.robot b/tests/vpp/perf/__init__.robot
index 388dcb0262..2b38b2a4ee 100644
--- a/tests/vpp/perf/__init__.robot
+++ b/tests/vpp/perf/__init__.robot
@@ -15,6 +15,7 @@
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
|
+| Library | resources.libraries.python.PapiExecutor.Disconnector
| Library | resources.libraries.python.SetupFramework
| Library | resources.libraries.python.SetupFramework.CleanupFramework
| Library | resources.libraries.python.CpuUtils
@@ -30,7 +31,8 @@
| ... | AND | Update All Interface Data on All Nodes | ${nodes}
| ... | skip_tg=${True}
|
-| Suite Teardown | Cleanup Framework | ${nodes}
+| Suite Teardown | Run Keywords | Disconnect All Papi Connections
+| ... | AND | Cleanup Framework | ${nodes}
*** Keywords ***
| Setup Global Variables
diff --git a/tests/vpp/perf/container_memif/10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1lxc-ndrpdr.robot b/tests/vpp/perf/container_memif/10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1lxc-ndrpdr.robot
index 6ba681a6c0..48e2493cb1 100644
--- a/tests/vpp/perf/container_memif/10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1lxc-ndrpdr.robot
+++ b/tests/vpp/perf/container_memif/10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1lxc-ndrpdr.robot
@@ -90,7 +90,7 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Start containers for test
-| | And Initialize L2 Bridge Domain with memif pairs
+| | And Initialize L2 Bridge Domain for multiple chains with memif pairs
| | Then Find NDR and PDR intervals using optimized search
*** Test Cases ***
diff --git a/tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1dcr-ndrpdr.robot b/tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1dcr-ndrpdr.robot
index 63a0a50fe6..8bbeb9bbe5 100644
--- a/tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1dcr-ndrpdr.robot
+++ b/tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-1dcr-ndrpdr.robot
@@ -90,7 +90,7 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Start containers for test
-| | And Initialize L2 Bridge Domain with memif pairs
+| | And Initialize L2 Bridge Domain for multiple chains with memif pairs
| | Then Find NDR and PDR intervals using optimized search
*** Test Cases ***