From b991e7d1507b2e9db9a4cf181c61b1286e2df0ff Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu" Date: Thu, 12 Jun 2008 09:22:25 +0000 Subject: ipset -U segfault fix committed. Testsuite added. --- tests/runtest.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 tests/runtest.sh (limited to 'tests/runtest.sh') 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" + -- cgit v1.2.3