Re: [PATCH net-next v4 00/10] selftests: drivers: bash support for remote traffic generators

Ioana Ciornei
2026-03-27T07:32:53Z

On Thu, Mar 26, 2026 at 12:03:42PM -0700, Jakub Kicinski wrote:
> On Thu, 26 Mar 2026 15:28:18 +0200 Ioana Ciornei wrote:
> > This patch set aims to add the necessary support so that bash written
> > selftests are also able to easily run with a remote traffic generator
> > system, either be it in another netns or one accessible through ssh.
> >
> > This patch set is a result of the discussion from v1:
> > https://lore.kernel.org/all/20260303084330.340b6459@kernel.org/
> > Even though the python infrastructure is already established, some
> > things are easier in bash and it would be a shame to leave behind the
> > bash tests that we already have.
>
> I think this introduces a bunch of regressions, eg:
>
> https://netdev-ctrl.bots.linux.dev/logs/vmksft/forwarding/results/575622/4-local-termination-sh/stdout
>
> https://netdev-ctrl.bots.linux.dev/logs/vmksft/netdevsim/results/575802/18-netcons-resume-sh/stdout

I cannot reproduce this unfortunately. For example, local_termination.sh
gives me the following result with the exact patches that I submitted.
Any idea on what might be the difference?

root@localhost:~/ksft-net-drv# ./run_kselftest.sh -t net/forwarding:local_termination.sh
[71318.022491] kselftest: Running tests in net/forwarding
TAP version 13
1..1
# timeout set to 0
# selftests: net/forwarding: local_termination.sh
# TEST: veth1: Unicast IPv4 to primary MAC address [ OK ]
# TEST: veth1: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: veth1: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: veth1: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: veth1: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: veth1: Multicast IPv4 to joined group [ OK ]
# TEST: veth1: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: veth1: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: veth1: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: veth1: Multicast IPv6 to joined group [ OK ]
# TEST: veth1: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: veth1: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: veth1: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: veth1: Link-local STP BPDU [ OK ]
# TEST: veth1: Link-local LLDP [ OK ]
# TEST: veth1: 1588v2 over L2 transport, Sync [ OK ]
# TEST: veth1: 1588v2 over L2 transport, Follow-Up [ OK ]
# TEST: veth1: 1588v2 over L2 transport, Peer Delay Request [ OK ]
# TEST: veth1: 1588v2 over IPv4, Sync [ OK ]
# TEST: veth1: 1588v2 over IPv4, Follow-Up [ OK ]
# TEST: veth1: 1588v2 over IPv4, Peer Delay Request [ OK ]
# TEST: veth1: 1588v2 over IPv6, Sync [ OK ]
# TEST: veth1: 1588v2 over IPv6, Follow-Up [ OK ]
# TEST: veth1: 1588v2 over IPv6, Peer Delay Request [ OK ]
# TEST: vlan_filtering=0 bridge: Unicast IPv4 to primary MAC address [ OK ]
# TEST: vlan_filtering=0 bridge: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv4 to joined group [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: vlan_filtering=0 bridge: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv6 to joined group [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: vlan_filtering=0 bridge: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: vlan_filtering=0 bridge: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: vlan_filtering=0 bridge: Link-local STP BPDU [ OK ]
# TEST: vlan_filtering=1 bridge: Unicast IPv4 to primary MAC address [ OK ]
# TEST: vlan_filtering=1 bridge: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv4 to joined group [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: vlan_filtering=1 bridge: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv6 to joined group [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: vlan_filtering=1 bridge: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: vlan_filtering=1 bridge: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: vlan_filtering=1 bridge: Link-local STP BPDU [ OK ]
# TEST: VLAN upper: Unicast IPv4 to primary MAC address [ OK ]
# TEST: VLAN upper: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: VLAN upper: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: VLAN upper: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: VLAN upper: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: VLAN upper: Multicast IPv4 to joined group [ OK ]
# TEST: VLAN upper: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN upper: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: VLAN upper: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: VLAN upper: Multicast IPv6 to joined group [ OK ]
# TEST: VLAN upper: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN upper: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: VLAN upper: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: VLAN upper: Link-local STP BPDU [ OK ]
# TEST: VLAN upper: Link-local LLDP [ OK ]
# TEST: VLAN upper: 1588v2 over L2 transport, Sync [ OK ]
# TEST: VLAN upper: 1588v2 over L2 transport, Follow-Up [ OK ]
# TEST: VLAN upper: 1588v2 over L2 transport, Peer Delay Request [ OK ]
# TEST: VLAN upper: 1588v2 over IPv4, Sync [ OK ]
# TEST: VLAN upper: 1588v2 over IPv4, Follow-Up [ OK ]
# TEST: VLAN upper: 1588v2 over IPv4, Peer Delay Request [ OK ]
# TEST: VLAN upper: 1588v2 over IPv6, Sync [ OK ]
# TEST: VLAN upper: 1588v2 over IPv6, Follow-Up [ OK ]
# TEST: VLAN upper: 1588v2 over IPv6, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Unicast IPv4 to primary MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv4 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv6 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Link-local STP BPDU [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: Link-local LLDP [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over L2 transport, Sync [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over L2 transport, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over L2 transport, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv4, Sync [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv4, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv4, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv6, Sync [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv6, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=0 bridged port: 1588v2 over IPv6, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Unicast IPv4 to primary MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv4 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv6 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Link-local STP BPDU [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: Link-local LLDP [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over L2 transport, Sync [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over L2 transport, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over L2 transport, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv4, Sync [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv4, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv4, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv6, Sync [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv6, Follow-Up [ OK ]
# TEST: VLAN over vlan_filtering=1 bridged port: 1588v2 over IPv6, Peer Delay Request [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Unicast IPv4 to primary MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv4 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv6 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=0 bridge: Link-local STP BPDU [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Unicast IPv4 to primary MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Unicast IPv4 to macvlan MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Unicast IPv4 to unknown MAC address, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv4 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv4 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv4 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv4 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv6 to joined group [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv6 to unknown group [XFAIL]
# reception succeeded, but should have failed
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv6 to unknown group, promisc [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Multicast IPv6 to unknown group, allmulti [ OK ]
# TEST: VLAN over vlan_filtering=1 bridge: Link-local STP BPDU [ OK ]
ok 1 selftests: net/forwarding: local_termination.sh
root@localhost:~/ksft-net-drv# cat VERSION
v7.0-rc3-1494-g8122e23405fc

root@localhost:~/git/linux# git log --oneline -11
8122e23405fc (HEAD -> 2026-03-04-net-selftests) selftests: drivers: hw: add test for the ethtool standard counters
120c98910361 selftests: drivers: hw: update ethtool_rmon to work with a single local interface
67eea516922b selftests: drivers: hw: move to KTAP output
4dc0de1901c8 selftests: drivers: hw: replace counter upper limit with UINT32_MAX in rmon test
adf6caeb2d0b selftests: drivers: hw: test rmon counters only on first interface
1ef526c90f90 selftests: drivers: hw: cleanup shellcheck warnings in the rmon test
a5a27ccb4231 selftests: net: update some helpers to use run_on
ca2fe56c8938 selftests: net: extend lib.sh to parse drivers/net/net.config
dc88ab221117 selftests: net: add helpers for running a command on other targets
8bc9c8a32701 selftests: forwarding: extend ethtool_std_stats_get with pause statistics
b08a76290c4e Merge branch 'net-dpaa2-mac-export-standard-statistics'