Re: [PATCH v2] selftest: net: Fix error message if empty variable
From: Simon Horman
Date: Fri Sep 26 2025 - 09:00:58 EST
On Thu, Sep 25, 2025 at 03:28:23PM +0200, Alessandro Zanni wrote:
> Fix to avoid cases where the `res` shell variable is
> empty in script comparisons.
> The comparison has been modified into string comparison to
> handle other possible values the variable could assume.
>
> The issue can be reproduced with the command:
> make kselftest TARGETS=net
>
> It solves the error:
> ./tfo_passive.sh: line 98: [: -eq: unary operator expected
>
> Signed-off-by: Alessandro Zanni <alessandro.zanni87@xxxxxxxxx>
> ---
>
> Notes:
> v2: edit condition to handle strings
Thanks. This seems more robust to me.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>