aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/ksyms_module.c
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2022-02-08 06:54:44 +0000
committerDaniel Borkmann <[email protected]>2022-02-08 20:17:34 +0000
commit5912fcb4bee1ab7a956ffe81b8ab30a8667ac034 (patch)
tree0d65e3a5c02a0aaa07a2a6898d861c455b2573a3 /tools/testing/selftests/bpf/prog_tests/ksyms_module.c
parentbpf, x86_64: Fail gracefully on bpf_jit_binary_pack_finalize failures (diff)
downloadkernel-5912fcb4bee1ab7a956ffe81b8ab30a8667ac034.tar.gz
kernel-5912fcb4bee1ab7a956ffe81b8ab30a8667ac034.zip
selftests/bpf: Do not export subtest as standalone test
Two subtests in ksyms_module.c are not qualified as static, so these subtests are exported as standalone tests in tests.h and lead to confusion for the output of "./test_progs -t ksyms_module". By using the following command ... grep "^void \(serial_\)\?test_[a-zA-Z0-9_]\+(\(void\)\?)" \ tools/testing/selftests/bpf/prog_tests/*.c | \ awk -F : '{print $1}' | sort | uniq -c | awk '$1 != 1' ... one finds out that other tests also have a similar problem, so fix these tests by marking subtests in these tests as static. Signed-off-by: Hou Tao <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/ksyms_module.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/ksyms_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/ksyms_module.c b/tools/testing/selftests/bpf/prog_tests/ksyms_module.c
index ecc58c9e7631..a1ebac70ec29 100644
--- a/tools/testing/selftests/bpf/prog_tests/ksyms_module.c
+++ b/tools/testing/selftests/bpf/prog_tests/ksyms_module.c
@@ -6,7 +6,7 @@
#include "test_ksyms_module.lskel.h"
#include "test_ksyms_module.skel.h"
-void test_ksyms_module_lskel(void)
+static void test_ksyms_module_lskel(void)
{
struct test_ksyms_module_lskel *skel;
int err;
@@ -33,7 +33,7 @@ cleanup:
test_ksyms_module_lskel__destroy(skel);
}
-void test_ksyms_module_libbpf(void)
+static void test_ksyms_module_libbpf(void)
{
struct test_ksyms_module *skel;
int err;