CO-RE relocation selftests fixes
Status from this message: Applied.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 1 replyApplied
- v15 patches 10 repliesSuperseded
Changes in v2 from the cover letter
- updated bpf_core_fields_are_compat() comment to mention FLOAT (Lorenz).
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | selftests/bpf: add remaining ASSERT_xxx() variantstools/ tools/ tools/ +4 more | +56 | 0 replies | |
| 2/5 | libbpf: support BTF_KIND_FLOAT during type compatibility checks in CO-REtools/ | +4 | 0 replies | |
| 3/5 | selftests/bpf: fix BPF_CORE_READ_BITFIELD() macrotools/ | +12 | 0 replies | |
| 4/5 | selftests/bpf: fix field existence CO-RE reloc teststools/ tools/ tools/ +6 more | +24 | 0 replies | |
| 5/5 | selftests/bpf: fix core_reloc test runnertools/ | +12 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Lorenz Bauer |
|---|---|
| 1/5 | A-b |
| 2/5 | A-b |
| 3/5 | A-b |
| 4/5 | A-b |
| 5/5 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 bpf-next 0/5] CO-RE relocation selftests fixes
Lorenz Bauer noticed that core_reloc selftest has two inverted CHECK() conditions, allowing failing tests to pass unnoticed. Fixing that opened up few long-standing (field existence and direct memory bitfields) and one recent failures (BTF_KIND_FLOAT relos).
This patch set fixes core_reloc selftest to capture such failures reliably in the future. It also fixes all the newly failing tests. See individual patches for details.
This patch set also completes a set of ASSERT_xxx() macros, so now there should be a very little reason to use verbose and error-prone generic CHECK() macro.
v1->v2:
- updated bpf_core_fields_are_compat() comment to mention FLOAT (Lorenz).
Andrii Nakryiko (5):
selftests/bpf: add remaining ASSERT_xxx() variants
libbpf: support BTF_KIND_FLOAT during type compatibility checks in
CO-RE
selftests/bpf: fix BPF_CORE_READ_BITFIELD() macro selftests/bpf: fix field existence CO-RE reloc tests selftests/bpf: fix core_reloc test runner
tools/lib/bpf/bpf_core_read.h | 16 ++++-- tools/lib/bpf/libbpf.c | 6 ++- .../selftests/bpf/prog_tests/btf_dump.c | 2 +- .../selftests/bpf/prog_tests/btf_endian.c | 4 +- .../selftests/bpf/prog_tests/cgroup_link.c | 2 +- .../selftests/bpf/prog_tests/core_reloc.c | 51 +++++++++++-------- .../selftests/bpf/prog_tests/kfree_skb.c | 2 +- .../selftests/bpf/prog_tests/resolve_btfids.c | 7 +-- .../selftests/bpf/prog_tests/snprintf_btf.c | 4 +- ...ore_reloc_existence___err_wrong_arr_kind.c | 3 -- ...loc_existence___err_wrong_arr_value_type.c | 3 -- ...ore_reloc_existence___err_wrong_int_kind.c | 3 -- ..._core_reloc_existence___err_wrong_int_sz.c | 3 -- ...ore_reloc_existence___err_wrong_int_type.c | 3 -- ..._reloc_existence___err_wrong_struct_type.c | 3 -- ..._core_reloc_existence___wrong_field_defs.c | 3 ++ .../selftests/bpf/progs/core_reloc_types.h | 20 +------- tools/testing/selftests/bpf/test_progs.h | 50 +++++++++++++++++- 18 files changed, 108 insertions(+), 77 deletions(-) delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_arr_kind.c delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_arr_value_type.c delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_kind.c delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_type.c delete mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_struct_type.c create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_existence___wrong_field_defs.c
Signature · 1 line
2.30.2