aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-10-22 15:32:25 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-10-25 14:45:45 -0700
commit6972dc3b8778ce0d9ce819c6f1e3d32ce2bc3dd9 (patch)
tree1714331fc5d41d93b49ef2fa65741797be1d0e51 /tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
parentlibbpf: Fix BTF header parsing checks (diff)
downloadlinux-dev-6972dc3b8778ce0d9ce819c6f1e3d32ce2bc3dd9.tar.xz
linux-dev-6972dc3b8778ce0d9ce819c6f1e3d32ce2bc3dd9.zip
selftests/bpf: Normalize selftest entry points
Ensure that all test entry points are global void functions with no input arguments. Mark few subtest entry points as static. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211022223228.99920-2-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/resolve_btfids.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/resolve_btfids.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/resolve_btfids.c b/tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
index badda6309fd9..f4a13d9dd5c8 100644
--- a/tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
+++ b/tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
@@ -117,14 +117,14 @@ static int resolve_symbols(void)
return 0;
}
-int test_resolve_btfids(void)
+void test_resolve_btfids(void)
{
__u32 *test_list, *test_lists[] = { test_list_local, test_list_global };
unsigned int i, j;
int ret = 0;
if (resolve_symbols())
- return -1;
+ return;
/* Check BTF_ID_LIST(test_list_local) and
* BTF_ID_LIST_GLOBAL(test_list_global) IDs
@@ -138,7 +138,7 @@ int test_resolve_btfids(void)
test_symbols[i].name,
test_list[i], test_symbols[i].id);
if (ret)
- return ret;
+ return;
}
}
@@ -161,9 +161,7 @@ int test_resolve_btfids(void)
if (i > 0) {
if (!ASSERT_LE(test_set.ids[i - 1], test_set.ids[i], "sort_check"))
- return -1;
+ return;
}
}
-
- return ret;
}