summaryrefslogtreecommitdiffstats
path: root/tools/debugging
diff options
context:
space:
mode:
authorJoe Fradley <joefradley@google.com>2022-08-23 21:19:33 -0700
committerShuah Khan <skhan@linuxfoundation.org>2022-09-07 14:51:12 -0600
commit2a2dfc869d3345ccdd91322b023f4b0da84acbe7 (patch)
treefd0f143a37c3020073d60c009496d44851cbc14d /tools/debugging
parent793f55b2971e3a95d77ad08e9da2a3dc6c946cd7 (diff)
downloadlinux-stable-2a2dfc869d3345ccdd91322b023f4b0da84acbe7.tar.gz
linux-stable-2a2dfc869d3345ccdd91322b023f4b0da84acbe7.tar.bz2
linux-stable-2a2dfc869d3345ccdd91322b023f4b0da84acbe7.zip
tools: Add new "test" taint to kernel-chktaint
Commit c272612cb4a2 ("kunit: Taint the kernel when KUnit tests are run") added a new taint flag for when in-kernel tests run. This commit adds recognition of this new flag in kernel-chktaint. With this change the correct reason will be reported if the kernel is tainted because of a test run. Amended Commit log: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Joe Fradley <joefradley@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/debugging')
-rwxr-xr-xtools/debugging/kernel-chktaint9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
index f1af27ce9f20..279be06332be 100755
--- a/tools/debugging/kernel-chktaint
+++ b/tools/debugging/kernel-chktaint
@@ -187,6 +187,7 @@ else
echo " * auxiliary taint, defined for and used by distros (#16)"
fi
+
T=`expr $T / 2`
if [ `expr $T % 2` -eq 0 ]; then
addout " "
@@ -195,6 +196,14 @@ else
echo " * kernel was built with the struct randomization plugin (#17)"
fi
+T=`expr $T / 2`
+if [ `expr $T % 2` -eq 0 ]; then
+ addout " "
+else
+ addout "N"
+ echo " * an in-kernel test (such as a KUnit test) has been run (#18)"
+fi
+
echo "For a more detailed explanation of the various taint flags see"
echo " Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources"
echo " or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html"