Skip to content

Build BPF selftests and its libbpf, bpftool in debug mode

Andrii Nakryiko bpf netdev 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
  2. v11 of 2 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libbpf: add explicit padding to bpf_xdp_set_link_optstools/lib/bpf/libbpf.h+1 -00 replies
2/4bpftool: fix maybe-uninitialized warningstools/bpf/bpftool/btf.c tools/bpf/bpftool/main.c tools/bpf/bpftool/map.c+5 -30 replies
3/4selftests/bpf: fix maybe-uninitialized warning in xdpxceiver testtools/testing/selftests/bpf/xdpxceiver.c+2 -20 replies
4/4selftests/bpf: build everything in debug modetools/testing/selftests/bpf/Makefile+5 -21 reply

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/4] Build BPF selftests and its libbpf, bpftool in debug mode

Build BPF selftests and libbpf and bpftool, that are used as part of selftests, in debug mode (specifically, -Og). This makes it much simpler and nicer to do development and/or bug fixing. See patch #4 for some unscientific measurements.

This patch set fixes new maybe-unitialized warnings produced in -Og build mode. Patch #1 fixes the blocker which was causing some XDP selftests failures due to non-zero padding in bpf_xdp_set_link_opts, which only happened in debug mode.

Andrii Nakryiko (4):
libbpf: add explicit padding to bpf_xdp_set_link_opts
bpftool: fix maybe-uninitialized warnings selftests/bpf: fix maybe-uninitialized warning in xdpxceiver test selftests/bpf: build everything in debug mode

 tools/bpf/bpftool/btf.c                  | 3 +++
 tools/bpf/bpftool/main.c                 | 3 +--
 tools/bpf/bpftool/map.c                  | 2 +-
 tools/lib/bpf/libbpf.h                   | 1 +
 tools/testing/selftests/bpf/Makefile     | 7 +++++--
 tools/testing/selftests/bpf/xdpxceiver.c | 4 ++--
 6 files changed, 13 insertions(+), 7 deletions(-)
Signature · 1 line
2.24.1