diff mbox series

[nft] tests: shell: Include kernel taint value in warning

Message ID 20250509125321.21336-1-phil@nwl.cc
State New
Headers show
Series [nft] tests: shell: Include kernel taint value in warning | expand

Commit Message

Phil Sutter May 9, 2025, 12:53 p.m. UTC
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.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tests/shell/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 6a9b518c3aed5..2d2e0ad146c80 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -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