diff options
| author | Martin KaFai Lau <[email protected]> | 2020-11-06 22:54:02 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2020-11-10 00:18:36 +0000 |
| commit | f52b8fd332573106e60958617a3d2e30611ce1fb (patch) | |
| tree | f64859147386fbab5d130b077657dcc0cb5faad9 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | |
| parent | bpf, btf: Remove the duplicate btf_ids.h include (diff) | |
| download | kernel-f52b8fd332573106e60958617a3d2e30611ce1fb.tar.gz kernel-f52b8fd332573106e60958617a3d2e30611ce1fb.zip | |
bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress
Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test
are not using static scope. This patch fixes it.
Targeting bpf-next branch as an improvement since it currently does not
break the build.
Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options")
Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress")
Signed-off-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c index c85174cdcb77..08d19cafd5e8 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c +++ b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c @@ -18,12 +18,12 @@ #define LO_ADDR6 "::1" #define CG_NAME "/tcpbpf-hdr-opt-test" -struct bpf_test_option exp_passive_estab_in; -struct bpf_test_option exp_active_estab_in; -struct bpf_test_option exp_passive_fin_in; -struct bpf_test_option exp_active_fin_in; -struct hdr_stg exp_passive_hdr_stg; -struct hdr_stg exp_active_hdr_stg = { .active = true, }; +static struct bpf_test_option exp_passive_estab_in; +static struct bpf_test_option exp_active_estab_in; +static struct bpf_test_option exp_passive_fin_in; +static struct bpf_test_option exp_active_fin_in; +static struct hdr_stg exp_passive_hdr_stg; +static struct hdr_stg exp_active_hdr_stg = { .active = true, }; static struct test_misc_tcp_hdr_options *misc_skel; static struct test_tcp_hdr_options *skel; |
