Skip to content

Commit

Permalink
selftests/bpf: Fix test_lwt_seg6local.sh hangs
Browse files Browse the repository at this point in the history
OpenBSD netcat (Debian patchlevel 1.195-2) does not seem to react to
SIGINT for whatever reason, causing prefix.pl to hang after
test_lwt_seg6local.sh exits due to netcat inheriting
test_lwt_seg6local.sh's file descriptors.

Fix by using SIGTERM instead.

Signed-off-by: Ilya Leoshkevich <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
iii-i authored and Alexei Starovoitov committed Jul 21, 2020
1 parent 495436c commit 6bd5572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_lwt_seg6local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ ip netns exec ns6 sysctl net.ipv6.conf.veth10.seg6_enabled=1 > /dev/null
ip netns exec ns6 nc -l -6 -u -d 7330 > $TMP_FILE &
ip netns exec ns1 bash -c "echo 'foobar' | nc -w0 -6 -u -p 2121 -s fb00::1 fb00::6 7330"
sleep 5 # wait enough time to ensure the UDP datagram arrived to the last segment
kill -INT $!
kill -TERM $!

if [[ $(< $TMP_FILE) != "foobar" ]]; then
exit 1
Expand Down

0 comments on commit 6bd5572

Please sign in to comment.