]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: Include kernel taint value in warning
authorPhil Sutter <phil@nwl.cc>
Fri, 9 May 2025 12:46:50 +0000 (14:46 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 16 May 2025 18:11:55 +0000 (20:11 +0200)
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

index 6a9b518c3aed5114edefb0e624a9dbf0574a9deb..2d2e0ad146c80f0d0803e41eaa46cebf959806a3 100755 (executable)
@@ -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