mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
selftests: netfilter: skip br_netfilter queue tests if kernel is tainted
These scripts fail if the kernel is tainted which leads to wrong test failure reports in CI environments when an unrelated test triggers some splat. Check taint state at start of script and SKIP if its already dodgy. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
d653bfeb07
commit
c21b02fd9c
|
|
@ -13,6 +13,12 @@ source lib.sh
|
|||
|
||||
checktool "nft --version" "run test without nft tool"
|
||||
|
||||
read t < /proc/sys/kernel/tainted
|
||||
if [ "$t" -ne 0 ];then
|
||||
echo SKIP: kernel is tainted
|
||||
exit $ksft_skip
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
cleanup_all_ns
|
||||
}
|
||||
|
|
@ -165,6 +171,7 @@ if [ "$t" -eq 0 ];then
|
|||
echo PASS: kernel not tainted
|
||||
else
|
||||
echo ERROR: kernel is tainted
|
||||
dmesg
|
||||
ret=1
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ source lib.sh
|
|||
|
||||
checktool "nft --version" "run test without nft tool"
|
||||
|
||||
read t < /proc/sys/kernel/tainted
|
||||
if [ "$t" -ne 0 ];then
|
||||
echo SKIP: kernel is tainted
|
||||
exit $ksft_skip
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
cleanup_all_ns
|
||||
}
|
||||
|
|
@ -72,6 +78,7 @@ if [ "$t" -eq 0 ];then
|
|||
echo PASS: kernel not tainted
|
||||
else
|
||||
echo ERROR: kernel is tainted
|
||||
dmesg
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -593,6 +593,7 @@ EOF
|
|||
echo "PASS: queue program exiting while packets queued"
|
||||
else
|
||||
echo "TAINT: queue program exiting while packets queued"
|
||||
dmesg
|
||||
ret=1
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user