Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Fradley and committed by
Shuah Khan
2a2dfc86 793f55b2

+9
+9
tools/debugging/kernel-chktaint
··· 187 187 echo " * auxiliary taint, defined for and used by distros (#16)" 188 188 189 189 fi 190 + 190 191 T=`expr $T / 2` 191 192 if [ `expr $T % 2` -eq 0 ]; then 192 193 addout " " 193 194 else 194 195 addout "T" 195 196 echo " * kernel was built with the struct randomization plugin (#17)" 197 + fi 198 + 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)" 196 205 fi 197 206 198 207 echo "For a more detailed explanation of the various taint flags see"