Looks good to me, thanks for finding this issue. And, since we do need the
'enable' strings to be templated in right, I am asking Dean to re-run this
testsuite with your patch applied.

Thomas, I gather this series will not be applied/go through next-dts since
it is not primarily a DTS series, but please let me know if it should. I am
asking you since I see it is delegated to you on Patchwork.

Reviewed-by: Patrick Robb <[email protected]>

On Thu, Jan 15, 2026 at 6:02 PM Lukas Sismis <[email protected]> wrote:

> The f-string syntax was missing the 'f' prefix, causing
> string interpolation to fail.
>
> Fixes: cfd851f264 ("dts: add QinQ strip and VLAN extend to testpmd shell")
> Cc: [email protected]
>
> Signed-off-by: Lukas Sismis <[email protected]>
> ---
>  dts/api/testpmd/__init__.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/dts/api/testpmd/__init__.py b/dts/api/testpmd/__init__.py
> index a20dedc25a..703cae487e 100644
> --- a/dts/api/testpmd/__init__.py
> +++ b/dts/api/testpmd/__init__.py
> @@ -227,7 +227,7 @@ def start_tx_first(self, burst_num: int, verify: bool
> = True) -> None:
>              InteractiveCommandExecutionError: If `verify` is :data:`True`
> and forwarding fails to
>                  start or ports fail to come up.
>          """
> -        self.send_command(f"start tx_first {burst_num if burst_num is not
> None else ""}")
> +        self.send_command(f"start tx_first {burst_num if burst_num is not
> None else ''}")
>          if verify:
>              # If forwarding was already started, sending "start" again
> should tell us
>              start_cmd_output = self.send_command("start")
> @@ -898,11 +898,11 @@ def set_qinq_strip(self, port: int, enable: bool,
> verify: bool = True) -> None:
>              vlan_settings = self.show_port_info(port_id=port).vlan_offload
>              if enable ^ (vlan_settings is not None and
> VLANOffloadFlag.QINQ_STRIP in vlan_settings):
>                  self._logger.debug(
> -                    f"Failed to {"enable" if enable else "disable"}"
> +                    f"Failed to {'enable' if enable else 'disable'}"
>                      f"QinQ strip on port {port}: \n{qinq_cmd_output}"
>                  )
>                  raise InteractiveCommandExecutionError(
> -                    f"Failed to {"enable" if enable else "disable"} QinQ
> strip on port {port}"
> +                    f"Failed to {'enable' if enable else 'disable'} QinQ
> strip on port {port}"
>                  )
>
>      def set_mac_address(self, port: int, mac_address: str, verify: bool =
> True) -> None:
> @@ -1535,7 +1535,7 @@ def set_port_mbuf_fast_free(
>              InteractiveCommandExecutionError: If mbuf_fast_free could not
> be set successfully.
>          """
>          mbuf_output = self.send_command(
> -            f"port config {port_id} tx_offload mbuf_fast_free {"on" if on
> else "off"}"
> +            f"port config {port_id} tx_offload mbuf_fast_free {'on' if on
> else 'off'}"
>          )
>
>          if verify and "Error" in mbuf_output:
> --
> 2.43.7
>
>

Reply via email to