On Thu, Sep 17, 2026 at 04:55 AM Eva Kurchatova <[email protected]> 
wrote:
> The test creates its devices in the namespace it is started in and binds
> an IPv6 socket to talk between the two ends. Both are unnecessary
> demands on the host it runs on.
>
> The device name is fixed, v1, so a host that already has a device by
> that name cannot run the test at all. The IPv6 control socket depends on
> the host's firewall rules, and where those reject ICMPv6 or the port the
> test picks, the two ends never meet:
>
>   Failed connecting to the Device Under Test control socket
>
> Cleanup is trapped for signals only, not for a normal exit, so a run
> that fails leaves both the device and the namespace behind. Every later
> run then stops in setup, before it prints anything.

This script is not run by BPF CI and it's in the middle of being
reworked and moved to tools/testing/selftests/drivers/net/hw/ via
net-next, see Bochao's "Track test_xdp_features DUT processe
s" and
Daniel's replies there:
https://lore.kernel.org/bpf/20260904-xdp-dut-process-lifecycle-gmail-v3-1-5b7eee4f7...@gmail.com/
https://lore.kernel.org/bpf/[email protected]/
That patch already switches to trap cleanup EXIT and tracks the DUT
pid, and this one conflicts with it. Pls sync with Bochao and netdev
folks and, if the netns part is still wanted, send it against net-next
on top of that work.

Also patch 2 has nothing to do with this one. Don't send unrelated
patches as a series, and use a proper subject prefix
(see Documentation/bpf/bpf_devel_QA.rst).

> Re-exec in a new network namespace, where the device name is free and no
> rule of the host applies, and everything the test made goes away with
> the namespace when it exits.

That last part isn't true in the failure case you describe. unshare -n
doesn't give a new mount namespace, so 'ip netns add ${NS}' in setup()
still creates /var/run/netns/${NS} on the host and nothing
 deletes it.
And when the tester fails to connect, set -e exits the script while
the background './xdp_features ... v1 &' is still blocked in accept()
in dut_run(). That orphan keeps the unshared netns alive, so v1, v0,
${NS} and a stray xdp_features process are all left behind on every
failed run. They just don't collide with the next run anymore.
trap cleanup EXIT is what fixes the leftovers, with or without unshare.

pw-bot: cr

Reply via email to