All of lore.kernel.org
 help / color / mirror / Atom feed
From: Puranjay Mohan <puranjay@kernel.org>
To: Eduard Zingerman <eddyz87@gmail.com>,
	bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	kernel-team@fb.com, yonghong.song@linux.dev,
	Eduard Zingerman <eddyz87@gmail.com>,
	Puranjay Mohan <puranjay12@gmail.com>
Subject: Re: [PATCH bpf-next v2 0/4] selftests/bpf: impose global ordering for test decl_tags
Date: Tue, 31 Mar 2026 14:03:10 +0100	[thread overview]
Message-ID: <m2jyus178x.fsf@kernel.org> (raw)
In-Reply-To: <20260330-selftests-global-tags-ordering-v2-0-c0ac61e81098@gmail.com>

Eduard Zingerman <eddyz87@gmail.com> writes:

> 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/
>
> Changelog:
> v1 -> v2:
> - updated remaining str_has_pfx() usages (Puranjay)
> - removed realloc_or_free() (Andrii)
> - fixed qsort(NULL, ...) usage (Puranjay)
> - skip_decl_tag_pfx() returns NULL if tag does not start from
>   "comment:" (Puranjay)
>
> v1: https://lore.kernel.org/bpf/20260326-selftests-global-tags-ordering-v1-0-5dd2ced5d9ad@gmail.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    | 202 +++++++++++++--------------
>  2 files changed, 125 insertions(+), 137 deletions(-)
> ---
> base-commit: b6b5e0ebd429d66ce37ae5af649a74ea1f041d92
> change-id: 20260326-selftests-global-tags-ordering-8f324323d9c8


This set looks good to me, after changing the free path of realloc():

Reviewed-by: Puranjay Mohan <puranjay@kernel.org>

  parent reply	other threads:[~2026-03-31 13:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  0:59 [PATCH bpf-next v2 0/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman
2026-03-31  0:59 ` [PATCH bpf-next v2 1/4] selftests/bpf: fix __jited_unpriv tag name Eduard Zingerman
2026-03-31  0:59 ` [PATCH bpf-next v2 2/4] selftests/bpf: make str_has_pfx return pointer past the prefix Eduard Zingerman
2026-03-31 12:07   ` Mykyta Yatsenko
2026-03-31 17:52     ` Eduard Zingerman
2026-03-31  0:59 ` [PATCH bpf-next v2 3/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman
2026-03-31  2:38   ` bot+bpf-ci
2026-03-31 13:02     ` Puranjay Mohan
2026-03-31 17:52       ` Eduard Zingerman
2026-03-31  0:59 ` [PATCH bpf-next v2 4/4] selftests/bpf: inline TEST_TAG constants in test_loader.c Eduard Zingerman
2026-03-31 13:03 ` Puranjay Mohan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-11  7:33 [PATCH bpf-next v2 0/4] selftests/bpf: impose global ordering for test decl_tags Eduard Zingerman
2026-04-11 14:20 ` 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=m2jyus178x.fsf@kernel.org \
    --to=puranjay@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=puranjay12@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.