Skip to content

selftest related fixes

Vineet Gupta bpf sashiko-reviews 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 3 repliesIn review 3 of 4 applied
  2. v14 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- 1/4: reworked. Instead of forcing BPF_STX with barrier_var(), select the expected message with #ifdef __BPF_FEATURE_ST, per Yonghong. The changelog now spells out the two tradeoffs: on a BPF_ST toolchain the test no longer reaches map_kptr_match_type(), and __BPF_FEATURE_ST means "can emit BPF_ST", not "will" - clang -mcpu=v4 -O0 still emits BPF_STX, so the #ifdef is only correct because selftests build at -O2.

- 2/4: reword the comment above the error-summary walk. With --no-error-summary and no --json-summary the loop is skipped entirely, not just the printing, which the old wording obscured. [bpf-ci]

- 4/4: the RV64 recipe in README.rst wraps the denylist in \" and relies on the guest's second parse of the init script to remove them, so %q broke it - the quotes reached test_progs and parse_test_list() split them into junk filters. Drop the backslashes so the host consumes the quotes, and correct the changelog, which wrongly claimed README.rst shows the command unquoted. [bpf-ci]

- 3/4: unchanged.

Patches in v2 3 of 4 applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: map_kptr: expect BPF_ST reject msg on cpuv4 toolchainstools/testing/selftests/bpf/progs/map_kptr_fail.c+9 -03 repliesApplied
2/4selftests/bpf: add --no-error-summary to skip end-of-run error log dumptools/testing/selftests/bpf/test_progs.c tools/testing/selftests/bpf/test_progs.h+31 -130 repliesApplied
3/4selftests/bpf: report failed subtest count in test_progs summarytools/testing/selftests/bpf/test_progs.c tools/testing/selftests/bpf/test_progs.h+14 -90 replies
4/4selftests/bpf: vmtest.sh: preserve command quoting when running in the VMtools/testing/selftests/bpf/README.rst tools/testing/selftests/bpf/vmtest.sh+13 -40 repliesApplied

Reviews trailers per patch

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

PatchYonghong Song
1/4A-b
2/4
3/4
4/4

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/4] selftest related fixes

Hi,

This is a set of fixes accumulated during BPF_GCC testing and an in-works verifier enhancement series for 32-bit tracking.

Changes since v1:

- 1/4: reworked. Instead of forcing BPF_STX with barrier_var(), select the expected message with #ifdef __BPF_FEATURE_ST, per Yonghong. The changelog now spells out the two tradeoffs: on a BPF_ST toolchain the test no longer reaches map_kptr_match_type(), and __BPF_FEATURE_ST means "can emit BPF_ST", not "will" - clang -mcpu=v4 -O0 still emits BPF_STX, so the #ifdef is only correct because selftests build at -O2.

- 2/4: reword the comment above the error-summary walk. With --no-error-summary and no --json-summary the loop is skipped entirely, not just the printing, which the old wording obscured. [bpf-ci]

- 4/4: the RV64 recipe in README.rst wraps the denylist in \" and relies on the guest's second parse of the init script to remove them, so %q broke it - the quotes reached test_progs and parse_test_list() split them into junk filters. Drop the backslashes so the host consumes the quotes, and correct the changelog, which wrongly claimed README.rst shows the command unquoted. [bpf-ci]

- 3/4: unchanged.

v1: https://lore.kernel.org/bpf/[email protected]

Thx,
-Vineet

Vineet Gupta (4):
selftests/bpf: map_kptr: expect BPF_ST reject msg on cpuv4 toolchains selftests/bpf: add --no-error-summary to skip end-of-run error log
dump
selftests/bpf: report failed subtest count in test_progs summary selftests/bpf: vmtest.sh: preserve command quoting when running in the
VM

 tools/testing/selftests/bpf/README.rst        |  4 +-
 .../selftests/bpf/progs/map_kptr_fail.c       |  9 +++
 tools/testing/selftests/bpf/test_progs.c      | 64 +++++++++++++------
 tools/testing/selftests/bpf/test_progs.h      |  3 +-
 tools/testing/selftests/bpf/vmtest.sh         | 13 +++-
 5 files changed, 67 insertions(+), 26 deletions(-)
Signature · 1 line
2.53.0-Meta