linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linux-kselftest@vger.kernel.org
Cc: skhan@linuxfoundation.org, keescook@chromium.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: Install settings files to fix TIMEOUT failures
Date: Thu, 20 Feb 2020 17:25:30 -0500	[thread overview]
Message-ID: <85385291-b039-c72d-508a-0b988c1302b5@redhat.com> (raw)
In-Reply-To: <20200220044241.2878-1-mpe@ellerman.id.au>

On 2/19/20 11:42 PM, Michael Ellerman wrote:
> Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second
> timeout per test") added a 45 second timeout for tests, and also added
> a way for tests to customise the timeout via a settings file.
> 
> For example the ftrace tests take multiple minutes to run, so they
> were given longer in commit b43e78f65b1d ("tracing/selftests: Turn off
> timeout setting").
> 
> This works when the tests are run from the source tree. However if the
> tests are installed with "make -C tools/testing/selftests install",
> the settings files are not copied into the install directory. When the
> tests are then run from the install directory the longer timeouts are
> not applied and the tests timeout incorrectly.
> 
> So add the settings files to TEST_FILES of the appropriate Makefiles
> to cause the settings files to be installed using the existing install
> logic.
> 
> Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>   tools/testing/selftests/ftrace/Makefile    | 2 +-
>   tools/testing/selftests/livepatch/Makefile | 2 ++
>   tools/testing/selftests/net/mptcp/Makefile | 2 ++
>   tools/testing/selftests/rseq/Makefile      | 2 ++
>   tools/testing/selftests/rtc/Makefile       | 2 ++
>   5 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
> index cd1f5b3a7774..d6e106fbce11 100644
> --- a/tools/testing/selftests/ftrace/Makefile
> +++ b/tools/testing/selftests/ftrace/Makefile
> @@ -2,7 +2,7 @@
>   all:
>   
>   TEST_PROGS := ftracetest
> -TEST_FILES := test.d
> +TEST_FILES := test.d settings
>   EXTRA_CLEAN := $(OUTPUT)/logs/*
>   
>   include ../lib.mk
> diff --git a/tools/testing/selftests/livepatch/Makefile b/tools/testing/selftests/livepatch/Makefile
> index 3876d8d62494..1acc9e1fa3fb 100644
> --- a/tools/testing/selftests/livepatch/Makefile
> +++ b/tools/testing/selftests/livepatch/Makefile
> @@ -8,4 +8,6 @@ TEST_PROGS := \
>   	test-state.sh \
>   	test-ftrace.sh
>   
> +TEST_FILES := settings
> +
>   include ../lib.mk
> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
> index 93de52016dde..ba450e62dc5b 100644
> --- a/tools/testing/selftests/net/mptcp/Makefile
> +++ b/tools/testing/selftests/net/mptcp/Makefile
> @@ -8,6 +8,8 @@ TEST_PROGS := mptcp_connect.sh
>   
>   TEST_GEN_FILES = mptcp_connect
>   
> +TEST_FILES := settings
> +
>   EXTRA_CLEAN := *.pcap
>   
>   include ../../lib.mk
> diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile
> index d6469535630a..f1053630bb6f 100644
> --- a/tools/testing/selftests/rseq/Makefile
> +++ b/tools/testing/selftests/rseq/Makefile
> @@ -19,6 +19,8 @@ TEST_GEN_PROGS_EXTENDED = librseq.so
>   
>   TEST_PROGS = run_param_test.sh
>   
> +TEST_FILES := settings
> +
>   include ../lib.mk
>   
>   $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h
> diff --git a/tools/testing/selftests/rtc/Makefile b/tools/testing/selftests/rtc/Makefile
> index de9c8566672a..90fa1a346908 100644
> --- a/tools/testing/selftests/rtc/Makefile
> +++ b/tools/testing/selftests/rtc/Makefile
> @@ -6,4 +6,6 @@ TEST_GEN_PROGS = rtctest
>   
>   TEST_GEN_PROGS_EXTENDED = setdate
>   
> +TEST_FILES := settings
> +
>   include ../lib.mk
> 

Looks good to me,

Acked-by: Joe Lawrence <joe.lawrence@redhat.com>

-- Joe


  reply	other threads:[~2020-02-20 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  4:42 [PATCH] selftests: Install settings files to fix TIMEOUT failures Michael Ellerman
2020-02-20 22:25 ` Joe Lawrence [this message]
2020-02-20 22:43   ` Shuah Khan
2020-02-20 22:51 ` Kees Cook
2020-02-20 22:54   ` Shuah Khan
2020-02-21  5:12     ` Michael Ellerman
2020-02-21 15:19       ` Shuah Khan

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=85385291-b039-c72d-508a-0b988c1302b5@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --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 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).