Skip to contentSkip to conversation

tools: Add new "test" taint to kernel-chktaint

PATCH Superseded Joe Fradley 2 participants 2 messages Aug 15, 2022 – Aug 16, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tools/debugging/kernel-chktaint | 9 +++++++++
 1 file changed, 9 insertions(+)
tools/debugging/kernel-chktaint +9 -0
index f1af27ce9f20..279be06332be 100755
@@ -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"
Signature · 1 line
2.37.1.595.g718a3a8f04-goog