diff options
| author | Toke Høiland-Jørgensen <[email protected]> | 2020-09-29 12:30:26 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-09-29 18:43:43 +0000 |
| commit | f970cbcdcdb5b3468a6c05332818d226fb60038f (patch) | |
| tree | 335ff76350c26bf77870612b974de3c06d5fe7aa /tools/testing/selftests/bpf/prog_tests/sock_fields.c | |
| parent | xsk: Fix a documentation mistake in xsk_queue.h (diff) | |
| download | kernel-f970cbcdcdb5b3468a6c05332818d226fb60038f.tar.gz kernel-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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sock_fields.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/sock_fields.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sock_fields.c b/tools/testing/selftests/bpf/prog_tests/sock_fields.c index 66e83b8fc69d..af87118e748e 100644 --- a/tools/testing/selftests/bpf/prog_tests/sock_fields.c +++ b/tools/testing/selftests/bpf/prog_tests/sock_fields.c @@ -36,7 +36,7 @@ struct bpf_spinlock_cnt { static struct sockaddr_in6 srv_sa6, cli_sa6; static int sk_pkt_out_cnt10_fd; -struct test_sock_fields *skel; +static struct test_sock_fields *skel; static int sk_pkt_out_cnt_fd; static __u64 parent_cg_id; static __u64 child_cg_id; |
