public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] selftests/bpf: impose global ordering for test decl_tags
@ 2026-03-26 17:39 Eduard Zingerman
  2026-03-26 17:39 ` [PATCH 1/4] selftests/bpf: fix __jited_unpriv tag name Eduard Zingerman
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Eduard Zingerman @ 2026-03-26 17:39 UTC (permalink / raw)
  To: bpf, ast, andrii
  Cc: daniel, martin.lau, kernel-team, yonghong.song, eddyz87,
	cupertino.miranda

Impose global ordering for all decl tags used by test_loader.c based
tests: __success, __failure, __msg, etc. The tags are now sorted by
testing framework to be processed in the same order they appear in the
C source code of the test.

The ordering is necessary for gcc-bpf. Neither GCC nor the C standard
defines the order in which function attributes are consumed.
While Clang tends to preserve tags definition order in the output BTF,
GCC does not. This inconsistency causes BPF tests with multiple __msg
entries to fail when compiled with GCC.

This is based on a patch [1] from Cupertino Miranda (see patch #3) and
includes some additional cleanups for test_loader.c decl tags
declaration and processing (see patches #1, #2, #4).

[1] https://lore.kernel.org/bpf/20260305130035.192080-1-cupertino.miranda@oracle.com/

---
Eduard Zingerman (4):
      selftests/bpf: fix __jited_unpriv tag name
      selftests/bpf: make str_has_pfx return pointer past the prefix
      selftests/bpf: impose global ordering for test decl_tags
      selftests/bpf: inline TEST_TAG constants in test_loader.c

 tools/testing/selftests/bpf/progs/bpf_misc.h |  60 ++++----
 tools/testing/selftests/bpf/test_loader.c    | 199 +++++++++++++--------------
 2 files changed, 126 insertions(+), 133 deletions(-)
---
base-commit: 400ff899c336c24bf4d34479f98cef2fd2d3482a
change-id: 20260326-selftests-global-tags-ordering-8f324323d9c8

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

end of thread, other threads:[~2026-03-27 22:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 17:39 [PATCH 0/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman
2026-03-26 17:39 ` [PATCH 1/4] selftests/bpf: fix __jited_unpriv tag name Eduard Zingerman
2026-03-27 21:52   ` Ihor Solodrai
2026-03-26 17:39 ` [PATCH 2/4] selftests/bpf: make str_has_pfx return pointer past the prefix Eduard Zingerman
2026-03-27 21:54   ` Ihor Solodrai
2026-03-27 21:57     ` Eduard Zingerman
2026-03-26 17:39 ` [PATCH 3/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman
2026-03-26 22:47   ` Andrii Nakryiko
2026-03-26 22:51     ` Eduard Zingerman
2026-03-26 23:00       ` Andrii Nakryiko
2026-03-26 23:30         ` Eduard Zingerman
2026-03-27 22:00   ` Ihor Solodrai
2026-03-27 22:07     ` Eduard Zingerman
2026-03-26 17:39 ` [PATCH 4/4] selftests/bpf: inline TEST_TAG constants in test_loader.c Eduard Zingerman
2026-03-27 22:04   ` Ihor Solodrai
2026-03-26 22:28 ` [PATCH 0/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman

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