I think there is a missing check for if ports is None (user is not providing ports, trying to only run NO_LINKS tests).
Currently, users must modprobe vfio-pci before running DTS when using a
non-mellanox NIC. This patch automates the process on test run start up.
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
dts/framework/test_run.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index ff0a12c9ce..38f9e6c07d 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -347,6 +347,10 @@ def next(self) -> State | None:
test_run.ctx.dpdk.setup()
test_run.ctx.topology.setup()
+ if test_run.ctx.sut_node.ports[0].config.os_driver_for_dpdk == "vfio-pci":
+ test_run.ctx.sut_node.main_session.send_command("modprobe vfio")
+ test_run.ctx.sut_node.main_session.send_command("modprobe vfio-pci")
+
if test_run.config.use_virtual_functions:
test_run.ctx.topology.instantiate_vf_ports()
--
2.50.1