summaryrefslogtreecommitdiffstats
path: root/tests/runtest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-xtests/runtest.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh
index 32702c9..cc6678a 100755
--- a/tests/runtest.sh
+++ b/tests/runtest.sh
@@ -19,11 +19,16 @@ add_tests() {
cmd=ip6tables-save
add=match_target6
fi
- modprobe ip_tables
- if [ ! -e /var/log/kern.log -a -z "`grep 'kernel: ip_tables: ' /var/log/kern/log`" ]; then
+ line="`dmesg | tail -1 | cut -d " " -f 2-`"
+ if [ ! -e /var/log/kern.log -o -z "`grep \"$line\" /var/log/kern.log`" ]; then
echo "The destination for kernel log is not /var/log/kern.log, skipping $1 match and target tests"
return
fi
+ c=${cmd%%-save}
+ if [ "`$c -m set -h 2>&1| grep 'cannot open shared object'`" ]; then
+ echo "$c does not support set match, skipping $1 match and target tests"
+ return
+ fi
if [ `$cmd -t filter | wc -l` -eq 7 -a \
`$cmd -t filter | grep ACCEPT | wc -l` -eq 3 ]; then
if [ -z "`which sendip`" ]; then