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


Groups > linux.kernel > #1731064 > unrolled thread

[PATCH 4.13 13/27] selftests: timers: Fix run_destructive_tests target to handle skipped tests

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-09-12 19:10 +0200
Last post2017-09-12 19:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.13 13/27] selftests: timers: Fix run_destructive_tests target to handle skipped tests Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-09-12 19:10 +0200

#1731064 — [PATCH 4.13 13/27] selftests: timers: Fix run_destructive_tests target to handle skipped tests

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-09-12 19:10 +0200
Subject[PATCH 4.13 13/27] selftests: timers: Fix run_destructive_tests target to handle skipped tests
Message-ID<uoWRf-43L-77@gated-at.bofh.it>
4.13-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuah Khan <shuahkh@osg.samsung.com>

commit df9c011c0a23cf1399c01f896cd359d932ab49b5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/testing/selftests/timers/Makefile |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -14,20 +14,20 @@ TEST_GEN_PROGS_EXTENDED = alarmtimer-sus
 
 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)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web