Skip to content

selftests/bpf: migrate a few bpftool testing scripts

Alexis Lothoré (eBPF Foundation) bpf linux-kselftest lkml 4 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected] change-id 20251212-bpftool-tests-bb165c4cceb8

Versions newest first

  1. v4 Latest3 patches 0 repliesApplied 3/3
  2. v33 patches 1 replySuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches8 repliesSuperseded

Changes in v4 from the cover letter

- Port missing map access test in bpftool_metadata
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf/selftests: add a few helpers for bpftool testingtools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/bpftool_helpers.c tools/testing/selftests/bpf/bpftool_helpers.h+87 -10 repliesApplied
2/3selftests/bpf: convert test_bpftool_metadata.sh into test_progs frameworktools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/prog_tests/bpftool_metadata.c tools/testing/selftests/bpf/test_bpftool_metadata.sh+144 -860 repliesApplied
3/3selftests/bpf: convert test_bpftool_map_access.sh into test_progs frameworktools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/prog_tests/bpftool_maps_access.c tools/testing/selftests/bpf/test_bpftool_map.sh+371 -3990 repliesApplied

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchQuentin Monnet
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/3] selftests/bpf: migrate a few bpftool testing scripts

Hello,
this is the v4 for some bpftool tests conversion. The new tests are being integrated in test_progs so that they can be executed on each CI run.

- First commit introduces a few dedicated helpers to execute bpftool commands, with or without retrieving the generated stdout output
- Second commit integrates test_bpftool_metadata.sh into test_progs
- Third commit integrates test_bpftool_map.sh into test_progs

---
Changes in v4:
- Port missing map access test in bpftool_metadata
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Drop commit reordering objects in Makefile
- Rebased series on ci/bpf-next_base to fix conflict
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- drop standalone runner in favor of test_progs
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Alexis Lothoré (eBPF Foundation) (3):
bpf/selftests: add a few helpers for bpftool testing selftests/bpf: convert test_bpftool_metadata.sh into test_progs framework selftests/bpf: convert test_bpftool_map_access.sh into test_progs framework

 tools/testing/selftests/bpf/Makefile               |   5 +-
 tools/testing/selftests/bpf/bpftool_helpers.c      |  74 ++++
 tools/testing/selftests/bpf/bpftool_helpers.h      |  11 +
 .../selftests/bpf/prog_tests/bpftool_maps_access.c | 371 +++++++++++++++++++
 .../selftests/bpf/prog_tests/bpftool_metadata.c    | 144 ++++++++
 tools/testing/selftests/bpf/test_bpftool_map.sh    | 398 ---------------------
 .../testing/selftests/bpf/test_bpftool_metadata.sh |  85 -----
 7 files changed, 602 insertions(+), 486 deletions(-)

---
base-commit: 5f0eb131037251b80c9a92af28c6be8f65d063d2
change-id: 20251212-bpftool-tests-bb165c4cceb8

Best regards,

Signature · 1 line
Alexis Lothoré (eBPF Foundation) <[email protected]>