Skip to content

Commit e3ab9dd

Browse files
dts: remove redundant test suite
The test suite served as a demonstration of the Scapy traffic generator implementation. Now that we have a test suite that uses DPDK code (via testpmd), there is no reason to keep the test suite, as there's no expectation it'll be actually used in any setup. Signed-off-by: Juraj Linkeš <[email protected]> Signed-off-by: Paul Szczepanek <[email protected]> Reviewed-by: Luca Vizzarro <[email protected]> Reviewed-by: Patrick Robb <[email protected]>
1 parent 4f7b228 commit e3ab9dd

File tree

7 files changed

+1
-156
lines changed

7 files changed

+1
-156
lines changed

dts/conf.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ test_runs:
2929
skip_smoke_tests: false # optional
3030
test_suites: # the following test suites will be run in their entirety
3131
- hello_world
32-
- os_udp
3332
# The machine running the DPDK test executable
3433
system_under_test_node:
3534
node_name: "SUT 1"

dts/framework/test_suite.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -209,42 +209,6 @@ def tear_down_test_case(self) -> None:
209209
This is done after *each* test case.
210210
"""
211211

212-
def configure_testbed_ipv4(self, restore: bool = False) -> None:
213-
"""Configure IPv4 addresses on all testbed ports.
214-
215-
The configured ports are:
216-
217-
* SUT ingress port,
218-
* SUT egress port,
219-
* TG ingress port,
220-
* TG egress port.
221-
222-
Args:
223-
restore: If :data:`True`, will remove the configuration instead.
224-
"""
225-
delete = True if restore else False
226-
enable = False if restore else True
227-
self._configure_ipv4_forwarding(enable)
228-
self.sut_node.configure_port_ip_address(
229-
self._sut_ip_address_egress, self._sut_port_egress, delete
230-
)
231-
self.sut_node.configure_port_state(self._sut_port_egress, enable)
232-
self.sut_node.configure_port_ip_address(
233-
self._sut_ip_address_ingress, self._sut_port_ingress, delete
234-
)
235-
self.sut_node.configure_port_state(self._sut_port_ingress, enable)
236-
self.tg_node.configure_port_ip_address(
237-
self._tg_ip_address_ingress, self._tg_port_ingress, delete
238-
)
239-
self.tg_node.configure_port_state(self._tg_port_ingress, enable)
240-
self.tg_node.configure_port_ip_address(
241-
self._tg_ip_address_egress, self._tg_port_egress, delete
242-
)
243-
self.tg_node.configure_port_state(self._tg_port_egress, enable)
244-
245-
def _configure_ipv4_forwarding(self, enable: bool) -> None:
246-
self.sut_node.configure_ipv4_forwarding(enable)
247-
248212
def send_packet_and_capture(
249213
self,
250214
packet: Packet,

dts/framework/testbed_model/linux_session.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"""
1111

1212
import json
13-
from ipaddress import IPv4Interface, IPv6Interface
14-
from typing import TypedDict, Union
13+
from typing import TypedDict
1514

1615
from typing_extensions import NotRequired
1716

@@ -179,25 +178,6 @@ def _update_port_attr(self, port: Port, attr_value: str | None, attr_name: str)
179178
f"Attempted to get '{attr_name}' of port {port.pci}, but it doesn't exist."
180179
)
181180

182-
def configure_port_state(self, port: Port, enable: bool) -> None:
183-
"""Overrides :meth:`~.os_session.OSSession.configure_port_state`."""
184-
state = "up" if enable else "down"
185-
self.send_command(f"ip link set dev {port.logical_name} {state}", privileged=True)
186-
187-
def configure_port_ip_address(
188-
self,
189-
address: Union[IPv4Interface, IPv6Interface],
190-
port: Port,
191-
delete: bool,
192-
) -> None:
193-
"""Overrides :meth:`~.os_session.OSSession.configure_port_ip_address`."""
194-
command = "del" if delete else "add"
195-
self.send_command(
196-
f"ip address {command} {address} dev {port.logical_name}",
197-
privileged=True,
198-
verify=True,
199-
)
200-
201181
def configure_port_mtu(self, mtu: int, port: Port) -> None:
202182
"""Overrides :meth:`~.os_session.OSSession.configure_port_mtu`."""
203183
self.send_command(

dts/framework/testbed_model/node.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ def __init__(self, node_config: NodeConfiguration):
9696
def _init_ports(self) -> None:
9797
self.ports = [Port(self.name, port_config) for port_config in self.config.ports]
9898
self.main_session.update_ports(self.ports)
99-
for port in self.ports:
100-
self.configure_port_state(port)
10199

102100
def set_up_test_run(
103101
self,

dts/framework/testbed_model/os_session.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
from abc import ABC, abstractmethod
2626
from collections.abc import Iterable
2727
from dataclasses import dataclass
28-
from ipaddress import IPv4Interface, IPv6Interface
2928
from pathlib import Path, PurePath, PurePosixPath
30-
from typing import Union
3129

3230
from framework.config import Architecture, NodeConfiguration
3331
from framework.logger import DTSLogger
@@ -521,30 +519,6 @@ def update_ports(self, ports: list[Port]) -> None:
521519
ports: The ports to update.
522520
"""
523521

524-
@abstractmethod
525-
def configure_port_state(self, port: Port, enable: bool) -> None:
526-
"""Enable/disable `port` in the operating system.
527-
528-
Args:
529-
port: The port to configure.
530-
enable: If :data:`True`, enable the port, otherwise shut it down.
531-
"""
532-
533-
@abstractmethod
534-
def configure_port_ip_address(
535-
self,
536-
address: Union[IPv4Interface, IPv6Interface],
537-
port: Port,
538-
delete: bool,
539-
) -> None:
540-
"""Configure an IP address on `port` in the operating system.
541-
542-
Args:
543-
address: The address to configure.
544-
port: The port to configure.
545-
delete: If :data:`True`, remove the IP address, otherwise configure it.
546-
"""
547-
548522
@abstractmethod
549523
def configure_port_mtu(self, mtu: int, port: Port) -> None:
550524
"""Configure `mtu` on `port`.
@@ -553,11 +527,3 @@ def configure_port_mtu(self, mtu: int, port: Port) -> None:
553527
mtu: Desired MTU value.
554528
port: Port to set `mtu` on.
555529
"""
556-
557-
@abstractmethod
558-
def configure_ipv4_forwarding(self, enable: bool) -> None:
559-
"""Enable IPv4 forwarding in the operating system.
560-
561-
Args:
562-
enable: If :data:`True`, enable the forwarding, otherwise disable it.
563-
"""

dts/framework/testbed_model/sut_node.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,6 @@ def run_dpdk_app(
488488
f"{app_path} {eal_params}", timeout, privileged=True, verify=True
489489
)
490490

491-
def configure_ipv4_forwarding(self, enable: bool) -> None:
492-
"""Enable/disable IPv4 forwarding on the node.
493-
494-
Args:
495-
enable: If :data:`True`, enable the forwarding, otherwise disable it.
496-
"""
497-
self.main_session.configure_ipv4_forwarding(enable)
498-
499491
def bind_ports_to_driver(self, for_dpdk: bool = True) -> None:
500492
"""Bind all ports on the SUT to a driver.
501493

dts/tests/TestSuite_os_udp.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)