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

From: Breno Leitao <[email-masked]>
Date: Tue, 12 May 2026 01:08:15 -0700

On Mon, May 11, 2026 at 05:08:48PM -0700, Jakub Kicinski wrote:
> On Mon, 11 May 2026 10:01:00 -0700 Breno Leitao wrote:
> > Should you check for ra6 before the "setup" above?
>
> Not really. AI bots love to complain about this. But "ra6 command
> not found" is as good of a message as the explicit skip, honestly.

Right, but why call setup() before checking if ra6 is available?

Running setup() performs unnecessary work if the test will be skipped anyway.
It would be cleaner to:

1) Check for required tools (ra6) and skip early if missing
2) Run setup() to create namespace and configure the environment
3) Proceed with the test

Rather than:

1) Run setup() to configure namespace and network interfaces
2) Check for tool availability
3) Clean up when tools are missing

If you look at netcons_basic.sh for instance, it has the following
lines, which seems saner:

	# Check for basic system dependency and exit if not found
	check_for_dependencies

	# Remove the namespace, interfaces and netconsole target on exit
	trap cleanup EXIT

	<Do the test>