Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Fernando Fernandez Mancera <fmancera@suse.de>,
	netdev@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	horms@kernel.org, pabeni@redhat.com, edumazet@google.com,
	 dsahern@kernel.org, davem@davemloft.net
Subject: Re: [PATCH 2/2 net v4] selftests: fib_tests: add temporary IPv6 address renewal test
Date: Tue, 12 May 2026 01:08:15 -0700	[thread overview]
Message-ID: <agLenteVpazkwn0j@gmail.com> (raw)
In-Reply-To: <20260511170848.756e9347@kernel.org>

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>

  reply	other threads:[~2026-05-12  8:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 12:26 [PATCH 1/2 net v4] ipv6: addrconf: fix temp address generation after prefix deprecation Fernando Fernandez Mancera
2026-05-11 12:26 ` [PATCH 2/2 net v4] selftests: fib_tests: add temporary IPv6 address renewal test Fernando Fernandez Mancera
2026-05-11 17:01   ` Breno Leitao
2026-05-12  0:08     ` Jakub Kicinski
2026-05-12  8:08       ` Breno Leitao [this message]
2026-05-12 18:24 ` [PATCH 1/2 net v4] ipv6: addrconf: fix temp address generation after prefix deprecation Fernando Fernandez Mancera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agLenteVpazkwn0j@gmail.com \
    --to=leitao@debian.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=fmancera@suse.de \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox