BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, bpf@vger.kernel.org
Cc: daniel@iogearbox.net, andrii@kernel.org, martin.lau@kernel.org
Subject: Re: [PATCH v2 bpf-next] selftests/bpf: Fix failure paths in send_signal test
Date: Thu, 13 Nov 2025 12:23:47 -0800	[thread overview]
Message-ID: <1faf09abc5a468a025ba784430cf697bd125f74d.camel@gmail.com> (raw)
In-Reply-To: <20251113171153.2583-1-alexei.starovoitov@gmail.com>

On Thu, 2025-11-13 at 09:11 -0800, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
>
> When test_send_signal_kern__open_and_load() fails parent closes the
> pipe which cases ASSERT_EQ(read(pipe_p2c...)) to fail, but child
> continues and enters infinite loop, while parent is stuck in wait(NULL).
> Other error paths have similar issue, so kill the child before waiting on it.
>
> The bug was discovered while compiling all of selftests with -O1 instead of -O2
> which caused progs/test_send_signal_kern.c to fail to load.
>
> Fixes: ab8b7f0cb358 ("tools/bpf: Add self tests for bpf_send_signal_thread()")
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

From the same test:

                 /* wait a little for signal handler */
                 for (int i = 0; i < 1000000000 && !sigusr1_received; i++) {
                         j /= i + j + 1;
                         if (remote)
                                 sleep(seconds: 1);
                         else
                                 if (!attr)
                                         /* trigger the nanosleep tracepoint program. */
                                         usleep(useconds: 1);
                 }

Constants are probably a bit too high: from 10**3 to 10**9 seconds.

  reply	other threads:[~2025-11-13 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 17:11 [PATCH v2 bpf-next] selftests/bpf: Fix failure paths in send_signal test Alexei Starovoitov
2025-11-13 20:23 ` Eduard Zingerman [this message]
2025-11-15  1: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=1faf09abc5a468a025ba784430cf697bd125f74d.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=martin.lau@kernel.org \
    /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