lkml.org 
[lkml]   [2021]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] selftests/bpf: remove ARRAY_SIZE defines from tests
On Fri, Dec 10, 2021 at 9:34 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> ARRAY_SIZE is defined in multiple test files. Remove the definitions
> and include header file for the define instead.
>
> Remove ARRAY_SIZE define and add include bpf_util.h to bring in the
> define.
>
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
> tools/testing/selftests/bpf/progs/netif_receive_skb.c | 5 +----
> tools/testing/selftests/bpf/progs/profiler.inc.h | 5 +----
> tools/testing/selftests/bpf/progs/test_sysctl_loop1.c | 5 +----
> tools/testing/selftests/bpf/progs/test_sysctl_loop2.c | 4 +---
> tools/testing/selftests/bpf/progs/test_sysctl_prog.c | 5 +----
> 5 files changed, 5 insertions(+), 19 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/netif_receive_skb.c b/tools/testing/selftests/bpf/progs/netif_receive_skb.c
> index 1d8918dfbd3f..7a5ebd330689 100644
> --- a/tools/testing/selftests/bpf/progs/netif_receive_skb.c
> +++ b/tools/testing/selftests/bpf/progs/netif_receive_skb.c
> @@ -5,6 +5,7 @@
> #include <bpf/bpf_helpers.h>
> #include <bpf/bpf_tracing.h>
> #include <bpf/bpf_core_read.h>
> +#include <bpf/bpf_util.h>

It doesn't look like you've built it.

progs/test_sysctl_prog.c:11:10: fatal error: 'bpf/bpf_util.h' file not found
#include <bpf/bpf_util.h>
^~~~~~~~~~~~~~~~
CLNG-BPF [test_maps] socket_cookie_prog.o
progs/test_sysctl_loop2.c:11:10: fatal error: 'bpf/bpf_util.h' file not found
#include <bpf/bpf_util.h>
^~~~~~~~~~~~~~~~
1 error generated.
In file included from progs/profiler2.c:6:
progs/profiler.inc.h:7:10: fatal error: 'bpf/bpf_util.h' file not found
#include <bpf/bpf_util.h>
^~~~~~~~~~~~~~~~

\
 
 \ /
  Last update: 2021-12-12 02:55    [W:0.112 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site