Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next v5 0/2] bpftool: Add recursive map dumping
@ 2026-09-11  3:47 Tianyi Chen
  2026-09-11  3:47 ` [PATCH bpf-next v5 1/2] " Tianyi Chen
  2026-09-11  3:47 ` [PATCH bpf-next v5 2/2] selftests/bpf: Cover recursive bpftool map dumps Tianyi Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Tianyi Chen @ 2026-09-11  3:47 UTC (permalink / raw)
  To: qmo, bpf; +Cc: andrii, eddyz87, ihor.solodrai, linux-kselftest

Add -r/--recursive to dump referenced inner maps after the selected roots,
with deduplication and bounded descriptor use. The second patch checks
output formats and operation under a low descriptor limit.

Changes in v5:
- Name the child-process exit codes for descriptor cleanup, limit setup,
  command failure, entry counts, map IDs and JSON framing. Preserve the
  existing values and failure paths.

The implementation is unchanged. Keep the explicit expected JSON
documents in the tests so each case's output structure is visible where
it is checked; the suggested formatter helper is not needed for this
revision.

v4: https://lore.kernel.org/r/20260911025100.190706-1-diannaaav@gmail.com
Review: https://lore.kernel.org/r/43836e91c05ebc17a327d26c28c018d8e09ed2dcaca6fd02b562e37a17a55dd4@mail.kernel.org

Validation:
- Rebuilt bpftool, its manual pages and the focused selftest runner.
- All 12 bpftool_map_dump subtests passed. The three revised series
  were tested together: 52 subtests passed with no skips or failures in
  an x86-64 KVM guest running Linux 7.3.0-rc2 from bpf/master, with
  LLVM 20-built BPF test objects.
- Bash syntax, bpftool synchronization checks and diff checks passed.
- The generated patches apply cleanly to current bpf-next.

This was a focused run. Unrelated selftests requiring unavailable kernel
features were excluded from the build with PERMISSIVE=1.

Tianyi Chen (2):
  bpftool: Add recursive map dumping
  selftests/bpf: Cover recursive bpftool map dumps

 .../bpf/bpftool/Documentation/bpftool-map.rst |  22 +-
 tools/bpf/bpftool/bash-completion/bpftool     |   2 +-
 tools/bpf/bpftool/main.c                      |   7 +-
 tools/bpf/bpftool/main.h                      |   1 +
 tools/bpf/bpftool/map.c                       | 131 ++++-
 .../bpf/prog_tests/bpftool_map_dump.c         | 474 ++++++++++++++++++
 6 files changed, 626 insertions(+), 11 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c


base-commit: af0b84a9215d951d16f26b7ee34353b970cf5d4e
-- 
2.55.0


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

end of thread, other threads:[~2026-09-11  4:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11  3:47 [PATCH bpf-next v5 0/2] bpftool: Add recursive map dumping Tianyi Chen
2026-09-11  3:47 ` [PATCH bpf-next v5 1/2] " Tianyi Chen
2026-09-11  4:28   ` bot+bpf-ci
2026-09-11  3:47 ` [PATCH bpf-next v5 2/2] selftests/bpf: Cover recursive bpftool map dumps Tianyi Chen
2026-09-11  4:28   ` bot+bpf-ci

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