summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-03-23 20:44:27 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:52:28 +0200
commitd018d551e7b23b6ab8e1faf95fc6409a0232c53b (patch)
tree6b8394c5da0cd4dbad3be11c25a9602aea5b8181 /tools
parentfaace30e6e6a8f1b93532938351c7e06dd6759e7 (diff)
downloadlinux-exynos-d018d551e7b23b6ab8e1faf95fc6409a0232c53b.tar.gz
linux-exynos-d018d551e7b23b6ab8e1faf95fc6409a0232c53b.tar.bz2
linux-exynos-d018d551e7b23b6ab8e1faf95fc6409a0232c53b.zip
selftests: Print the test we're running to /dev/kmsg
[ Upstream commit 88893cf787d3062c631cc20b875068eb11756e03 ] Some tests cause the kernel to print things to the kernel log buffer (ie. printk), in particular oops and warnings etc. However when running all the tests in succession it's not always obvious which test(s) caused the kernel to print something. We can narrow it down by printing which test directory we're running in to /dev/kmsg, if it's writable. Example output: [ 170.149149] kselftest: Running tests in powerpc [ 305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left [ 808.915456] kselftest: Running tests in pstore Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 3c9c0bbe7dbb..ea300e7818a7 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -122,6 +122,7 @@ ifdef INSTALL_PATH
BUILD_TARGET=$$BUILD/$$TARGET; \
echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
echo "echo ========================================" >> $(ALL_SCRIPT); \
+ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
echo "cd $$TARGET" >> $(ALL_SCRIPT); \
make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
echo "cd \$$ROOT" >> $(ALL_SCRIPT); \