Re: [PATCH bpf-next v2] selftests/bpf: Track test_xdp_features DUT processes
From: bot+bpf-ci@kernel.org
Date: 2026-08-12 09:23:10
Also in:
bpf, linux-kselftest, lkml
quoted hunk ↗ jump to hunk
diff --git a/tools/testing/selftests/bpf/test_xdp_features.sh b/tools/testing/selftests/bpf/test_xdp_features.sh index 0aa71c4455c0..35ce0d4e2418 100755 --- a/tools/testing/selftests/bpf/test_xdp_features.sh +++ b/tools/testing/selftests/bpf/test_xdp_features.sh
[ ... ]
+terminate_dut_server() {
+ [ -z "$dut_pid" ] && return
+
+ # Use the shell job instead of a PID which may have been reused.
+ if [ "$(jobs -pr %% 2> /dev/null)" = "$dut_pid" ]; then
+ kill -KILL %% 2> /dev/null || true
+ fi
+
+ wait "$dut_pid" 2> /dev/null || true
+ dut_pid=""
+}
+
cleanup() {
- ip link del v1 2> /dev/null
- ip netns del ${NS} 2> /dev/null
- [ "$(pidof xdp_features)" = "" ] || kill $(pidof xdp_features) 2> /dev/null
+ terminate_dut_server
+ ip link del v1 2> /dev/null || true
+ ip netns del "${NS}" 2> /dev/null || true
}Jiayuan Chen asked about removing the pidof dependency in v1: "It looks like part of the motivation here is dropping the pidof dependency? I don't think that's worth optimizing. Selftests already require a bunch of tools from non-essential packages (ip, ss and ethtool in this very script)". Does the removal of pidof serve another purpose beyond reducing dependencies, such as fixing the concurrent test interference described in the commit message? If the primary goal is fixing the race condition rather than removing a dependency, it might be worth clarifying the motivation. --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/31579454720