feat(dma): Add show dma as test teardown 19/41919/9
authorVratko Polak <[email protected]>
Mon, 25 Nov 2024 13:15:43 +0000 (14:15 +0100)
committerVratko Polak <[email protected]>
Mon, 25 Nov 2024 13:52:46 +0000 (13:52 +0000)
Add the teardown to memif and nginx tests,
for memif it needs to be before "container" teardown.

Change-Id: I142b76d3e47554d3a8050e04b9598592b43f22c1
Signed-off-by: Vratko Polak <[email protected]>
resources/libraries/python/DMAUtil.py
resources/libraries/robot/shared/test_teardown.robot
tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2bdbasemaclrn-eth-2memif-dma-1dcr-ndrpdr.robot
tests/vpp/perf/container_memif/2n1l-10ge2p1x710-eth-l2xcbase-eth-2memif-dma-1dcr-ndrpdr.robot
tests/vpp/perf/container_memif/2n1l-10ge2p1x710-ethip4-ip4base-eth-2memif-dma-1dcr-ndrpdr.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-dma-ldpreload-nginx-1_21_5-cps.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-dma-ldpreload-nginx-1_21_5-rps.robot

index f904ea4..0c0ed3c 100644 (file)
 """DMA util library."""
 
 from re import search
-from resources.libraries.python.topology import NodeType, Topology
+
+from resources.libraries.python.PapiExecutor import PapiSocketExecutor
 from resources.libraries.python.ssh import exec_cmd, exec_cmd_no_error
+from resources.libraries.python.topology import NodeType, Topology
 
 
 class DMAUtil:
@@ -211,3 +213,12 @@ class DMAUtil:
             node, cmd, sudo=True, message="Failed")
 
         return enabled_wqs
+
+    @staticmethod
+    def vpp_show_dma(node):
+        """Call show dma CLI command on all sockets.
+
+        :param node: Topology node.
+        :type node: dict
+        """
+        PapiSocketExecutor.run_cli_cmd_on_all_sockets(node, u"show dma")
index f590e8a..81a9454 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2023 Cisco and/or its affiliates.
+# Copyright (c) 2024 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 | | | ... | Show DET44 verbose | ${nodes['${dut}']}
 | | END
 
+| Additional Test Tear Down Action For dma
+| | [Documentation]
+| | ... | Log information relevant to DMA tests.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | VPP Show DMA | ${nodes['${dut}']}
+| | END
+
 | Additional Test Tear Down Action For geneve4
 | | [Documentation]
 | | ... | Additional teardown for tests which uses GENEVE IPv4 tunnel.
index 4996795..701bf6c 100644 (file)
@@ -24,7 +24,7 @@
 | Suite Setup | Setup suite topology interfaces | performance
 | Suite Teardown | Tear down suite | performance
 | Test Setup | Setup test | performance
-| Test Teardown | Tear down test | performance | container
+| Test Teardown | Tear down test | performance | dma | container
 |
 | Test Template | Local Template
 |
index 7443c10..3382173 100644 (file)
@@ -24,7 +24,7 @@
 | Suite Setup | Setup suite topology interfaces | performance
 | Suite Teardown | Tear down suite | performance
 | Test Setup | Setup test | performance
-| Test Teardown | Tear down test | performance | container
+| Test Teardown | Tear down test | performance | dma | container
 |
 | Test Template | Local Template
 |
index 2a50bd1..75c7036 100644 (file)
@@ -24,7 +24,7 @@
 | Suite Setup | Setup suite topology interfaces | performance
 | Suite Teardown | Tear down suite | performance
 | Test Setup | Setup test | performance
-| Test Teardown | Tear down test | performance | container
+| Test Teardown | Tear down test | performance | dma | container
 |
 | Test Template | Local Template
 |
index 667b833..1429108 100644 (file)
@@ -23,7 +23,7 @@
 | Suite Setup | Setup suite topology interfaces | ab | nginx
 | Suite Teardown | Tear down suite | ab
 | Test Setup | Setup test
-| Test Teardown | Tear down test | nginx
+| Test Teardown | Tear down test | nginx | dma
 |
 | Test Template | Local Template
 |
index 3cf4cf3..e36fbe1 100644 (file)
@@ -23,7 +23,7 @@
 | Suite Setup | Setup suite topology interfaces | ab | nginx
 | Suite Teardown | Tear down suite | ab
 | Test Setup | Setup test
-| Test Teardown | Tear down test | nginx
+| Test Teardown | Tear down test | nginx | dma
 |
 | Test Template | Local Template
 |