Skip to content

Commit

Permalink
selftests: Install settings files to fix TIMEOUT failures
Browse files Browse the repository at this point in the history
Commit 852c8cb ("selftests/kselftest/runner.sh: Add 45 second
timeout per test") added a 45 second timeout for tests, and also added
a way for tests to customise the timeout via a settings file.

For example the ftrace tests take multiple minutes to run, so they
were given longer in commit b43e78f ("tracing/selftests: Turn off
timeout setting").

This works when the tests are run from the source tree. However if the
tests are installed with "make -C tools/testing/selftests install",
the settings files are not copied into the install directory. When the
tests are then run from the install directory the longer timeouts are
not applied and the tests timeout incorrectly.

So add the settings files to TEST_FILES of the appropriate Makefiles
to cause the settings files to be installed using the existing install
logic.

Fixes: 852c8cb ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
mpe authored and shuahkh committed Feb 20, 2020
1 parent 68ca0fd commit b9167c8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/ftrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
all:

TEST_PROGS := ftracetest
TEST_FILES := test.d
TEST_FILES := test.d settings
EXTRA_CLEAN := $(OUTPUT)/logs/*

include ../lib.mk
2 changes: 2 additions & 0 deletions tools/testing/selftests/livepatch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ TEST_PROGS := \
test-state.sh \
test-ftrace.sh

TEST_FILES := settings

include ../lib.mk
2 changes: 2 additions & 0 deletions tools/testing/selftests/net/mptcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ TEST_PROGS := mptcp_connect.sh

TEST_GEN_FILES = mptcp_connect

TEST_FILES := settings

EXTRA_CLEAN := *.pcap

include ../../lib.mk
2 changes: 2 additions & 0 deletions tools/testing/selftests/rseq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ TEST_GEN_PROGS_EXTENDED = librseq.so

TEST_PROGS = run_param_test.sh

TEST_FILES := settings

include ../lib.mk

$(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h
Expand Down
2 changes: 2 additions & 0 deletions tools/testing/selftests/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ TEST_GEN_PROGS = rtctest

TEST_GEN_PROGS_EXTENDED = setdate

TEST_FILES := settings

include ../lib.mk

0 comments on commit b9167c8

Please sign in to comment.