Skip to content

selftests/bpf: Fix compilation with RELEASE=1

Viktor Malik bpf 1 version 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

  1. v1 Latest4 patches 4 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: Check malloc result with ASSERT_NEQ in test_loadertools/testing/selftests/bpf/test_loader.c+1 -10 repliesApplied
2/4selftests/bpf: Check malloc result with ASSERT_NEQ in test_sha256tools/testing/selftests/bpf/prog_tests/sha256.c+2 -20 repliesApplied
3/4selftests/bpf: Silence array bounds warning in global_map_resizetools/testing/selftests/bpf/prog_tests/global_map_resize.c+6 -20 repliesApplied
4/4selftests/bpf: Silence maybe-uninitialized compiler warning in libarenatools/testing/selftests/bpf/libarena/include/libarena/userspace.h+1 -10 repliesApplied

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH bpf-next 0/4] selftests/bpf: Fix compilation with RELEASE=1

When compiling BPF selftests with RELEASE=1 (which most notably adds -O2), GCC reports several warnings. These are by default treated as errors and abort the compilation.

This series fixes all of the issues such that selftests can be compiled with RELEASE=1.

Viktor Malik (4):
selftests/bpf: Check malloc result with ASSERT_NEQ in test_loader selftests/bpf: Check malloc result with ASSERT_NEQ in test_sha256 selftests/bpf: Silence array bounds warning in global_map_resize selftests/bpf: Silence maybe-uninitialized compiler warning in
libarena

 .../selftests/bpf/libarena/include/libarena/userspace.h   | 2 +-
 .../testing/selftests/bpf/prog_tests/global_map_resize.c  | 8 ++++++--
 tools/testing/selftests/bpf/prog_tests/sha256.c           | 4 ++--
 tools/testing/selftests/bpf/test_loader.c                 | 2 +-
 4 files changed, 10 insertions(+), 6 deletions(-)
Signature · 1 line
2.54.0