lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3965bbe-973a-ddc2-044d-4a79864710a9@linuxfoundation.org>
Date:   Thu, 20 Feb 2020 15:43:29 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Joe Lawrence <joe.lawrence@...hat.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        linux-kselftest@...r.kernel.org
Cc:     keescook@...omium.org, linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests: Install settings files to fix TIMEOUT failures

On 2/20/20 3:25 PM, Joe Lawrence wrote:
> 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@...erman.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@...hat.com>
> 

Thanks for Ack. I already applied it to kselftest fixes branch.

https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=fixes

thanks,
-- Shuah



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ