bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: fix test_lwt_seg6local.sh hangs
@ 2020-07-20 10:18 Ilya Leoshkevich
  2020-07-21 19:49 ` Alexei Starovoitov
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Leoshkevich @ 2020-07-20 10:18 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann
  Cc: bpf, Heiko Carstens, Vasily Gorbik, Ilya Leoshkevich

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 <iii@linux.ibm.com>
---
 tools/testing/selftests/bpf/test_lwt_seg6local.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/test_lwt_seg6local.sh b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
index 785eabf2a593..5620919fde9e 100755
--- a/tools/testing/selftests/bpf/test_lwt_seg6local.sh
+++ b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
@@ -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
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix test_lwt_seg6local.sh hangs
  2020-07-20 10:18 [PATCH bpf-next] selftests/bpf: fix test_lwt_seg6local.sh hangs Ilya Leoshkevich
@ 2020-07-21 19:49 ` Alexei Starovoitov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2020-07-21 19:49 UTC (permalink / raw)
  To: Ilya Leoshkevich
  Cc: Alexei Starovoitov, Daniel Borkmann, bpf, Heiko Carstens, Vasily Gorbik

On Mon, Jul 20, 2020 at 3:19 AM Ilya Leoshkevich <iii@linux.ibm.com> wrote:
>
> 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 <iii@linux.ibm.com>
> ---
>  tools/testing/selftests/bpf/test_lwt_seg6local.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_lwt_seg6local.sh b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> index 785eabf2a593..5620919fde9e 100755
> --- a/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> +++ b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> @@ -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 $!

Applied.
The test doesn't work for me anyway:
Ncat: Invalid -w timeout (must be greater than 0). QUITTING.
selftests: test_lwt_seg6local [FAILED]
Ncat: Since April 2010, the default unit for -d is seconds, so your
time of "7330" is 122.2 minutes. Use "7330ms" for 7330 milliseconds.
QUITTING.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-21 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 10:18 [PATCH bpf-next] selftests/bpf: fix test_lwt_seg6local.sh hangs Ilya Leoshkevich
2020-07-21 19:49 ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).