This suite tests the ability of the Poll Mode Driver to enable and disable Rx/Tx queues on a port.
Depends-on: patch-144442 ("dts: add port queue modification and forwarding stats to testpmd") Signed-off-by: Dean Marx <dm...@iol.unh.edu> Reviewed-by: Jeremy Spewock <jspew...@iol.unh.edu> --- dts/framework/config/conf_yaml_schema.json | 3 ++- dts/tests/TestSuite_queue_start_stop.py | 16 +++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index df390e8ae2..12a4a26dc8 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -187,7 +187,8 @@ "enum": [ "hello_world", "os_udp", - "pmd_buffer_scatter" + "pmd_buffer_scatter", + "queue_start_stop" ] }, "test_target": { diff --git a/dts/tests/TestSuite_queue_start_stop.py b/dts/tests/TestSuite_queue_start_stop.py index 7533f0b395..389030ae8c 100644 --- a/dts/tests/TestSuite_queue_start_stop.py +++ b/dts/tests/TestSuite_queue_start_stop.py @@ -17,9 +17,13 @@ from scapy.packet import Raw # type: ignore[import-untyped] from framework.remote_session.testpmd_shell import SimpleForwardingModes, TestPmdShell -from framework.test_suite import TestSuite +from framework.test_suite import TestSuite, func_test +from framework.testbed_model.capability import NicCapability, TopologyType, requires +@requires(topology_type=TopologyType.two_links) +@requires(NicCapability.RUNTIME_RX_QUEUE_SETUP) +@requires(NicCapability.RUNTIME_TX_QUEUE_SETUP) class TestQueueStartStop(TestSuite): """DPDK Queue start/stop test suite. @@ -30,14 +34,6 @@ class TestQueueStartStop(TestSuite): queue and verify that packets are not received/forwarded. """ - def set_up_suite(self) -> None: - """Set up the test suite. - - Setup: - Verify that at least two ports are open for session. - """ - self.verify(len(self._port_links) > 1, "Not enough ports") - def send_packet_and_verify(self, should_receive: bool = True) -> None: """Generate a packet, send to the DUT, and verify it is forwarded back. @@ -54,6 +50,7 @@ def send_packet_and_verify(self, should_receive: bool = True) -> None: f"Packet was {'dropped' if should_receive else 'received'}", ) + @func_test def test_rx_queue_start_stop(self) -> None: """Verify packets are not received by port 0 when Rx queue is disabled. @@ -72,6 +69,7 @@ def test_rx_queue_start_stop(self) -> None: "Packets were received on Rx queue when it should've been disabled", ) + @func_test def test_tx_queue_start_stop(self) -> None: """Verify packets are not forwarded by port 1 when Tx queue is disabled. -- 2.44.0