Skip to contentSkip to conversation

tests: shell: Include kernel taint value in warning

PATCH In review Phil Sutter 1 participant 2 messages May 9, 2025 – May 16, 2025 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: shell: Include kernel taint value in warning

If kernel is already tainted, not all tests yield usable results. Printing the taint cause might help users tracking down the external cause.

If a test taints the kernel, the value is stored in rc-failed-tainted file already.

---
 tests/shell/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shell/run-tests.sh +1 -1
index 6a9b518c3aed5..2d2e0ad146c80 100755
@@ -784,7 +784,7 @@ check_kmemleak()
 
 read kernel_tainted < /proc/sys/kernel/tainted
 if [ "$kernel_tainted" -ne 0 ] ; then
-	msg_warn "kernel is tainted"
+	msg_warn "kernel is tainted ($kernel_tainted)"
 	echo
 fi
 
Signature · 1 line
2.49.0
author reviewer
#1 lore raw
Quoted 8 lines · Phil Sutter

If kernel is already tainted, not all tests yield usable results. Printing the taint cause might help users tracking down the external cause.

If a test taints the kernel, the value is stored in rc-failed-tainted file already.

Patch applied.