Subject: Re: [PATCH 2/2 net v4] selftests: fib_tests: add temporary IPv6 address renewal test

From: Breno Leitao <[email-masked]>
Date: Mon, 11 May 2026 10:01:00 -0700

On Mon, May 11, 2026 at 02:26:46PM +0200, Fernando Fernandez Mancera wrote:
> Add a test to check that temporary IPv6 address is regenerated properly
> after the base prefix is deprecated and restored.
> 
> Fib6 temporary address renewal test
>     TEST: IPv6 temporary address cleanly deprecated and regenerated     [ OK ]
> 
> Signed-off-by: Fernando Fernandez Mancera <[email-masked]>
> ---
> v2: adjusted the sleep so there is enough time for the issue to trigger,
> added cleanup at the end
> v3: no changes
> v4: no changes
> ---
>  tools/testing/selftests/net/fib_tests.sh | 59 +++++++++++++++++++++++-
>  1 file changed, 58 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
> index af64f93bb2e1..8f10de0eb985 100755
> --- a/tools/testing/selftests/net/fib_tests.sh
> +++ b/tools/testing/selftests/net/fib_tests.sh
> @@ -12,7 +12,7 @@ TESTS="unregister down carrier nexthop suppress ipv6_notify ipv4_notify \
>         ipv4_route_metrics ipv4_route_v6_gw rp_filter ipv4_del_addr \
>         ipv6_del_addr ipv4_mangle ipv6_mangle ipv4_bcast_neigh fib6_gc_test \
>         ipv4_mpath_list ipv6_mpath_list ipv4_mpath_balance ipv6_mpath_balance \
> -       ipv4_mpath_balance_preferred fib6_ra_to_static"
> +       ipv4_mpath_balance_preferred fib6_ra_to_static fib6_temp_addr_renewal"
>  
>  VERBOSE=0
>  PAUSE_ON_FAIL=no
> @@ -1611,6 +1611,62 @@ fib6_ra_to_static()
>  	cleanup &> /dev/null
>  }
>  
> +fib6_temp_addr_renewal() {
> +	setup
> +
> +	echo
> +	echo "Fib6 temporary address renewal test"
> +	set -e
> +
> +	# ra6 is required for the test. (ipv6toolkit)
> +	if [ ! -x "$(command -v ra6)" ]; then
> +	    echo "SKIP: ra6 not found."
> +	    set +e
> +	    cleanup &> /dev/null
> +	    return
> +	fi

Should you check for ra6 before the "setup" above?

Also, kselftest convention is to exit with $ksft_skip (4) rather than just
return so that the framework reports SKIP rather than PASS with 0 tests.

A bare return here will make the test silently disappear from CI on hosts
without ipv6toolkit.