Re: [PATCH net] selftests: netdevsim: Fix ethtool-features.sh fail

Andrew Lunn
2025-11-03T13:36:09Z

On Mon, Nov 03, 2025 at 11:13:08AM +0100, Sabrina Dubroca wrote:
> 2025-10-30, 17:02:17 -0700, Jakub Kicinski wrote:
> > On Fri, 31 Oct 2025 00:13:59 +0100 Sabrina Dubroca wrote:
> > > > set -o pipefail
> > > >
> > > > +if ! ethtool --json -k $NSIM_NETDEV > /dev/null 2>&1; then
> > >
> > > I guess it's improving the situation, but I've got a system with an
> > > ethtool that accepts the --json argument, but silently ignores it for
> > > -k (ie `ethtool --json -k $DEV` succeeds but doesn't produce a json
> > > output), which will still cause the test to fail later.
> >
> > And --json was added to -k in Jan 2022, that's pretty long ago.
> > I'm not sure we need this aspect of the patch at all..
>
> Ok. Then maybe a silly idea: for the tests that currently have some
> form of "$TOOL is too old" check, do we want to remove those after a
> while? If so, how long after the feature was introduced in $TOOL?

Another option is to turn them into a hard fail, after X years. My
guess is, tests which get skipped because the test tools are too old
frequently get ignored. Tests which fail are more likely to be looked
at, and the tools updated.

Another idea is have a dedicated test which simply tests the versions
of all the tools. And it should only pass if the installed tools are
sufficiently new that all test can pass. If you have tools which are
in the grey zone between too old to cause skips, but not old enough to
cause fails, you then just have one failing test you need to turn a
blind eye to.

Andrew