archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <>
To: Shuah Khan <>
	Heiko Carstens <>,
	Vasily Gorbik <>,
	Ilya Leoshkevich <>
Subject: [PATCH RESEND v3 2/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS)
Date: Thu, 24 Oct 2019 14:13:47 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Currently the following command fails:

    linux# make kselftest TARGETS=bpf O=/mnt/linux-build
    # selftests: bpf:
    # ./ line 23: ./test_libbpf_open: No such file or directory
    # test_libbpf: failed at file test_l4lb.o
    # selftests: test_libbpf [FAILED]

The current logic prepends $(OUTPUT) only to the first member of
$(TEST_PROGS). After that, run_one() does

   cd `dirname $TEST`

For all tests except the first one, `dirname $TEST` is ., which means
they cannot access the files generated in $(OUTPUT).

Fix by using $(addprefix) to prepend $(OUTPUT) to each member of

Fixes: 1a940687e424 ("selftests: copy test scripts and test files for make O=dir run")
Signed-off-by: Ilya Leoshkevich <>
 tools/testing/selftests/ | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ b/tools/testing/selftests/
index 1c8a1963d03f..27a97a1b4e9e 100644
--- a/tools/testing/selftests/
+++ b/tools/testing/selftests/
@@ -75,7 +75,8 @@ ifdef building_out_of_srctree
 	@if [ "X$(TEST_PROGS)" != "X" ]; then
+				  $(addprefix $(OUTPUT),$(TEST_PROGS)))

  parent reply	other threads:[~2019-10-24 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 12:13 [PATCH RESEND v3 0/2] " Ilya Leoshkevich
2019-10-24 12:13 ` [PATCH RESEND v3 1/2] selftests: append / to $(OUTPUT) Ilya Leoshkevich
2019-10-24 12:13 ` Ilya Leoshkevich [this message]
2019-11-07 22:52 ` [PATCH RESEND v3 0/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS) shuah
2019-11-08 12:31   ` Ilya Leoshkevich

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:

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

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH RESEND v3 2/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS)' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).