DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dts: call hugepages configure at testrun setup
@ 2025-07-25 20:05 Patrick Robb
  0 siblings, 0 replies; only message in thread
From: Patrick Robb @ 2025-07-25 20:05 UTC (permalink / raw)
  To: Luca.Vizzarro
  Cc: dmarx, Paul.Szczepanek, abailey, mmahajan, thomas.wilks, dev,
	Patrick Robb

The node class contains a _configure_hugepages method to be called
on the sut node if the user has specified a hugepages config value
in their nodes configuration. However, the commit referenced below
removed the code path to this function, making it unreachable. If
the user has configured hugepages already via kernel parameters
this is harmless, but if they haven't, this bug will cause the DTS
execution to fail. This commit adds a call to configure_hugepages
in the testrun setup, and necessarily makes configure_hugepages a
public method.

Fixes: d77a4a27bd24 ("dts: remove node distinction")

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 dts/framework/test_run.py           | 1 +
 dts/framework/testbed_model/node.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index 4355aeeb4b..5f4fc0d2bb 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -338,6 +338,7 @@ def next(self) -> State | None:
         test_run.init_random_seed()
         test_run.remaining_tests = deque(test_run.selected_tests)
 
+        test_run.ctx.sut_node.setup_hugepages()
         test_run.ctx.sut_node.setup()
         test_run.ctx.tg_node.setup()
         test_run.ctx.dpdk.setup()
diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py
index e6737cd173..dbe8daa68b 100644
--- a/dts/framework/testbed_model/node.py
+++ b/dts/framework/testbed_model/node.py
@@ -166,7 +166,7 @@ def compiler_version(self, value: str) -> None:
         """
         self._compiler_version = value
 
-    def _setup_hugepages(self) -> None:
+    def setup_hugepages(self) -> None:
         """Setup hugepages on the node.
 
         Configure the hugepages only if they're specified in the node's test run configuration.
-- 
2.49.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-25 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-25 20:05 [PATCH] dts: call hugepages configure at testrun setup Patrick Robb

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).