On Tue, Sep 29, 2026 at 09:57:01AM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <[email protected]>
> 
> fib_tests mixes use of $ret for both per-test return value and global exit
> code. If an earlier subtest fails and a later function sets ret=0, the
> script will exit with status 0 even though [FAIL] lines were printed.
> 
> Use RET as the per-test return value, as already defined in lib.sh. The
> exit code ret will only be set in log_test().
> 
> Fixes: 607bd2e502f5 ("selftests: fib_tests: Add test cases for IPv4/IPv6 FIB")
> Reported-by: Sashiko <[email protected]>
> Closes: 
> https://lore.kernel.org/all/[email protected]
> Signed-off-by: Hangbin Liu <[email protected]>

Please target the patch at net-next and drop the Fixes tag. The patch
doesn't fix a regression, nothing is failing (or passing when it
shouldn't) because of it and it cannot be backported cleanly to old
kernels anyway. I targeted similar patches at net-next in the past. See
[1], for example.

[1] https://lore.kernel.org/all/[email protected]/

> ---
>  tools/testing/selftests/net/fib_tests.sh | 40 
> ++++++++++++++++----------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/fib_tests.sh 
> b/tools/testing/selftests/net/fib_tests.sh
> index b338bfb196a2..9ce5623b049c 100755
> --- a/tools/testing/selftests/net/fib_tests.sh
> +++ b/tools/testing/selftests/net/fib_tests.sh
> @@ -369,7 +369,7 @@ fib_carrier_local_test()
>  
>  fib_carrier_unicast_test()
>  {
> -     ret=0
> +     RET=0

Looks like this line can be removed (similar to fib_carrier_local_test()
above it) given that RET is never used in this function

>  
>       echo
>       echo "Single path route carrier test"

Reply via email to