Skip to content

Commit

Permalink
selftests: timers: Fix run_destructive_tests target to handle skipped…
Browse files Browse the repository at this point in the history
… tests

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.

Cc: stable <stable@vger.kernel.org> [4.13+]
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  • Loading branch information
Shuah Khan committed Aug 22, 2017
1 parent 98b74e1 commit df9c011
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tools/testing/selftests/timers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit df9c011

Please sign in to comment.