From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>, bpf <bpf@vger.kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: restore $(OUTPUT)/test_stub.o rule
Date: Fri, 25 Oct 2019 14:01:40 -0700 [thread overview]
Message-ID: <CAEf4BzZJ4XAOd-9ZYqD-XwBfidFdKnwcqcUu9EjkZuv8bOE5JA@mail.gmail.com> (raw)
In-Reply-To: <20191024184205.1798-1-iii@linux.ibm.com>
On Fri, Oct 25, 2019 at 11:54 AM Ilya Leoshkevich <iii@linux.ibm.com> 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@linux.ibm.com>
> ---
> 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@fb.com>
> +
> BPFOBJ := $(OUTPUT)/libbpf.a
>
> $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ)
> --
> 2.23.0
>
next prev parent reply other threads:[~2019-10-25 21:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 18:42 [PATCH bpf-next] selftests/bpf: restore $(OUTPUT)/test_stub.o rule Ilya Leoshkevich
2019-10-25 21:01 ` Andrii Nakryiko [this message]
2019-10-25 21:39 ` Daniel Borkmann
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=CAEf4BzZJ4XAOd-9ZYqD-XwBfidFdKnwcqcUu9EjkZuv8bOE5JA@mail.gmail.com \
--to=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=iii@linux.ibm.com \
/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).