All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests
@ 2017-08-17 22:48 Shuah Khan
  2017-08-18 22:13 ` John Stultz
  2017-08-19  0:36 ` John Stultz
  0 siblings, 2 replies; 9+ messages in thread
From: Shuah Khan @ 2017-08-17 22:48 UTC (permalink / raw)
  To: john.stultz, shuah; +Cc: Shuah Khan, tglx, sboyd, linux-kernel, linux-kselftest

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
-	./leapcrash
-	./set-tz
-	./set-tai
-	./set-2038
-
+	$(RUN_DESTRUCTIVE_TESTS)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-22 17:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 22:48 [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests Shuah Khan
2017-08-18 22:13 ` John Stultz
2017-08-18 22:24   ` Shuah Khan
2017-08-18 23:23     ` [RFC][PATCH] kselftests: timers: leap-a-day: Change default arguments to help test runs John Stultz
2017-08-22 17:44       ` Shuah Khan
2017-08-22 17:41   ` [PATCH] selftests: timers: Fix run_destructive_tests target to handle skipped tests Shuah Khan
2017-08-19  0:36 ` John Stultz
2017-08-20 13:08   ` Benjamin Gaignard
2017-08-22 14:42     ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.