From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbdHVRmC (ORCPT ); Tue, 22 Aug 2017 13:42:02 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:55182 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbdHVRl7 (ORCPT ); Tue, 22 Aug 2017 13:41:59 -0400 Reply-To: shuah@kernel.org Subject: Re: [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests To: John Stultz , Shuah Khan Cc: Thomas Gleixner , Stephen Boyd , lkml , linux-kselftest@vger.kernel.org, Shuah Khan , Shuah Khan References: <20170817224845.29630-1-shuahkh@osg.samsung.com> From: Shuah Khan Message-ID: Date: Tue, 22 Aug 2017 11:41:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/18/2017 04:13 PM, John Stultz wrote: > On Thu, Aug 17, 2017 at 3:48 PM, Shuah Khan 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 >> Signed-off-by: Shuah Khan >> --- >> 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