From: Dean Marx <dmarx@iol.unh.edu>
To: patrickrobb1997@gmail.com, luca.vizzarro@arm.com,
yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com,
paul.szczepanek@arm.com
Cc: dev@dpdk.org, Dean Marx <dmarx@iol.unh.edu>
Subject: [PATCH v4 3/7] dts: move context from framework to API
Date: Thu, 30 Apr 2026 17:09:13 -0400 [thread overview]
Message-ID: <20260430210917.25186-4-dmarx@iol.unh.edu> (raw)
In-Reply-To: <20260430210917.25186-1-dmarx@iol.unh.edu>
A couple test suites import and get the run context
during execution. Move this to the API.
Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
.../dts/{framework.context.rst => api.context.rst} | 2 +-
doc/api/dts/index.rst | 2 +-
dts/api/artifact.py | 2 +-
dts/{framework => api}/context.py | 0
dts/api/cryptodev/__init__.py | 2 +-
dts/api/packet.py | 4 ++--
dts/api/test.py | 2 +-
dts/api/testpmd/__init__.py | 2 +-
dts/framework/remote_session/blocking_app.py | 2 +-
dts/framework/remote_session/dpdk.py | 2 +-
dts/framework/remote_session/dpdk_shell.py | 2 +-
dts/framework/remote_session/interactive_shell.py | 2 +-
dts/framework/test_run.py | 2 +-
dts/framework/test_suite.py | 4 ++--
dts/framework/testbed_model/node.py | 2 +-
dts/framework/testbed_model/topology.py | 14 +++++++-------
dts/tests/TestSuite_cryptodev_throughput.py | 2 +-
dts/tests/TestSuite_l2fwd.py | 2 +-
18 files changed, 25 insertions(+), 25 deletions(-)
rename doc/api/dts/{framework.context.rst => api.context.rst} (80%)
rename dts/{framework => api}/context.py (100%)
diff --git a/doc/api/dts/framework.context.rst b/doc/api/dts/api.context.rst
similarity index 80%
rename from doc/api/dts/framework.context.rst
rename to doc/api/dts/api.context.rst
index 925c160360..65b4ab9a47 100644
--- a/doc/api/dts/framework.context.rst
+++ b/doc/api/dts/api.context.rst
@@ -3,6 +3,6 @@
context - DTS execution context
===============================
-.. automodule:: framework.context
+.. automodule:: api.context
:members:
:show-inheritance:
diff --git a/doc/api/dts/index.rst b/doc/api/dts/index.rst
index 783270f6e9..98269d6e80 100644
--- a/doc/api/dts/index.rst
+++ b/doc/api/dts/index.rst
@@ -32,7 +32,7 @@ Modules
framework.test_suite
framework.test_result
framework.settings
- framework.context
+ api.context
framework.logger
framework.parser
api.utils
diff --git a/dts/api/artifact.py b/dts/api/artifact.py
index 7d04c7ab49..f3dd07de56 100644
--- a/dts/api/artifact.py
+++ b/dts/api/artifact.py
@@ -86,7 +86,7 @@ def make_file_path(
path /= custom_path
else:
- from framework.context import get_ctx
+ from api.context import get_ctx
try:
ctx = get_ctx()
diff --git a/dts/framework/context.py b/dts/api/context.py
similarity index 100%
rename from dts/framework/context.py
rename to dts/api/context.py
diff --git a/dts/api/cryptodev/__init__.py b/dts/api/cryptodev/__init__.py
index c6a220dced..67dcb02130 100644
--- a/dts/api/cryptodev/__init__.py
+++ b/dts/api/cryptodev/__init__.py
@@ -23,7 +23,7 @@
VerifyResults,
)
from api.exception import RemoteCommandExecutionError, SkippedTestException
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.remote_session.dpdk_shell import compute_eal_params
if TYPE_CHECKING:
diff --git a/dts/api/packet.py b/dts/api/packet.py
index b7a9bb28bf..59f26da833 100644
--- a/dts/api/packet.py
+++ b/dts/api/packet.py
@@ -30,7 +30,7 @@
from api.exception import InternalError
from api.test import fail, log_debug
from api.utils import get_packet_summaries
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.testbed_model.traffic_generator.capturing_traffic_generator import (
PacketFilteringConfig,
)
@@ -82,7 +82,7 @@ def send_packets_and_capture(
Returns:
A list of received packets.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
from framework.testbed_model.traffic_generator.capturing_traffic_generator import (
CapturingTrafficGenerator,
)
diff --git a/dts/api/test.py b/dts/api/test.py
index 9cad9a9495..a1f2326075 100644
--- a/dts/api/test.py
+++ b/dts/api/test.py
@@ -11,7 +11,7 @@
from api.artifact import Artifact
from api.exception import InternalError, SkippedTestException, TestCaseVerifyError
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.logger import DTSLogger
diff --git a/dts/api/testpmd/__init__.py b/dts/api/testpmd/__init__.py
index 9498d723d5..a528663c21 100644
--- a/dts/api/testpmd/__init__.py
+++ b/dts/api/testpmd/__init__.py
@@ -55,7 +55,7 @@
TxOffloadConfiguration,
VLANOffloadFlag,
)
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.params.types import TestPmdParamsDict
from framework.remote_session.dpdk_shell import DPDKShell
from framework.remote_session.interactive_shell import only_active
diff --git a/dts/framework/remote_session/blocking_app.py b/dts/framework/remote_session/blocking_app.py
index c3b02dcc62..07db6dfeb0 100644
--- a/dts/framework/remote_session/blocking_app.py
+++ b/dts/framework/remote_session/blocking_app.py
@@ -30,7 +30,7 @@
from typing_extensions import Self
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.params import Params
from framework.params.eal import EalParams
from framework.remote_session.dpdk_shell import compute_eal_params
diff --git a/dts/framework/remote_session/dpdk.py b/dts/framework/remote_session/dpdk.py
index 69b47b823b..9f7cd60dfe 100644
--- a/dts/framework/remote_session/dpdk.py
+++ b/dts/framework/remote_session/dpdk.py
@@ -26,7 +26,7 @@
RemoteDPDKTarballLocation,
RemoteDPDKTreeLocation,
)
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.logger import DTSLogger, get_dts_logger
from framework.params.eal import EalParams
from framework.remote_session.remote_session import CommandResult
diff --git a/dts/framework/remote_session/dpdk_shell.py b/dts/framework/remote_session/dpdk_shell.py
index 269c2cada4..a8f169787c 100644
--- a/dts/framework/remote_session/dpdk_shell.py
+++ b/dts/framework/remote_session/dpdk_shell.py
@@ -10,7 +10,7 @@
from abc import ABC, abstractmethod
from pathlib import PurePath
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.params.eal import EalParams
from framework.remote_session.interactive_shell import (
InteractiveShell,
diff --git a/dts/framework/remote_session/interactive_shell.py b/dts/framework/remote_session/interactive_shell.py
index fdd074be3a..d138727c85 100644
--- a/dts/framework/remote_session/interactive_shell.py
+++ b/dts/framework/remote_session/interactive_shell.py
@@ -34,7 +34,7 @@
InteractiveSSHSessionDeadError,
InteractiveSSHTimeoutError,
)
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.logger import DTSLogger, get_dts_logger
from framework.params import Params
from framework.settings import SETTINGS
diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index bbaf4f1fdf..605a916ebb 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -108,7 +108,7 @@
from api.exception import InternalError, SkippedTestException, TestCaseVerifyError
from framework.config.test_run import TestRunConfiguration
-from framework.context import Context, init_ctx
+from api.context import Context, init_ctx
from framework.logger import DTSLogger, get_dts_logger
from framework.remote_session.dpdk import DPDKBuildEnvironment, DPDKRuntimeEnvironment
from framework.settings import SETTINGS
diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
index 426c98fdf6..6066f7a77a 100644
--- a/dts/framework/test_suite.py
+++ b/dts/framework/test_suite.py
@@ -38,7 +38,7 @@
from .logger import DTSLogger, get_dts_logger
if TYPE_CHECKING:
- from framework.context import Context
+ from api.context import Context
class BaseConfig(FrozenModel):
@@ -92,7 +92,7 @@ def __init__(self, config: BaseConfig) -> None:
Args:
config: The test suite configuration.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
self.config = config
self._ctx = get_ctx()
diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py
index 4f42bf6aeb..40dd7f0666 100644
--- a/dts/framework/testbed_model/node.py
+++ b/dts/framework/testbed_model/node.py
@@ -242,7 +242,7 @@ def get_node(node_identifier: NodeIdentifier) -> Node | None:
if node_identifier == "local":
return None
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
if node_identifier == "sut":
diff --git a/dts/framework/testbed_model/topology.py b/dts/framework/testbed_model/topology.py
index 805a762c19..5b6ff2add5 100644
--- a/dts/framework/testbed_model/topology.py
+++ b/dts/framework/testbed_model/topology.py
@@ -96,7 +96,7 @@ def node_and_ports_from_id(self, node_identifier: NodeIdentifier) -> tuple[Node,
Raises:
InternalError: If the given `node_identifier` is invalid.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
match node_identifier:
@@ -180,7 +180,7 @@ def instantiate_crypto_ports(self) -> None:
Raises:
InternalError: If crypto virtual functions could not be created on a port.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
for port in ctx.sut_node.cryptodevs:
@@ -206,7 +206,7 @@ def instantiate_vf_ports(self) -> None:
Raises:
InternalError: If virtual function creation fails.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
@@ -235,7 +235,7 @@ def instantiate_vf_ports(self) -> None:
def delete_vf_ports(self) -> None:
"""Delete virtual functions from the SUT node during test run teardown."""
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
@@ -246,7 +246,7 @@ def delete_vf_ports(self) -> None:
def delete_crypto_vf_ports(self) -> None:
"""Delete crypto virtual functions from the SUT node during test run teardown."""
- from framework.context import get_ctx
+ from api.context import get_ctx
ctx = get_ctx()
@@ -259,7 +259,7 @@ def bind_cryptodevs(self, driver: DriverKind):
Args:
driver: The driver to bind the crypto functions
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
self._bind_ports_to_drivers(get_ctx().sut_node, self.crypto_vf_ports, driver)
@@ -318,7 +318,7 @@ def _prepare_devbind_script(self) -> None:
Raises:
InternalError: If dpdk-devbind.py could not be found.
"""
- from framework.context import get_ctx
+ from api.context import get_ctx
local_script_path = Path("..", "usertools", "dpdk-devbind.py").resolve()
valid_script_path = local_script_path.exists()
diff --git a/dts/tests/TestSuite_cryptodev_throughput.py b/dts/tests/TestSuite_cryptodev_throughput.py
index f36b48a153..39784cbcac 100644
--- a/dts/tests/TestSuite_cryptodev_throughput.py
+++ b/dts/tests/TestSuite_cryptodev_throughput.py
@@ -31,7 +31,7 @@
)
from api.exception import SkippedTestException
from api.test import verify
-from framework.context import get_ctx
+from api.context import get_ctx
from framework.test_suite import BaseConfig, TestSuite, crypto_test
from framework.testbed_model.virtual_device import VirtualDevice
diff --git a/dts/tests/TestSuite_l2fwd.py b/dts/tests/TestSuite_l2fwd.py
index 1e99b82b8c..c018efb1f7 100644
--- a/dts/tests/TestSuite_l2fwd.py
+++ b/dts/tests/TestSuite_l2fwd.py
@@ -21,7 +21,7 @@
from api.testpmd import TestPmd
from api.testpmd.config import EthPeer, SimpleForwardingModes
from api.utils import generate_random_packets
-from framework.context import filter_cores
+from api.context import filter_cores
from framework.test_suite import TestSuite, func_test
from framework.testbed_model.cpu import LogicalCoreCount
--
2.52.0
next prev parent reply other threads:[~2026-04-30 21:09 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 15:53 [PATCH v1 0/4] dts: add dynamic queue configuration test suite jspewock
2024-06-25 15:53 ` [PATCH v1 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-06-25 15:53 ` [PATCH v1 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-06-25 15:53 ` [PATCH v1 3/4] dts: add dynamic queue test suite jspewock
2024-06-25 15:53 ` [PATCH v1 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-07-03 21:58 ` [PATCH v2 0/4] dts: add dynamic queue configuration test suite jspewock
2024-07-03 21:58 ` [PATCH v2 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-07-03 21:58 ` [PATCH v2 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-07-03 21:58 ` [PATCH v2 3/4] dts: add dynamic queue test suite jspewock
2024-07-03 21:58 ` [PATCH v2 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-07-24 15:07 ` [PATCH v3 0/4] dts: add dynamic queue configuration test suite jspewock
2024-07-24 15:07 ` [PATCH v3 1/4] dts: add send_packets to test suites and rework packet addressing jspewock
2024-07-26 14:37 ` Nicholas Pratte
2024-07-26 19:00 ` Nicholas Pratte
2024-07-26 19:13 ` Jeremy Spewock
2024-08-29 19:42 ` Nicholas Pratte
2024-07-24 15:07 ` [PATCH v3 2/4] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-07-24 15:07 ` [PATCH v3 3/4] dts: add dynamic queue test suite jspewock
2024-07-24 15:07 ` [PATCH v3 4/4] dts: add dynamic queue conf to the yaml schema jspewock
2024-09-04 15:49 ` [PATCH v4 0/2] dts: add dynamic queue configuration test suite jspewock
2024-09-04 15:49 ` [PATCH v4 1/2] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-09-04 15:49 ` [PATCH v4 2/2] dts: add dynamic queue test suite jspewock
2024-09-25 19:20 ` [PATCH v5 0/2] dts: add dynamic queue configuration " jspewock
2024-09-25 19:20 ` [PATCH v5 1/2] dts: add port queue modification and forwarding stats to testpmd jspewock
2024-09-25 19:20 ` [PATCH v5 2/2] dts: add dynamic queue test suite jspewock
2024-11-05 16:58 ` [PATCH v6 0/2] dts: add dynamic queue configuration " Dean Marx
2024-11-05 16:58 ` [PATCH v6 1/2] dts: add port queue modification and forwarding stats to testpmd Dean Marx
2024-11-18 23:25 ` Patrick Robb
2024-11-18 23:36 ` Patrick Robb
2024-11-05 16:58 ` [PATCH v6 2/2] dts: add dynamic queue test suite Dean Marx
2024-11-18 23:24 ` Patrick Robb
2024-11-18 23:24 ` Patrick Robb
2026-04-23 17:03 ` [PATCH v1 0/8] dts: move test suite imports from framework to API Dean Marx
2026-04-23 17:03 ` [PATCH v1 1/8] dts: move test suite module " Dean Marx
2026-04-23 17:03 ` [PATCH v1 2/8] dts: move testbed model " Dean Marx
2026-04-23 17:03 ` [PATCH v1 3/8] dts: move exception module " Dean Marx
2026-04-23 17:03 ` [PATCH v1 4/8] dts: move utils " Dean Marx
2026-04-23 17:03 ` [PATCH v1 5/8] dts: move context " Dean Marx
2026-04-23 17:03 ` [PATCH v1 6/8] dts: move params directory " Dean Marx
2026-04-23 17:03 ` [PATCH v1 7/8] dts: separate Linux session into interface and logic Dean Marx
2026-04-23 17:03 ` [PATCH v1 8/8] dts: update API rst files for doc build Dean Marx
2026-04-23 19:04 ` [PATCH v2 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-23 19:04 ` [PATCH v2 1/7] dts: move test suite module " Dean Marx
2026-04-23 19:04 ` [PATCH v2 2/7] dts: move testbed model " Dean Marx
2026-04-23 19:04 ` [PATCH v2 3/7] dts: move exception module " Dean Marx
2026-04-23 19:04 ` [PATCH v2 4/7] dts: move utils " Dean Marx
2026-04-23 19:04 ` [PATCH v2 5/7] dts: move context " Dean Marx
2026-04-23 19:04 ` [PATCH v2 6/7] dts: move params directory " Dean Marx
2026-04-23 19:04 ` [PATCH v2 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-24 17:01 ` [PATCH v3 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-24 17:01 ` [PATCH v3 1/7] dts: move exception module " Dean Marx
2026-04-24 17:01 ` [PATCH v3 2/7] dts: move utils " Dean Marx
2026-04-24 17:01 ` [PATCH v3 3/7] dts: move context " Dean Marx
2026-04-24 17:01 ` [PATCH v3 4/7] dts: move testbed model " Dean Marx
2026-04-24 17:01 ` [PATCH v3 5/7] dts: move test suite module " Dean Marx
2026-04-24 17:01 ` [PATCH v3 6/7] dts: move params directory " Dean Marx
2026-04-24 17:01 ` [PATCH v3 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-28 18:08 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-28 18:08 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-28 18:08 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-28 18:08 ` [PATCH v4 3/7] dts: move context " Dean Marx
2026-04-28 18:08 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-28 18:08 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-28 18:08 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-28 18:08 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-30 21:09 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-30 21:09 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-30 21:09 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-30 21:09 ` Dean Marx [this message]
2026-04-30 21:09 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-30 21:09 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-30 21:09 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-30 21:09 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
2026-04-30 22:06 ` [PATCH v4 0/7] dts: move test suite imports from framework to API Dean Marx
2026-04-30 22:06 ` [PATCH v4 1/7] dts: move exception module " Dean Marx
2026-04-30 22:06 ` [PATCH v4 2/7] dts: move utils " Dean Marx
2026-04-30 22:06 ` [PATCH v4 3/7] dts: move context " Dean Marx
2026-04-30 22:06 ` [PATCH v4 4/7] dts: move testbed model " Dean Marx
2026-04-30 22:06 ` [PATCH v4 5/7] dts: move test suite module " Dean Marx
2026-04-30 22:06 ` [PATCH v4 6/7] dts: move params directory " Dean Marx
2026-04-30 22:06 ` [PATCH v4 7/7] dts: separate Linux session into interface and logic Dean Marx
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=20260430210917.25186-4-dmarx@iol.unh.edu \
--to=dmarx@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=luca.vizzarro@arm.com \
--cc=patrickrobb1997@gmail.com \
--cc=paul.szczepanek@arm.com \
--cc=yoan.picchi@foss.arm.com \
/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