Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: Install settings files to fix TIMEOUT failures

Commit 852c8cbf34d3 ("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 b43e78f65b1d ("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: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Michael Ellerman and committed by
Shuah Khan
b9167c80 68ca0fd2

+9 -1
+1 -1
tools/testing/selftests/ftrace/Makefile
··· 2 2 all: 3 3 4 4 TEST_PROGS := ftracetest 5 - TEST_FILES := test.d 5 + TEST_FILES := test.d settings 6 6 EXTRA_CLEAN := $(OUTPUT)/logs/* 7 7 8 8 include ../lib.mk
+2
tools/testing/selftests/livepatch/Makefile
··· 8 8 test-state.sh \ 9 9 test-ftrace.sh 10 10 11 + TEST_FILES := settings 12 + 11 13 include ../lib.mk
+2
tools/testing/selftests/net/mptcp/Makefile
··· 8 8 9 9 TEST_GEN_FILES = mptcp_connect 10 10 11 + TEST_FILES := settings 12 + 11 13 EXTRA_CLEAN := *.pcap 12 14 13 15 include ../../lib.mk
+2
tools/testing/selftests/rseq/Makefile
··· 19 19 20 20 TEST_PROGS = run_param_test.sh 21 21 22 + TEST_FILES := settings 23 + 22 24 include ../lib.mk 23 25 24 26 $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h
+2
tools/testing/selftests/rtc/Makefile
··· 6 6 7 7 TEST_GEN_PROGS_EXTENDED = setdate 8 8 9 + TEST_FILES := settings 10 + 9 11 include ../lib.mk