Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1717620

Re: [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests

From Shuah Khan <shuah@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests
Date 2017-08-22 19:50 +0200
Message-ID <uhltn-5B5-7@gated-at.bofh.it> (permalink)
References <ufBLX-2Sn-1@gated-at.bofh.it> <ufXMt-1mk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/18/2017 04:13 PM, John Stultz wrote:
> On Thu, Aug 17, 2017 at 3:48 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
>> When a test exits with skip exit code of 4, "make run_destructive_tests"
>> halts testing. Fix run_destructive_tests target to handle error exit codes.
>>
>> Reported-by: John Stultz <john.stultz@linaro.org>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  tools/testing/selftests/timers/Makefile | 26 +++++++++++++-------------
>>  1 file changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
>> index c805ab048d26..6c1327278d5f 100644
>> --- a/tools/testing/selftests/timers/Makefile
>> +++ b/tools/testing/selftests/timers/Makefile
>> @@ -13,20 +13,20 @@ TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew
>>
>>  include ../lib.mk
>>
>> +define RUN_DESTRUCTIVE_TESTS
>> +       @for TEST in $(TEST_GEN_PROGS_EXTENDED); do \
>> +               BASENAME_TEST=`basename $$TEST`;        \
>> +               if [ ! -x $$BASENAME_TEST ]; then       \
>> +                       echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\
>> +                       echo "selftests: $$BASENAME_TEST [FAIL]"; \
>> +               else                                    \
>> +                       cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests:  $$BASENAME_TEST [FAIL]"; cd -;\
>> +               fi;                                     \
>> +       done;
>> +endef
>> +
>>  # these tests require escalated privileges
>>  # and may modify the system time or trigger
>>  # other behavior like suspend
>>  run_destructive_tests: run_tests
>> -       ./alarmtimer-suspend
>> -       ./valid-adjtimex
>> -       ./adjtick
>> -       ./change_skew
>> -       ./skew_consistency
>> -       ./clocksource-switch
>> -       ./freq-step
>> -       ./leap-a-day -s -i 10
> 
> 
> So this resolves the issue with tests returning skipped, but we'll
> need to change the leap-a-day test to default to the specified
> arguments above, as it runs indefinitely w/o arguments. Thus with the
> patch above, make run_destructive_tests never completes.
> 
> I'll scratch a patch out to make the change in defaults.
> 
Applied the patch to linux=kselftest for 4.14-rc1 after applying
the leap-a-day test default args change patch. Both are marked for
stable 4.13+

thanks,
-- Shuah

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-18 00:50 +0200
  Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests John Stultz <john.stultz@linaro.org> - 2017-08-19 00:20 +0200
    Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests Shuah Khan <shuah@kernel.org> - 2017-08-19 00:30 +0200
      [RFC][PATCH] kselftests: timers: leap-a-day: Change default arguments to help test runs John Stultz <john.stultz@linaro.org> - 2017-08-19 01:30 +0200
        Re: [RFC][PATCH] kselftests: timers: leap-a-day: Change default  arguments to help test runs Shuah Khan <shuah@kernel.org> - 2017-08-22 19:50 +0200
    Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests Shuah Khan <shuah@kernel.org> - 2017-08-22 19:50 +0200
  Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests John Stultz <john.stultz@linaro.org> - 2017-08-19 02:40 +0200
    Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2017-08-20 15:10 +0200
      Re: [PATCH] selftests: timers: Fix run_destructive_tests target to  handle skipped tests Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-22 16:50 +0200

csiph-web