Reviewed-by: Nicholas Pratte <npra...@iol.unh.edu>
On Thu, Oct 10, 2024 at 2:42 PM Dean Marx <dm...@iol.unh.edu> wrote: > > Fix optional verify argument in set_forward_mode > method in testpmd shell class. > > Bugzilla ID: 1410 > Fixes: fc0f7dc47ee3 ("dts: add testpmd shell params") > > 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 dc1bef431d..c43b8b7520 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -1567,11 +1567,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 stop_all_ports(self, verify: bool = True) -> None: > """Stops all the ports. > -- > 2.44.0 >