All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, keescook@chromium.org
Subject: [PATCH] selftests/exec: Fix building of exec test
Date: Wed,  4 Nov 2020 21:07:06 +1100	[thread overview]
Message-ID: <20201104100706.659089-1-mpe@ellerman.id.au> (raw)

Currently the exec test does not build:

  make[1]: Entering directory '/linux/tools/testing/selftests/exec'
  ...
  make[1]: *** No rule to make target '/output/kselftest/exec/pipe', needed by 'all'.

This is because pipe is listed in TEST_GEN_FILES, but pipe is not
generated by the Makefile, it's created at runtime. So drop pipe from
TEST_GEN_FILES.

With that fixed, then install fails:

  make[1]: Entering directory '/linux/tools/testing/selftests/exec'
  rsync -a binfmt_script non-regular /output/install/exec/
  rsync: link_stat "/linux/tools/testing/selftests/exec/non-regular" failed: No such file or directory (2)

That's because non-regular hasn't been built, because it's in
TEST_PROGS, it should be part of TEST_GEN_PROGS to indicate that it
needs to be built.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 tools/testing/selftests/exec/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index cf69b2fcce59..a1e8a7abf576 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -3,9 +3,9 @@ CFLAGS = -Wall
 CFLAGS += -Wno-nonnull
 CFLAGS += -D_GNU_SOURCE
 
-TEST_PROGS := binfmt_script non-regular
-TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
-TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir pipe
+TEST_PROGS := binfmt_script
+TEST_GEN_PROGS := execveat non-regular load_address_4096 load_address_2097152 load_address_16777216
+TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
 # Makefile is a run-time dependency, since it's accessed by the execveat test
 TEST_FILES := Makefile
 

base-commit: cf7cd542d1b538f6e9e83490bc090dd773f4266d
-- 
2.25.1


             reply	other threads:[~2020-11-04 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 10:07 Michael Ellerman [this message]
2020-11-04 19:07 ` [PATCH] selftests/exec: Fix building of exec test Kees Cook

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=20201104100706.659089-1-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.