[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZGK+SN1EPudi=tt8ppN58ovW8o+=JMd8rhEgr4KBnSmw@mail.gmail.com>
Date: Mon, 10 Jun 2019 11:05:28 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Hechao Li <hechaol@...com>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v1 bpf-next] selftests/bpf : Clean up feature/ when make clean
On Mon, Jun 10, 2019 at 9:57 AM Hechao Li <hechaol@...com> wrote:
>
> I got an error when compiling selftests/bpf:
>
> libbpf.c:411:10: error: implicit declaration of function 'reallocarray';
> did you mean 'realloc'? [-Werror=implicit-function-declaration]
> progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0]));
>
> It was caused by feature-reallocarray=1 in FEATURE-DUMP.libbpf and it
> was fixed by manually removing feature/ folder. This diff adds feature/
> to EXTRA_CLEAN to avoid this problem.
>
> Signed-off-by: Hechao Li <hechaol@...com>
> ---
There is no need to include v1 into patch prefix for a first version
of a patch. Only v2 and further versions are added.
> tools/testing/selftests/bpf/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 2b426ae1cdc9..44fb61f4d502 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -279,4 +279,5 @@ $(OUTPUT)/verifier/tests.h: $(VERIFIER_TESTS_DIR) $(VERIFIER_TEST_FILES)
> ) > $(VERIFIER_TESTS_H))
>
> EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(ALU32_BUILD_DIR) \
> - $(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H)
> + $(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H) \
> + feature
It doesn't seem any of linux's Makefile do that. From brief reading of
build/Makefile.feature, it seems like it is supposed to handle
transparently the case where environment changes and thus a set of
supported features changes. I also verified that FEATURE-DUMP.libbpf
is re-generated every single time I run make in
tools/testing/selftests/bpf, even if nothing changed at all. So I
don't think this patch is necessary.
I'm not sure what was the cause of your original problem, though.
> --
> 2.17.1
>
Powered by blists - more mailing lists