Re: [PATCH] selftests: netfilter: fix missing echo in nft_nat_zones.sh
From: Florian Westphal
Date: Tue Nov 24 2026 - 06:48:57 EST
@netdev maintainers:
feel free to take this one directly.
Zhiqi Zhang <zhiqizhangg@xxxxxxxxx> wrote:
> The ping failure path tries to execute the failure message as a command
> because the echo command is missing. This reports a confusing "command not
> found" error and returns 127 from that command instead of printing the
> intended diagnostic.
>
> Add the missing echo so the ping failure is reported consistently with the
> other failure paths in the script.
>
> I found this bug manually. OpenAI Codex generated the one-line code
> change. I wrote the reproducer/test case, reviewed the generated change,
> and tested the patch.
>
> Fixes: d6905f088d2b ("selftests: netfilter: nft_nat_zones.sh: shellcheck cleanups")
> Signed-off-by: Zhiqi Zhang <zhiqizhangg@xxxxxxxxx>
> ---
> tools/testing/selftests/net/netfilter/nft_nat_zones.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/netfilter/nft_nat_zones.sh b/tools/testing/selftests/net/netfilter/nft_nat_zones.sh
> index d935c967dd..f15bfd3373 100755
> --- a/tools/testing/selftests/net/netfilter/nft_nat_zones.sh
> +++ b/tools/testing/selftests/net/netfilter/nft_nat_zones.sh
> @@ -171,7 +171,7 @@ done
>
> wait || ret=1
>
> -[ "$ret" -ne 0 ] && "FAIL: Ping failure from $cl" 1>&2
> +[ "$ret" -ne 0 ] && echo "FAIL: Ping failure from $cl" 1>&2
Acked-by: Florian Westphal <fw@xxxxxxxxx>