public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: Add new "test" taint to kernel-chktaint
@ 2022-08-15 17:41 Joe Fradley
  2022-08-16  4:28 ` David Gow
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Fradley @ 2022-08-15 17:41 UTC (permalink / raw)
  To: corbet, david.gow; +Cc: kernel-team, linux-kernel, Joe Fradley

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.

Signed-off-by: Joe Fradley <joefradley@google.com>
---
 tools/debugging/kernel-chktaint | 9 +++++++++
 1 file changed, 9 insertions(+)

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"
-- 
2.37.1.595.g718a3a8f04-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools: Add new "test" taint to kernel-chktaint
  2022-08-15 17:41 [PATCH] tools: Add new "test" taint to kernel-chktaint Joe Fradley
@ 2022-08-16  4:28 ` David Gow
  0 siblings, 0 replies; 2+ messages in thread
From: David Gow @ 2022-08-16  4:28 UTC (permalink / raw)
  To: joefradley; +Cc: corbet, kunit-dev, kernel-team, linux-kernel, David Gow

Thanks! This looks good to me!

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-16  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-15 17:41 [PATCH] tools: Add new "test" taint to kernel-chktaint Joe Fradley
2022-08-16  4:28 ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox