]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
selftests/bpf: Declare bpf_log_buf variables as static
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 2 Mar 2020 14:53:48 +0000 (15:53 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 3 Mar 2020 01:00:41 +0000 (17:00 -0800)
The cgroup selftests did not declare the bpf_log_buf variable as static, leading
to a linker error with GCC 10 (which defaults to -fno-common). Fix this by
adding the missing static declarations.

Fixes: 257c88559f36 ("selftests/bpf: Convert test_cgroup_attach to prog_tests")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrey Ignatov <rdna@fb.com>
Link: https://lore.kernel.org/bpf/20200302145348.559177-1-toke@redhat.com
tools/testing/selftests/bpf/prog_tests/cgroup_attach_autodetach.c
tools/testing/selftests/bpf/prog_tests/cgroup_attach_multi.c
tools/testing/selftests/bpf/prog_tests/cgroup_attach_override.c

index 5b13f2c6c402449e5bc3042d2bebbc77211786a3..70e94e783070bd1908bcbd54ce3aa88862d6f10f 100644 (file)
@@ -6,7 +6,7 @@
 
 #define PING_CMD       "ping -q -c1 -w1 127.0.0.1 > /dev/null"
 
-char bpf_log_buf[BPF_LOG_BUF_SIZE];
+static char bpf_log_buf[BPF_LOG_BUF_SIZE];
 
 static int prog_load(void)
 {
index 2ff21dbce179c0b0468d55677522551364016726..139f8e82c7c6ee7cd711e340e0c00a8a2349242f 100644 (file)
@@ -6,7 +6,7 @@
 
 #define PING_CMD       "ping -q -c1 -w1 127.0.0.1 > /dev/null"
 
-char bpf_log_buf[BPF_LOG_BUF_SIZE];
+static char bpf_log_buf[BPF_LOG_BUF_SIZE];
 
 static int map_fd = -1;
 
index 9d8cb48b99dee889a41fd8f77ca5daa9e0446d42..9e96f8d87fea49b25dfa14712bc10216c56a4bba 100644 (file)
@@ -8,7 +8,7 @@
 #define BAR            "/foo/bar/"
 #define PING_CMD       "ping -q -c1 -w1 127.0.0.1 > /dev/null"
 
-char bpf_log_buf[BPF_LOG_BUF_SIZE];
+static char bpf_log_buf[BPF_LOG_BUF_SIZE];
 
 static int prog_load(int verdict)
 {