On Wed, Jul 02, 2025 at 10:28:04AM +0200, Maxime Chevallier wrote:
> old_netdevs is unused in ethtool-common.sh. Only the UDP tunnels test
> uses that variable, but it maintains it locally.
> 
> Signed-off-by: Maxime Chevallier <[email protected]>
> ---

The story seems to be told by commits
fbb8531e58bd ("selftests: extract common functions in ethtool-common.sh") and
9e48ee80ac4e ("selftests: refactor get_netdev_name function").

make_netdev() returns the name of the newly created netdevsim interface.
It used to be implemented by comparing the "before" and "after" of
"ls /sys/class/net". But the name can instead be retrieved from 
/sys/bus/netdevsim,
and "ls /sys/class/net" is a left-over that was never fully cleaned up.

Meanwhile, udp_tunnel_nic.sh still uses the old and racy method of
finding the netdevsim name, based on the before/after comparison.
It seems like a case of not converging the entire netdevsim test suite
towards the same solution: ethtool-common.sh modified the logic in Nov
2020, udp_tunnel_nic.sh had the logic since Jul 2020.

Reply via email to