From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Shuah Khan <shuah@kernel.org>
Cc: Jiri Benc <jbenc@redhat.com>, Jiri Olsa <jolsa@redhat.com>,
Shuah Khan <shuah@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH v2 1/3] selftests: do not use .ONESHELL
Date: Tue, 19 May 2020 10:44:32 +0300 [thread overview]
Message-ID: <xunyftbwnzbz.fsf@redhat.com> (raw)
In-Reply-To: <20200515120026.113278-2-yauheni.kaliuta@redhat.com> (Yauheni Kaliuta's message of "Fri, 15 May 2020 15:00:24 +0300")
Hi, Shuah!
Any comment on that? The patch is ACKes by Jiri already.
>>>>> On Fri, 15 May 2020 15:00:24 +0300, Yauheni Kaliuta wrote:
> Using one shell for the whole recipe with long lists can cause
> make[1]: execvp: /bin/sh: Argument list too long
> with some shells. Triggered by commit 309b81f0fdc4 ("selftests/bpf:
> Install generated test progs")
> It requires to change the rule which rely on the one shell
> behaviour (run_tests).
> Simplify also INSTALL_SINGLE_RULE, remove extra echo, required to
> workaround .ONESHELL.
> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
> Cc: Jiri Benc <jbenc@redhat.com>
> Cc: Shuah Khan <shuah@kernel.org>
> ---
> tools/testing/selftests/lib.mk | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index b0556c752443..5b82433d88e3 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -59,9 +59,8 @@ else
> all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
> endif
> -.ONESHELL:
> define RUN_TESTS
> - @BASE_DIR="$(selfdir)"; \
> + BASE_DIR="$(selfdir)"; \
> . $(selfdir)/kselftest/runner.sh; \
> if [ "X$(summary)" != "X" ]; then \
> per_test_logging=1; \
> @@ -71,22 +70,21 @@ endef
> run_tests: all
> ifdef building_out_of_srctree
> - @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then
> - @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT)
> + @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then \
> + rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
> fi
> - @if [ "X$(TEST_PROGS)" != "X" ]; then
> - $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(OUTPUT)/$(TEST_PROGS))
> - else
> - $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS))
> + @if [ "X$(TEST_PROGS)" != "X" ]; then \
> + $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(OUTPUT)/$(TEST_PROGS)) ; \
> + else \
> + $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS)); \
> fi
> else
> - $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS))
> + @$(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS))
> endif
> define INSTALL_SINGLE_RULE
> $(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH))
> - $(if $(INSTALL_LIST),@echo rsync -a $(INSTALL_LIST) $(INSTALL_PATH)/)
> - $(if $(INSTALL_LIST),@rsync -a $(INSTALL_LIST) $(INSTALL_PATH)/)
> + $(if $(INSTALL_LIST),rsync -a $(INSTALL_LIST) $(INSTALL_PATH)/)
> endef
> define INSTALL_RULE
> --
> 2.26.2
--
WBR,
Yauheni Kaliuta
next prev parent reply other threads:[~2020-05-19 7:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 12:00 [PATCH v2 0/3] selftests: lib.mk improvements Yauheni Kaliuta
2020-05-15 12:00 ` [PATCH v2 1/3] selftests: do not use .ONESHELL Yauheni Kaliuta
2020-05-15 12:40 ` Jiri Benc
2020-05-19 7:44 ` Yauheni Kaliuta [this message]
2020-05-15 12:00 ` [PATCH v2 2/3] selftests: fix condition in run_tests Yauheni Kaliuta
2020-05-15 12:40 ` Jiri Benc
2020-05-15 12:00 ` [PATCH v2 3/3] selftests: simplify run_tests Yauheni Kaliuta
2020-05-19 13:59 ` [PATCH v2 0/3] selftests: lib.mk improvements shuah
2020-05-19 14:49 ` Yauheni Kaliuta
2020-05-22 15:09 ` shuah
2020-05-22 15:38 ` Yauheni Kaliuta
2020-05-26 17:18 ` shuah
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=xunyftbwnzbz.fsf@redhat.com \
--to=yauheni.kaliuta@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jbenc@redhat.com \
--cc=jolsa@redhat.com \
--cc=shuah@kernel.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.