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 <pr...@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

Reply via email to