diff options
author | Toke Høiland-Jørgensen <toke@redhat.com> | 2020-09-29 14:30:26 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-29 11:43:43 -0700 |
commit | f970cbcdcdb5b3468a6c05332818d226fb60038f (patch) | |
tree | 335ff76350c26bf77870612b974de3c06d5fe7aa /tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c | |
parent | f1fc8ece6c077bd6d460d99f4f83b9d20992b68b (diff) | |
download | linux-f970cbcdcdb5b3468a6c05332818d226fb60038f.tar.gz linux-f970cbcdcdb5b3468a6c05332818d226fb60038f.tar.bz2 linux-f970cbcdcdb5b3468a6c05332818d226fb60038f.zip |
selftests: Make sure all 'skel' variables are declared static
If programs in prog_tests using skeletons declare the 'skel' variable as
global but not static, that will lead to linker errors on the final link of
the prog_tests binary due to duplicate symbols. Fix a few instances of this.
Fixes: b18c1f0aa477 ("bpf: selftest: Adapt sock_fields test to use skel and global variables")
Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200929123026.46751-1-toke@redhat.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c index 4ce0e8a25bc5..86ccf37e26b3 100644 --- a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c +++ b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c @@ -16,7 +16,7 @@ #include "test_progs.h" #include "test_btf_skc_cls_ingress.skel.h" -struct test_btf_skc_cls_ingress *skel; +static struct test_btf_skc_cls_ingress *skel; struct sockaddr_in6 srv_sa6; static __u32 duration; |