mirror-linux/tools
Jakub Kicinski 32b70e6203 selftests: tc_actions: don't dump 2MB of \0 to stdout
Since we started running selftests in NIPA we have been seeing
tc_actions.sh generate a soft lockup warning on ~20% of the runs.
On the pre-netdev foundation setup it was actually a missed irq
splat from the console. Now it's either that or a lockup.

I initially suspected a socket locking issue since the test
is exercising local loopback with act_mirred.
After hours of staring at this I noticed in strace that ncat
when -o $file is specified _both_ saves the output to the file
and still prints it to stdout. Because the file being sent
is constructed with:

  dd conv=sparse status=none if=/dev/zero bs=1M count=2 of=$mirred
                                ^^^^^^^^^

the data printed is all \0. Most terminals don't display nul
characters (and neither does vng output capture save them).
But QEMU's serial console still has to poke them thru which
is very slow and causes the lockup (if the file is >600kB).

Replace the '-o $file' with '> $file'. This speeds the test up
from 2m20s to 18s on debug kernels, and prevents the warnings.

Fixes: ca22da2fbd ("act_mirred: use the backlog for nested calls to mirred ingress")
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260214035159.2119699-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-02-17 17:13:07 -08:00
..
accounting
arch - The usual set of cleanups and simplifications all over the tree 2026-02-10 18:43:03 -08:00
bootconfig
bpf resolve_btfids: Refactor the sort_btf_by_name function 2026-02-04 10:17:19 -08:00
build
certs
cgroup
counter
crypto
debugging
dma
docs tools: sphinx-build-wrapper: improve its help message 2026-02-02 09:57:46 -07:00
firewire
firmware
gpio
hv
iio
include Updates for the VDSO subsystem: 2026-02-10 17:02:23 -08:00
kvm/kvm_stat
laptop
leds
lib bpf-next-7.0 2026-02-10 11:26:21 -08:00
memory-model
mm
net tools: ynltool: add qstats analysis for HW-GRO efficiency / savings 2026-02-09 21:08:32 -08:00
objtool - A nice cleanup to the paravirt code containing a unification of the paravirt 2026-02-10 19:01:45 -08:00
pcmcia
perf Kbuild/Kconfig updates for 7.0 2026-02-11 13:40:35 -08:00
power cpupower: make systemd unit installation optional 2026-01-16 13:41:26 -07:00
rcu
sched
sched_ext sched_ext: Changes for v6.20 2026-02-11 13:35:24 -08:00
scripts
sound
spi spi: tools: Add include folder to .gitignore 2026-02-09 12:27:31 +00:00
testing selftests: tc_actions: don't dump 2MB of \0 to stdout 2026-02-17 17:13:07 -08:00
thermal
time
tracing
usb
verification
virtio
wmi
workqueue
writeback
Makefile