public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] selftests/bpf: fix flaky build_id test
@ 2026-02-16 19:17 Gregory Bell
  2026-02-16 19:17 ` [PATCH bpf-next 1/2] " Gregory Bell
  2026-02-16 19:17 ` [PATCH bpf-next 2/2] selftests/bpf: align build_id test mapping to 64K page size Gregory Bell
  0 siblings, 2 replies; 4+ messages in thread
From: Gregory Bell @ 2026-02-16 19:17 UTC (permalink / raw)
  To: bpf
  Cc: andrii, eddyz87, ast, daniel, martin.lau, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah, Gregory Bell

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.

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


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

end of thread, other threads:[~2026-02-16 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 19:17 [PATCH bpf-next 0/2] selftests/bpf: fix flaky build_id test Gregory Bell
2026-02-16 19:17 ` [PATCH bpf-next 1/2] " Gregory Bell
2026-02-16 19:48   ` bot+bpf-ci
2026-02-16 19:17 ` [PATCH bpf-next 2/2] selftests/bpf: align build_id test mapping to 64K page size Gregory Bell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox