Skip to content

Commit 2a2dfc8

Browse files
Joe Fradleyshuahkh
authored andcommitted
tools: Add new "test" taint to kernel-chktaint
Commit c272612 ("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 <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Joe Fradley <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 793f55b commit 2a2dfc8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/debugging/kernel-chktaint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ else
187187
echo " * auxiliary taint, defined for and used by distros (#16)"
188188

189189
fi
190+
190191
T=`expr $T / 2`
191192
if [ `expr $T % 2` -eq 0 ]; then
192193
addout " "
@@ -195,6 +196,14 @@ else
195196
echo " * kernel was built with the struct randomization plugin (#17)"
196197
fi
197198

199+
T=`expr $T / 2`
200+
if [ `expr $T % 2` -eq 0 ]; then
201+
addout " "
202+
else
203+
addout "N"
204+
echo " * an in-kernel test (such as a KUnit test) has been run (#18)"
205+
fi
206+
198207
echo "For a more detailed explanation of the various taint flags see"
199208
echo " Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources"
200209
echo " or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html"

0 commit comments

Comments
 (0)