bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: Shuah Khan <shuah@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] selftests/bpf: remove ARRAY_SIZE defines from tests
Date: Sat, 11 Dec 2021 17:53:37 -0800	[thread overview]
Message-ID: <CAADnVQ+Fnn-NuGoLq1ZYbHM=kR_W01GB1DCFOnQTHhgfDOrnaA@mail.gmail.com> (raw)
In-Reply-To: <20211210173433.13247-1-skhan@linuxfoundation.org>

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>
         ^~~~~~~~~~~~~~~~

  reply	other threads:[~2021-12-12  1:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 17:34 [PATCH] selftests/bpf: remove ARRAY_SIZE defines from tests Shuah Khan
2021-12-12  1:53 ` Alexei Starovoitov [this message]
2021-12-14 20:27   ` Shuah Khan
2021-12-16  4:04     ` Andrii Nakryiko
2021-12-16 14:42       ` Shuah Khan
2021-12-16 19:30         ` Andrii Nakryiko
2021-12-16 19:51           ` Shuah Khan
2021-12-16 20:03             ` Andrii Nakryiko
2021-12-16 20:22               ` Shuah Khan
2021-12-17  1:03                 ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAADnVQ+Fnn-NuGoLq1ZYbHM=kR_W01GB1DCFOnQTHhgfDOrnaA@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).