diff options
author | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-06-12 09:22:25 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-06-12 09:22:25 +0000 |
commit | b991e7d1507b2e9db9a4cf181c61b1286e2df0ff (patch) | |
tree | f53f11f1e6fdf7f347e1d0bec49f9e2b561efe76 /tests/runtest.sh | |
parent | b808269477765dd5ca9500f47665d0926b8621ce (diff) |
ipset -U segfault fix committed.
Testsuite added.
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh new file mode 100755 index 0000000..028e968 --- /dev/null +++ b/tests/runtest.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +tests="init" +tests+=" ipmap macipmap portmap" +tests+=" iphash nethash ipporthash" +tests+=" iptree iptreemap" + +for types in $tests; do + ipset -X test >/dev/null 2>&1 + while read ret cmd; do + case $ret in + \#) + if [ "$cmd" = "eof" ]; then + break + fi + what=$cmd + continue + ;; + *) + ;; + esac + echo -ne "$types: $what: " + eval $cmd >/dev/null 2>&1 + r=$? + # echo $ret $r + if [ "$ret" = "$r" ]; then + echo "OK" + else + echo "FAILED" + echo "Failed test: $cmd" + exit 1 + fi + # sleep 1 + done < $types.t +done +for x in $tests; do + case $x in + init) + ;; + *) + rmmod ip_set_$x >/dev/null 2>&1 + ;; + esac +done +rmmod ip_set >/dev/null 2>&1 +echo "All tests are OK" + |