summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Porter <ross.porter@canonical.com>2026-06-17 18:10:39 +1200
committerJakub Kicinski <kuba@kernel.org>2026-06-18 18:22:30 -0700
commitb8613e9792002add3bf77122868cc06ce142e953 (patch)
treedae566268aa49bb013a81a43955c87ac4380aa5e
parent0ec4b785987049031db437ef9d5bb962706b69bb (diff)
selftests: net: fix file owner for broadcast_ether_dst test
Ensure the output file is always owned by root (even if tcpdump was compiled with `--with-user`), by passing the `-Z root` argument when invoking it. Cc: stable@vger.kernel.org Reported-by: Edoardo Canepa <edoardo.canepa@canonical.com> Closes: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2129815 Fixes: bf59028ea8d4 ("selftests: net: add test for destination in broadcast packets") Suggested-by: Edoardo Canepa <edoardo.canepa@canonical.com> Tested-by: Ross Porter <ross.porter@canonical.com> Signed-off-by: Ross Porter <ross.porter@canonical.com> Link: https://patch.msgid.link/20260617061039.79717-2-ross.porter@canonical.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rwxr-xr-xtools/testing/selftests/net/broadcast_ether_dst.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/broadcast_ether_dst.sh b/tools/testing/selftests/net/broadcast_ether_dst.sh
index 334a7eca8a80..cc571f607429 100755
--- a/tools/testing/selftests/net/broadcast_ether_dst.sh
+++ b/tools/testing/selftests/net/broadcast_ether_dst.sh
@@ -44,7 +44,7 @@ test_broadcast_ether_dst() {
# tcpdump will exit after receiving a single packet
# timeout will kill tcpdump if it is still running after 2s
timeout 2s ip netns exec "${CLIENT_NS}" \
- tcpdump -i link0 -c 1 -w "${CAPFILE}" icmp &> "${OUTPUT}" &
+ tcpdump -i link0 -c 1 -w "${CAPFILE}" -Z root icmp &> "${OUTPUT}" &
pid=$!
slowwait 1 grep -qs "listening" "${OUTPUT}"