Re: [PATCH bpf-next] selftests/bpf: restore $(OUTPUT)/test_stub.o rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25, 2019 at 11:54 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote:
>
> `make O=/linux-build kselftest TARGETS=bpf` fails with
>
>         make[3]: *** No rule to make target '/linux-build/bpf/test_stub.o', needed by '/linux-build/bpf/test_verifier'
>
> The same command without the O= part works, presumably thanks to the
> implicit rule.
>
> Fix by restoring the explicit $(OUTPUT)/test_stub.o rule.
>
> Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule")
> Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
> ---
>  tools/testing/selftests/bpf/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 59b93a5667c8..9d63a12f932b 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -89,6 +89,9 @@ $(notdir $(TEST_GEN_PROGS)                                            \
>  $(OUTPUT)/urandom_read: urandom_read.c
>         $(CC) -o $@ $< -Wl,--build-id
>
> +$(OUTPUT)/test_stub.o: test_stub.c
> +       $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

Looks good to me, even though we never pass $(CPPFLAGS) to any other
objects, so for consistency we might want to drop them.

But either way:

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

> +
>  BPFOBJ := $(OUTPUT)/libbpf.a
>
>  $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ)
> --
> 2.23.0
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux