OSDN Git Service

selftests/bpf: Fix core_reloc test runner
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 26 Apr 2021 19:29:49 +0000 (12:29 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 27 Apr 2021 01:37:13 +0000 (18:37 -0700)
commitbede0ebf0be87e9678103486a77f39e0334c6791
tree38a381e72e61adab21d54a7f1cf4c1c451dd6cad
parent5a30eb23922b52f33222c6729b6b3ff1c37a6c66
selftests/bpf: Fix core_reloc test runner

Fix failed tests checks in core_reloc test runner, which allowed failing tests
to pass quietly. Also add extra check to make sure that expected to fail test cases with
invalid names are caught as test failure anyway, as this is not an expected
failure mode. Also fix mislabeled probed vs direct bitfield test cases.

Fixes: 124a892d1c41 ("selftests/bpf: Test TYPE_EXISTS and TYPE_SIZE CO-RE relocations")
Reported-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Lorenz Bauer <lmb@cloudflare.com>
Link: https://lore.kernel.org/bpf/20210426192949.416837-6-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/core_reloc.c