Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Ihor Solodrai" <ihor.solodrai@linux.dev>,
	"Alexis Lothoré (eBPF Foundation)" <alexis.lothore@bootlin.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Martin KaFai Lau" <martin.lau@linux.dev>,
	"Song Liu" <song@kernel.org>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Emil Tsalapatis" <emil@etsalapatis.com>,
	"Shuah Khan" <shuah@kernel.org>
Cc: <ebpf@linuxfoundation.org>,
	"Bastien Curutchet" <bastien.curutchet@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	<bpf@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf v4] selftests/bpf: allocate a larger timeout for connection
Date: Thu, 13 Aug 2026 21:06:46 +0200	[thread overview]
Message-ID: <DKO1UZCX0LFJ.3SSPJ0ZBKTUTN@bootlin.com> (raw)
In-Reply-To: <92e15af5-b490-4a4e-a908-9a6320da6583@linux.dev>

On Thu Aug 13, 2026 at 8:55 PM CEST, Ihor Solodrai wrote:
> On 2026-08-13 2:38 a.m., Alexis Lothoré (eBPF Foundation) wrote:
>> Some tests, like tc_tunnel or tc_edt, sporadically fail in CI with the
>> following logs:
>> 
>>    (network_helpers.c:309: errno: Operation now in progress) \
>>      Failed to connect to server
>>    send_and_test_data:FAIL:connect to server unexpected error: -115
>> 
>> This is due to SO_RCVTIMEO and SO_SNDTIMEO being set on the client
>> socket (see settimeo() in client_socket()), allowing connect() to return
>> an error and to set errno to EINPROGRESS instead of ETIMEDOUT.
>> Increasing the timeout value for those tests is likely not a good
>> solution (and it has already been done by commit 2790db208b44
>> ("selftests/bpf: Improve tc_tunnel test reliability")): some tests
>> expect some data transfer to fail, and so the timeout value would
>> increase overall test execution duration again (not only the connection,
>> but any socket operation).
>> 
>> Another solution is to allocate a timeout budget specific to the
>> connection: we can apply a larger timeout only for connections, and once
>> the connection is established, set back the timeout configured through
>> opts->timeout_ms; this would allow connection to succeed under heavy CI
>> load, while keeping timeout reasonable for the rest of the test traffic.
>> 
>> Set a larger SO_SNDTIMEO/SO_RCVTIMEO for the connection step, and reset
>> it back to the timeout configured by the test once the connection has
>> succeeded.
>> 
>> Fixes: 99126abec5e5 ("bpf: selftests: A few improvements to network_helpers.c")
>> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
>> ---
>> Hello,
>> this is the v4 of the series aiming to reduce the flakyness of
>> tc_tunnel/tc_edt tests in CI. This revision takes a step back, based on
>> Ihor's tests,  and drops the poll loop in favor of a bare, larger
>> timeout value applied only for the connection step. The main downside
>> of this new mechanism is a slight increase of the duration for tests
>> expecting a connection failure. In my testing setup (x86-based Qemu on
>> my work laptop), I observed a ~10s increase (on a ~5m18 base for the
>> whole test_progs set).
>
> Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
>
> I think it's better to fix those comment nits.

ACK, I'll send a new rev then.

Thanks,

Alexis

      reply	other threads:[~2026-08-13 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  9:38 [PATCH bpf v4] selftests/bpf: allocate a larger timeout for connection Alexis Lothoré (eBPF Foundation)
2026-08-13 10:33 ` bot+bpf-ci
2026-08-13 11:23   ` Alexis Lothoré
2026-08-13 18:55 ` Ihor Solodrai
2026-08-13 19:06   ` Alexis Lothoré [this message]

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=DKO1UZCX0LFJ.3SSPJ0ZBKTUTN@bootlin.com \
    --to=alexis.lothore@bootlin.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bastien.curutchet@bootlin.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ebpf@linuxfoundation.org \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yonghong.song@linux.dev \
    /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