* [PATCH v2 0/1] selftests: net: fix file owner for broadcast_ether_dst test
@ 2026-06-17 6:10 Ross Porter
2026-06-17 6:10 ` [PATCH v2 1/1] " Ross Porter
2026-06-19 1:30 ` [PATCH v2 0/1] " patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ross Porter @ 2026-06-17 6:10 UTC (permalink / raw)
To: linux-kselftest, netdev
Cc: ross.porter, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Shuah Khan, Oscar Maes,
Brett A C Sheffield, linux-kernel
The broadcast_ether_dst test can spuriously fail due to file
permissions, depending on which flags tcpdump is compiled with: If
tcpdump is compiled with the `--with-user` flag then tcpdump will
step down to the provided user after opening the device. In this
case the test fails due to permission issues, as the output file
is owned by a different user.
Debian ships tcpdump with this flag enabled, so this bug
appears as part of our kernel testing.
To fix this, we can ensure tcpdump remains as root (regardless of
whether it was compiled with `--with-user`) by passing the `-Z root`
argument when invoking it.
Changes in v2:
* Moved '-Z root' before filter expression for POSIX compliance
Link to v1:
https://lore.kernel.org/all/20260610062230.71573-1-ross.porter@canonical.com/
Ross Porter (1):
selftests: net: fix file owner for broadcast_ether_dst test
tools/testing/selftests/net/broadcast_ether_dst.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] selftests: net: fix file owner for broadcast_ether_dst test
2026-06-17 6:10 [PATCH v2 0/1] selftests: net: fix file owner for broadcast_ether_dst test Ross Porter
@ 2026-06-17 6:10 ` Ross Porter
2026-06-19 1:30 ` [PATCH v2 0/1] " patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Ross Porter @ 2026-06-17 6:10 UTC (permalink / raw)
To: linux-kselftest, netdev
Cc: ross.porter, stable, Edoardo Canepa, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
Shuah Khan, Brett A C Sheffield, Oscar Maes, linux-kernel
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>
---
tools/testing/selftests/net/broadcast_ether_dst.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/broadcast_ether_dst.sh b/tools/testing/selftests/net/broadcast_ether_dst.sh
index 334a7eca8a80..5e7a8fe23c7a 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}"
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 0/1] selftests: net: fix file owner for broadcast_ether_dst test
2026-06-17 6:10 [PATCH v2 0/1] selftests: net: fix file owner for broadcast_ether_dst test Ross Porter
2026-06-17 6:10 ` [PATCH v2 1/1] " Ross Porter
@ 2026-06-19 1:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-19 1:30 UTC (permalink / raw)
To: Ross Porter
Cc: linux-kselftest, netdev, davem, edumazet, kuba, pabeni, horms,
shuah, oscmaes92, bacs, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 17 Jun 2026 18:10:38 +1200 you wrote:
> The broadcast_ether_dst test can spuriously fail due to file
> permissions, depending on which flags tcpdump is compiled with: If
> tcpdump is compiled with the `--with-user` flag then tcpdump will
> step down to the provided user after opening the device. In this
> case the test fails due to permission issues, as the output file
> is owned by a different user.
> Debian ships tcpdump with this flag enabled, so this bug
> appears as part of our kernel testing.
>
> [...]
Here is the summary with links:
- [v2,1/1] selftests: net: fix file owner for broadcast_ether_dst test
https://git.kernel.org/netdev/net/c/b8613e979200
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-19 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 6:10 [PATCH v2 0/1] selftests: net: fix file owner for broadcast_ether_dst test Ross Porter
2026-06-17 6:10 ` [PATCH v2 1/1] " Ross Porter
2026-06-19 1:30 ` [PATCH v2 0/1] " patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox