selftests: Install settings files to fix TIMEOUT failures
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Feb 2020 04:42:41 +0000 (15:42 +1100)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 20 Feb 2020 15:56:42 +0000 (08:56 -0700)
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>
tools/testing/selftests/ftrace/Makefile
tools/testing/selftests/livepatch/Makefile
tools/testing/selftests/net/mptcp/Makefile
tools/testing/selftests/rseq/Makefile
tools/testing/selftests/rtc/Makefile

index cd1f5b3a777461b89b25c9783d54aeadcc4d66d0..d6e106fbce11c7706e061cf23a920b8d0cb03459 100644 (file)
@@ -2,7 +2,7 @@
 all:
 
 TEST_PROGS := ftracetest
-TEST_FILES := test.d
+TEST_FILES := test.d settings
 EXTRA_CLEAN := $(OUTPUT)/logs/*
 
 include ../lib.mk
index 3876d8d62494443297b0da55cb88bbe5f2da5210..1acc9e1fa3fbca78db5fca858f01c042a2fe62ff 100644 (file)
@@ -8,4 +8,6 @@ TEST_PROGS := \
        test-state.sh \
        test-ftrace.sh
 
+TEST_FILES := settings
+
 include ../lib.mk
index 93de52016ddee400e64ae3ed9eceac8a3b10834b..ba450e62dc5be5e5bccd5f36753ca81c1a74dff7 100644 (file)
@@ -8,6 +8,8 @@ TEST_PROGS := mptcp_connect.sh
 
 TEST_GEN_FILES = mptcp_connect
 
+TEST_FILES := settings
+
 EXTRA_CLEAN := *.pcap
 
 include ../../lib.mk
index d6469535630af888051a9c50e8059a8a2abfac8a..f1053630bb6f5603d2313bab763f5149baf00fe4 100644 (file)
@@ -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
index 2d93d65723c94bd6f49ddce43fd93c47d6488d1e..55198ecc04dbea93c4fb358ebac715527e2755d4 100644 (file)
@@ -6,4 +6,6 @@ TEST_GEN_PROGS = rtctest
 
 TEST_GEN_PROGS_EXTENDED = setdate
 
+TEST_FILES := settings
+
 include ../lib.mk