From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Quentin Monnet <qmo@kernel.org>
Cc: bpf@vger.kernel.org
Subject: [PATCH bpf-next v1 0/4] bpftool, selftests: Add tests for C dump and fix a dropped type
Date: Wed, 19 Aug 2026 17:06:23 -0700 [thread overview]
Message-ID: <20260820000627.3826188-1-ihor.solodrai@linux.dev> (raw)
"bpftool btf dump format c" generates the vmlinux.h that BPF programs
are built against, and it has no direct test coverage. Building
against the header is not a substitute for testing it, nothing a
compiler accepts would break the build.
Patch #3 is an example of a bug that might have been caught by a
dedicated "format c" test.
---
Ihor Solodrai (4):
selftests/bpf: NUL-terminate bpftool command output
selftests/bpf: Add tests for bpftool btf dump format c
bpftool: Don't drop a type in the sorted C dump
selftests/bpf: Check that sorting preserves types in bpftool dump
tools/bpf/bpftool/btf.c | 6 +-
tools/testing/selftests/bpf/bpftool_helpers.c | 7 +-
.../bpf/prog_tests/bpftool_btf_dump.c | 223 ++++++++++++++++++
3 files changed, 233 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_btf_dump.c
--
2.55.0
next reply other threads:[~2026-08-20 0:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 0:06 Ihor Solodrai [this message]
2026-08-20 0:06 ` [PATCH bpf-next v1 1/4] selftests/bpf: NUL-terminate bpftool command output Ihor Solodrai
2026-08-20 0:06 ` [PATCH bpf-next v1 2/4] selftests/bpf: Add tests for bpftool btf dump format c Ihor Solodrai
2026-08-20 0:16 ` sashiko-bot
2026-08-20 0:51 ` bot+bpf-ci
2026-08-20 0:06 ` [PATCH bpf-next v1 3/4] bpftool: Don't drop a type in the sorted C dump Ihor Solodrai
2026-08-20 0:06 ` [PATCH bpf-next v1 4/4] selftests/bpf: Check that sorting preserves types in bpftool dump Ihor Solodrai
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=20260820000627.3826188-1-ihor.solodrai@linux.dev \
--to=ihor.solodrai@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=memxor@gmail.com \
--cc=qmo@kernel.org \
/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