From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbdHTNIE (ORCPT ); Sun, 20 Aug 2017 09:08:04 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:33954 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752844AbdHTNIC (ORCPT ); Sun, 20 Aug 2017 09:08:02 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170817224845.29630-1-shuahkh@osg.samsung.com> From: Benjamin Gaignard Date: Sun, 20 Aug 2017 15:08:01 +0200 Message-ID: Subject: Re: [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests To: John Stultz Cc: Shuah Khan , Shuah Khan , Thomas Gleixner , Stephen Boyd , lkml , linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7KD8DwE008915 2017-08-19 2:36 GMT+02:00 John Stultz : > 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 > > One more on this... you might remove rtctest_setdate from the > TEST_GEN_PROGS_EXTENDED list, since it too requires arguments to test, > and it wasn't a part of run_destructive_tests previously. > > I see Benjamin added this test not long ago, but I'm not sure exactly > how he expects it to be run (just manually?). Yes run this test manually is enough > > thanks > -john -- Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog