public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory Bell <grbell@redhat.com>
To: bpf@vger.kernel.org
Cc: andrii@kernel.org, eddyz87@gmail.com, ast@kernel.org,
	daniel@iogearbox.net, martin.lau@linux.dev, song@kernel.org,
	yonghong.song@linux.dev, john.fastabend@gmail.com,
	kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
	jolsa@kernel.org, shuah@kernel.org,
	Gregory Bell <grbell@redhat.com>
Subject: [PATCH bpf-next v2 0/2] selftests/bpf: fix flaky build_id test
Date: Tue, 17 Feb 2026 09:32:35 -0500	[thread overview]
Message-ID: <cover.1771338492.git.grbell@redhat.com> (raw)

The build_id selftest intermittently fails with the following error:

	./test_progs -t build_id/nofault-paged-out
	serial_test_build_id:PASS:parse_build_id 0 nsec
	subtest_nofault:PASS:skel_open 0 nsec
	subtest_nofault:PASS:link 0 nsec
	subtest_nofault:PASS:trigger_uprobe 0 nsec
	subtest_nofault:PASS:res 0 nsec
	subtest_nofault:FAIL:build_id_status unexpected build_id_status: actual 1 != expected 2
	46/1    build_id/nofault-paged-out:FAIL
	46      build_id:FAIL
	397     stacktrace_build_id:OK
	398     stacktrace_build_id_nmi:OK

On RHEL we consistently hit the reported failure on the first run of
the test following installation, after which subsequent runs pass.

This patch implements the approach discussed in the following thread:
https://lore.kernel.org/all/CAEf4BzYWVtfZh07iQm5Fo=kMm+8hgAu+rXRx1uLRHz07wc59+Q@mail.gmail.com/

Following the discussion, the fix makes the test verify eviction rather
than assuming it. In the discussion it was recommended to add a sleep before
and after the madvise operations, this did not resolve the issue in our case,
rather the test timed out every time. I was successful by retrying the
page-out sequence until the page is actually evicted.

Additionally, the mapping alignment is increased to
64K so the test operates on a properly page-aligned buffer across
supported architectures.

changelog:
 - fixed indentations
 - removed trailing whitespace
 - add space between opening and closing brackets
 
Gregory Bell (2):
  selftests/bpf: fix flaky build_id test
  selftests/bpf: align build_id test mapping to 64K page size

 tools/testing/selftests/bpf/uprobe_multi.c  | 19 ++++++++++++++++---
 tools/testing/selftests/bpf/uprobe_multi.ld |  4 ++--
 2 files changed, 18 insertions(+), 5 deletions(-)

-- 
2.52.0


             reply	other threads:[~2026-02-17 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 14:32 Gregory Bell [this message]
2026-02-17 14:32 ` [PATCH bpf-next v2 1/2] selftests/bpf: fix flaky build_id test Gregory Bell
2026-02-17 14:32 ` [PATCH bpf-next v2 2/2] selftests/bpf: align build_id test mapping to 64K page size Gregory Bell
2026-02-19 21:15 ` [PATCH bpf-next v2 0/2] selftests/bpf: fix flaky build_id test 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=cover.1771338492.git.grbell@redhat.com \
    --to=grbell@redhat.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=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --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