bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] selftests/bpf: Fix usdt/multispec failure with arm64/clang20
@ 2025-06-15 18:53 Yonghong Song
  2025-06-15 18:53 ` [PATCH bpf-next v2 1/3] selftests/bpf: Refactor the failed assertion to another subtest Yonghong Song
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yonghong Song @ 2025-06-15 18:53 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann, kernel-team,
	Martin KaFai Lau

The usdt/multispec test failed with arm64 arch and clang20 compiler.
On arm64, gcc11 and clang20 generates significantly different usdt
probes and such a difference caused clang20 built selftest failed.

Patches 1 and 2 are refactoring and Patch 3 adjusted BPF_USDT_MAX_SPEC_CNT
for arm64/clang which fixed the issue.

Changelogs:
  v1 -> v2:
    - v1: https://lore.kernel.org/bpf/20250613153446.2256725-1-yonghong.song@linux.dev/
    - The commit description in v1 is not right, it checks sdt's for usdt_100
      while actually it usdt_300 should be checked. Patch 1 has proper
      descriptions.
    - Refactor the code to add a new test ust/multispec_fail where a new
      prog is added and in that new prog BPF_USDT_MAX_SPEC_CNT can overwrite
      the default value in order to pass the test.

Yonghong Song (3):
  selftests/bpf: Refactor the failed assertion to another subtest
  selftests/bpf: Add test_usdt_multispec.inc.h for sharing between
    multiple progs
  selftests/bpf: Add subtest usdt_multispec_fail with adjustable
    BPF_USDT_MAX_SPEC_CNT

 tools/testing/selftests/bpf/prog_tests/usdt.c | 36 +++++++++++++------
 .../selftests/bpf/progs/test_usdt_multispec.c | 28 +--------------
 .../bpf/progs/test_usdt_multispec.inc.h       | 30 ++++++++++++++++
 .../bpf/progs/test_usdt_multispec_fail.c      | 10 ++++++
 4 files changed, 67 insertions(+), 37 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_usdt_multispec.inc.h
 create mode 100644 tools/testing/selftests/bpf/progs/test_usdt_multispec_fail.c

-- 
2.47.1


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

end of thread, other threads:[~2025-06-24 20:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 18:53 [PATCH bpf-next v2 0/3] selftests/bpf: Fix usdt/multispec failure with arm64/clang20 Yonghong Song
2025-06-15 18:53 ` [PATCH bpf-next v2 1/3] selftests/bpf: Refactor the failed assertion to another subtest Yonghong Song
2025-06-16  8:33   ` Jiri Olsa
2025-06-16 15:48     ` Yonghong Song
2025-06-16 22:00   ` Andrii Nakryiko
2025-06-18  4:36     ` Yonghong Song
2025-06-24 15:36       ` Andrii Nakryiko
2025-06-24 16:15         ` Yonghong Song
2025-06-24 19:48           ` Andrii Nakryiko
2025-06-24 20:21             ` Yonghong Song
2025-06-15 18:53 ` [PATCH bpf-next v2 2/3] selftests/bpf: Add test_usdt_multispec.inc.h for sharing between multiple progs Yonghong Song
2025-06-15 18:54 ` [PATCH bpf-next v2 3/3] selftests/bpf: Add subtest usdt_multispec_fail with adjustable BPF_USDT_MAX_SPEC_CNT Yonghong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).