From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Breno Leitao <leitao@debian.org>, Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH net-next] selftests: net: Skip test if IPv6 is not configured
Date: Fri, 25 Jul 2025 16:47:54 -0400 [thread overview]
Message-ID: <6883ed7aed06f_3f184b294c5@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <eutsqoc6f7xcaez2ttuce4uqtfvs3hyit6dradikvfcgxdev75@3senqada4nzn>
Breno Leitao wrote:
> Hello Jakub,
>
> On Thu, Jul 24, 2025 at 06:24:27PM -0700, Jakub Kicinski wrote:
> > On Wed, 23 Jul 2025 10:35:06 -0700 Breno Leitao wrote:
> > > Extend the `check_for_dependencies()` function in `lib_netcons.sh` to check
> > > whether IPv6 is enabled by verifying the existence of
> > > `/proc/net/if_inet6`. Having IPv6 is a now a dependency of netconsole
> > > tests. If the file does not exist, the script will skip the test with an
> > > appropriate message suggesting to verify if `CONFIG_IPV6` is enabled.
> > >
> > > This prevents the test to misbehave if IPv6 is not configured.
> >
> > IDK. I think this is related to some of the recent patches?
>
> Yes, commit 3dc6c76391cbe (“selftests: net: Add IPv6 support to
> netconsole basic tests”) introduced IPv6 support to the netconsole basic
> tests.
>
> Because the NIPA config enables IPv6, the tests pass in that
> environment. However, if the tests are run somewhere without IPv6
> support such as in a test I was doing regarding another patch, they will
> fail, when it should be skipped.
>
> > The context would be helpful in the commit message.
>
> Apologies for not including more context in the commit message.
>
> > Otherwise, as networking people, I think we are obligated
> > to respond with hostility to "IPv6 may not be enabled"..
>
> As for handling systems without IPv6, if IPv6 isn’t available, the
> intention is for the test to be skipped. That’s exactly what this patch
> addresses.
I think there is some consensus that these environments should no
longer exist in 2025. And test failure is the best way to accomplish
that.
Less opinionated: the tests implicitly depends on the config files
in the test directory. Do we have to start making the robust against
situations where CONFIGs in that file are missing?
> I did consider making the test adaptable so it would just run with
> whichever protocol (IPv4 or IPv6) is present, but rejected that
> approach. Allowing the test to “pass” in such cases doesn’t really
> demonstrate meaningful coverage, since the test isn’t actually being
> exercised as intended.
>
> In short, it seems more appropriate to skip the test entirely if all
> conditions aren’t met, so, you know that your .config needs adjustment.
>
> Thanks for your review,
> --breno
next prev parent reply other threads:[~2025-07-25 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 17:35 Breno Leitao
2025-07-24 20:13 ` Simon Horman
2025-07-25 1:24 ` Jakub Kicinski
2025-07-25 8:11 ` Breno Leitao
2025-07-25 20:47 ` Willem de Bruijn [this message]
2025-07-25 20:58 ` Jakub Kicinski
2025-07-25 21:11 ` Willem de Bruijn
2025-07-25 18:40 ` patchwork-bot+netdevbpf
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=6883ed7aed06f_3f184b294c5@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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
all inboxes | Powered by JetHome®