selftests/bpf: Fix core_reloc test runner
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 26 Apr 2021 19:29:49 +0000 (12:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:44 +0000 (09:50 +0200)
commit183d9ebd449c20658a1aaf580f311140bbc7421d
treeddf3c92d7936954f57d50c4bfbf0c292f8b27049
parent0257a0a5ffb70ea2210aa15c4515223c9358da4e
selftests/bpf: Fix core_reloc test runner

[ Upstream commit bede0ebf0be87e9678103486a77f39e0334c6791 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/core_reloc.c