From: Luca Vizzarro <luca.vizzarro@arm.com>
To: dev@dpdk.org
Cc: Luca Vizzarro <luca.vizzarro@arm.com>,
Paul Szczepanek <paul.szczepanek@arm.com>,
Patrick Robb <probb@iol.unh.edu>
Subject: [PATCH 6/6] dts: restore TG setup and teardown
Date: Mon, 24 Feb 2025 13:28:23 +0000 [thread overview]
Message-ID: <20250224132823.196509-7-luca.vizzarro@arm.com> (raw)
In-Reply-To: <20250224132823.196509-1-luca.vizzarro@arm.com>
The setup and teardown was previously missed when reworking the
execution internals into states. Add back the traffic generator setup
and teardown respectively in TestRunSetup and TestRunTeardown.
Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
---
dts/framework/test_run.py | 2 ++
.../testbed_model/traffic_generator/traffic_generator.py | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index 84d8fb26ac..774036571b 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -338,6 +338,7 @@ def next(self) -> State | None:
test_run.ctx.sut_node.setup()
test_run.ctx.tg_node.setup()
test_run.ctx.dpdk.setup(test_run.ctx.topology.sut_ports)
+ test_run.ctx.tg.setup(test_run.ctx.topology.tg_ports)
self.result.ports = test_run.ctx.topology.sut_ports + test_run.ctx.topology.tg_ports
self.result.sut_info = test_run.ctx.sut_node.node_info
@@ -420,6 +421,7 @@ def description(self) -> str:
def next(self) -> State | None:
"""Next state."""
+ self.test_run.ctx.tg.teardown(self.test_run.ctx.topology.tg_ports)
self.test_run.ctx.dpdk.teardown(self.test_run.ctx.topology.sut_ports)
self.test_run.ctx.tg_node.teardown()
self.test_run.ctx.sut_node.teardown()
diff --git a/dts/framework/testbed_model/traffic_generator/traffic_generator.py b/dts/framework/testbed_model/traffic_generator/traffic_generator.py
index 4469273e36..804662e114 100644
--- a/dts/framework/testbed_model/traffic_generator/traffic_generator.py
+++ b/dts/framework/testbed_model/traffic_generator/traffic_generator.py
@@ -53,7 +53,7 @@ def __init__(self, tg_node: Node, config: TrafficGeneratorConfig, **kwargs):
def setup(self, ports: Iterable[Port]):
"""Setup the traffic generator."""
- def teardown(self):
+ def teardown(self, ports: Iterable[Port]):
"""Teardown the traffic generator."""
def send_packet(self, packet: Packet, port: Port) -> None:
--
2.43.0
prev parent reply other threads:[~2025-02-24 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 13:28 [PATCH 0/6] dts: add build-less driver binding Luca Vizzarro
2025-02-24 13:28 ` [PATCH 1/6] dts: ensure runtime working directory Luca Vizzarro
2025-02-24 13:28 ` [PATCH 2/6] dts: use topology in smoke tests Luca Vizzarro
2025-02-24 13:28 ` [PATCH 3/6] dts: add tmp directory facility Luca Vizzarro
2025-02-24 13:28 ` [PATCH 4/6] dts: decouple DPDK runtime from build Luca Vizzarro
2025-02-24 13:28 ` [PATCH 5/6] dts: enable build-less DPDK driver binding Luca Vizzarro
2025-02-24 13:28 ` Luca Vizzarro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250224132823.196509-7-luca.vizzarro@arm.com \
--to=luca.vizzarro@arm.com \
--cc=dev@dpdk.org \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).