Hi Daniel, thanks for the notification On Mon Aug 24, 2026 at 1:31 PM CEST, Daniel Borkmann wrote: > [ Trimming the excessive Cc list, and adding Alexis ] > > On 8/12/26 10:28 AM, Bochao Cao via B4 Relay wrote: >> From: Bochao Cao <[email protected]> >> >> test_xdp_features.sh waits for any xdp_features listener to appear and >> uses pidof during cleanup. A concurrent test can therefore make another >> test proceed before its own DUT is ready, and cleanup kills every >> xdp_features process on the host. The readiness loop also has no timeout, >> so a DUT that exits before listening leaves the test hung indefinitely. >> >> Track one active DUT at a time, wait for ss to report that exact PID with >> a bounded retry loop, and reap it after each test. Consult the shell job >> table before signaling the DUT so a stale PID cannot target an unrelated >> process. On failure, terminate the shell job with SIGKILL and reap it so >> blocked I/O cannot hang cleanup. Install an EXIT trap and signal handlers >> so failure paths also remove network setup. >> >> Fixes: 4dba3e7852b7 ("selftests/bpf: introduce XDP compliance test tool") >> Closes: https://bugs.debian.org/1136522 >> Signed-off-by: Bochao Cao <[email protected]> >> --- >> Tests: >> - bash -n tools/testing/selftests/bpf/test_xdp_features.sh >> - make -C tools/testing/selftests/bpf xdp_features >> - sudo tools/testing/selftests/bpf/test_xdp_features.sh >> - verified cleanup terminates a blocked DUT without affecting an unrelated >> process >> --- >> Changes in v2: >> - Clarify that avoiding name-wide process matching, rather than dropping a >> dependency, is the motivation. >> - Track and reap one active DUT at a time instead of retaining historical >> PIDs. >> - Address PID reuse by signaling only the current Bash job during cleanup. >> - Use SIGKILL on failure cleanup so blocked DUT I/O cannot hang wait >> indefinitely. >> - Link to v1: >> https://patch.msgid.link/20260805-xdp-dut-process-lifecycle-gmail-v1-1-45984df8d...@gmail.com >> --- >> tools/testing/selftests/bpf/test_xdp_features.sh | 82 >> ++++++++++++++++++------ >> 1 file changed, 62 insertions(+), 20 deletions(-) > > Sorry for the late reply. With regards to https://bugs.debian.org/1136522, > src:linux deb > does not have to depend on this at all, so the src:linux can just get rid of > procps in > any case if this is indeed the last dependency. I'm not seeing the test being > run in our > BPF CI. I've Cc'ed Alexis as he's in the process of migrating and/or removing > tests from > tools/testing/selftests/bpf/ depending on how they fit into test_progs > framework. I'll > let him comment if there is already work in progress. It feels like this > script could be > reworked into tools/testing/selftests/drivers/net/hw/ tests and removed > altogether from > the tools/testing/selftests/bpf/ dir.
There has been an attempt to fully convert and get rid of test_xdp_features.sh, but discussions around the corresponding series highlighted the need for the script to remain available for testing on real hardware. Features covered by the test_xdp_features.sh that were not covered yet by test_progs have been added to test_progs (in xdp_cpumap_attach), see [1]. So there's currently no active effort on this one on my side. Alexis [1] https://lore.kernel.org/bpf/[email protected]/ -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

