Skip to content

selftests/bpf: Fix a few test failures with arm64 64KB page

Yonghong Song bpf 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]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 0 repliesApplied 4/4
  2. v34 patches 0 repliesSuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches12 repliesSuperseded

Changes in v4 from the cover letter

- v3: https://lore.kernel.org/bpf/[email protected]/
- In v3, I tried to use __kconfig with CONFIG_ARM64_64K_PAGES to decide to have 4K or 64K aligned. But CI seems unhappy about this. Most likely the reason is due to lskel. So in v4, simply adjust/increase numbers to 64K aligned for test_ringbuf_write test.

Patches in v4 All 4 applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: Reduce test_xdp_adjust_frags_tail_grow logstools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c+12 -60 repliesApplied
2/4selftests/bpf: Fix bpf_mod_race test failure with arm64 64KB page sizetools/testing/selftests/bpf/prog_tests/bpf_mod_race.c+1 -10 repliesApplied
3/4selftests/bpf: Fix ringbuf/ringbuf_write test failure with arm64 64KB page sizetools/testing/selftests/bpf/prog_tests/ringbuf.c tools/testing/selftests/bpf/progs/test_ringbuf_write.c+4 -40 repliesApplied
4/4selftests/bpf: Fix a user_ringbuf failure with arm64 64KB page sizetools/testing/selftests/bpf/prog_tests/user_ringbuf.c+7 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/4] selftests/bpf: Fix a few test failures with arm64 64KB page

My local arm64 host has 64KB page size and the VM to run test_progs also has 64KB page size. There are a few self tests assuming 4KB page and failed in my environment.

Patch 1 reduced long assert logs so if the test fails, developers can check logs easily. Patches 2-4 fixed three selftest failures.

Changelogs:
v3 -> v4:
- v3: https://lore.kernel.org/bpf/[email protected]/
- In v3, I tried to use __kconfig with CONFIG_ARM64_64K_PAGES to decide to have 4K or 64K aligned. But CI seems unhappy about this. Most likely the reason is due to lskel. So in v4, simply adjust/increase numbers to 64K aligned for test_ringbuf_write test.
v2 -> v3:
- v2: https://lore.kernel.org/bpf/[email protected]/
- Fix veristat failure with bpf object file test_ringbuf_write.bpf.o.
v1 -> v2:
- v1: https://lore.kernel.org/bpf/[email protected]/
- Fix a problem with selftest release build, basically from BUILD_BUG_ON to ASSERT_LT.

Yonghong Song (4):
selftests/bpf: Reduce test_xdp_adjust_frags_tail_grow logs selftests/bpf: Fix bpf_mod_race test failure with arm64 64KB page size selftests/bpf: Fix ringbuf/ringbuf_write test failure with arm64 64KB
page size
selftests/bpf: Fix a user_ringbuf failure with arm64 64KB page size

 .../selftests/bpf/prog_tests/bpf_mod_race.c    |  2 +-
 .../testing/selftests/bpf/prog_tests/ringbuf.c |  4 ++--
 .../selftests/bpf/prog_tests/user_ringbuf.c    | 10 +++++++---
 .../selftests/bpf/prog_tests/xdp_adjust_tail.c | 18 ++++++++++++------
 .../selftests/bpf/progs/test_ringbuf_write.c   |  4 ++--
 5 files changed, 24 insertions(+), 14 deletions(-)
Signature · 1 line
2.47.1