On 12. 8. 2024 16:23, Dean Marx wrote:
Add optional verify argument to the set_forward_mode
method in testpmd shell.
This doesn't add the method, just fixes it's use. Don't forget to fix
the subject as well. And also add the tags that Jeremy mentioned.
Signed-off-by: Dean Marx <dm...@iol.unh.edu>
---
dts/framework/remote_session/testpmd_shell.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dts/framework/remote_session/testpmd_shell.py
b/dts/framework/remote_session/testpmd_shell.py
index 43e9f56517..b8cdfc01b9 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -717,11 +717,12 @@ def set_forward_mode(self, mode: SimpleForwardingModes,
verify: bool = True):
fails to update.
"""
set_fwd_output = self.send_command(f"set fwd {mode.value}")
- if f"Set {mode.value} packet forwarding mode" not in set_fwd_output:
- self._logger.debug(f"Failed to set fwd mode to
{mode.value}:\n{set_fwd_output}")
- raise InteractiveCommandExecutionError(
- f"Test pmd failed to set fwd mode to {mode.value}"
- )
+ if verify:
+ if f"Set {mode.value} packet forwarding mode" not in
set_fwd_output:
+ self._logger.debug(f"Failed to set fwd mode to
{mode.value}:\n{set_fwd_output}")
+ raise InteractiveCommandExecutionError(
+ f"Test pmd failed to set fwd mode to {mode.value}"
+ )
def show_port_info_all(self) -> list[TestPmdPort]:
"""Returns the information of all the ports.