From: Stanislav Fomichev <stfomichev@gmail.com>
To: Marco Leogrande <leogrande@google.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Mykola Lysenko <mykolal@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org>,
"Alessandro Carminati (Red Hat)" <alessandro.carminati@gmail.com>,
willemb@google.com, zhuyifei@google.com, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind
Date: Mon, 2 Dec 2024 16:15:02 -0800 [thread overview]
Message-ID: <Z05NhvyagBbHs8Gq@mini-arch> (raw)
In-Reply-To: <20241202204530.1143448-1-leogrande@google.com>
On 12/02, Marco Leogrande wrote:
> Commit f803bcf9208a ("selftests/bpf: Prevent client connect before
> server bind in test_tc_tunnel.sh") added code that waits for the
> netcat server to start before the netcat client attempts to connect to
> it. However, not all calls to 'server_listen' were guarded.
>
> This patch adds the existing 'wait_for_port' guard after the remaining
> call to 'server_listen'.
>
> Fixes: f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh")
> Signed-off-by: Marco Leogrande <leogrande@google.com>
> ---
> tools/testing/selftests/bpf/test_tc_tunnel.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/test_tc_tunnel.sh b/tools/testing/selftests/bpf/test_tc_tunnel.sh
> index 7989ec6084545..cb55a908bb0d7 100755
> --- a/tools/testing/selftests/bpf/test_tc_tunnel.sh
> +++ b/tools/testing/selftests/bpf/test_tc_tunnel.sh
> @@ -305,6 +305,7 @@ else
> client_connect
> verify_data
> server_listen
> + wait_for_port ${port} ${netcat_opt}
> fi
>
> # serverside, use BPF for decap
> --
> 2.47.0.338.g60cca15819-goog
>
Do you see this failing in your CI or in the BPF CI? It seems ok
to add wait_for_port here, but the likelihood of the issue seems
minuscule. There is a bunch of ip/tc/etc calls between this
server_listen and the next client_connect (and I'd be surprised to hear
that netcat is still not listening by the time we reach next
client_connect).
next prev parent reply other threads:[~2024-12-03 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 20:45 [PATCH bpf-next] tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind Marco Leogrande
2024-12-03 0:15 ` Stanislav Fomichev [this message]
2024-12-03 17:23 ` Marco Leogrande
2024-12-04 15:37 ` Stanislav Fomichev
2024-12-04 17:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z05NhvyagBbHs8Gq@mini-arch \
--to=stfomichev@gmail.com \
--cc=alessandro.carminati@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=leogrande@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=willemb@google.com \
--cc=yonghong.song@linux.dev \
--cc=zhuyifei@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox