Re: [PATCH net-next 1/3] selftests: drv-net: Introduce a selftest for ethtool flow control
From: Jakub Kicinski
Date: Tue Sep 22 2026 - 22:49:34 EST
On Sun, 20 Sep 2026 18:47:27 +0200 Maxime Chevallier (Netdev
Foundation) wrote:
> Future ethtool selftests are expected to use the same, these helpers
> are put in the net selftest lib.
Please resist the urge to create libraries.
If you're doing this I suspect you didn't even read the README and
you expect people to search around for libraries?
Put the code in your test, the duplication doesn't matter.
If you _absolutely have to_ you can create a local lib under
tools/testing/selftests/drivers/net/hw/ but please think really
hard before you do.
> + :param cfg: test config
If you have nothing to say - don't say anything 🤷️
> + :returns: tuple containing :
> + - return code of the ethtool command,
> + - rx status,
> + - tx status,
> + - aneg status
Have you seen much code in netdev selftests using this style
of comments?
> + defer(cmd, f"ethtool -s {cfg.ifname} autoneg on", fail=False)
Why are you putting fail=False on the defers? IIRC defer errors are
logged and ignored. Is ethtool reporting an error when there's nothing
to change?
Those are just some things that immediately jump out :)
Please also fix the pylint --disable=R issues?