]> granicus.if.org Git - ipset/commitdiff
hash:net stress test in range notation added
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 23 May 2011 09:32:54 +0000 (11:32 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 23 May 2011 09:32:54 +0000 (11:32 +0200)
tests/hash:net.t
tests/netgen.sh [new file with mode: 0755]

index 8ccc3f20cbe4a69e9858c3e0c0850fe55042d4ec..9f99ef88b812e49ac3bc4e8e5ab80525e42f6b28 100644 (file)
 0 diff -u -I 'Size in memory.*' .foo hash:net.t.list2
 # Delete test set
 0 ipset destroy test
+# Stress test with range notation
+0 ./netgen.sh | ipset restore
+# List set and check the number of elements
+0 n=`ipset -L test|grep '10.'|wc -l` && test $n -eq 43520
+# Delete test set
+0 ipset destroy test
 # eof
diff --git a/tests/netgen.sh b/tests/netgen.sh
new file mode 100755 (executable)
index 0000000..eb59124
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo "n test hash:net hashsize 32"
+for x in `seq 0 255`; do
+    for y in `seq 0 3 253`; do
+       z=$((y+2))
+       echo "a test 10.$x.$y.0-10.$x.$z.255"
+    done
+done