]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
Speed up testing a little bit
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 13 Dec 2010 16:46:23 +0000 (17:46 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 13 Dec 2010 16:46:23 +0000 (17:46 +0100)
Lower timeout values to max 5s, so we can lower sleep values too.

21 files changed:
tests/bitmap:ip.t
tests/hash:ip,port,ip.t
tests/hash:ip,port.t
tests/hash:ip.t
tests/hash:ip.t.list1
tests/hash:ip6,port,ip6.t
tests/hash:ip6,port.t
tests/hash:ip6.t
tests/hash:ip6.t.list1
tests/hash:net,port.t
tests/hash:net,port.t.list1
tests/hash:net.t
tests/hash:net.t.list1
tests/hash:net6,port.t
tests/hash:net6,port.t.list1
tests/hash:net6.t
tests/hash:net6.t.list1
tests/macipmap.t
tests/macipmap.t.list2
tests/macipmap.t.list3
tests/portmap.t

index 29a1a5a558542c1645bdec8756ce4d4b832274bb..40c2a98678c58afefca10f50e0b44d638a5c6501 100644 (file)
@@ -3,7 +3,7 @@
 # Range: Create a set from a valid range with timeout
 0 ipset create test bitmap:ip range 2.0.0.1-2.1.0.0 timeout 5
 # Range: Add lower boundary
-0 ipset add test 2.0.0.1 timeout 10
+0 ipset add test 2.0.0.1 timeout 4
 # Range: Add upper boundary
 0 ipset add test 2.1.0.0 timeout 0
 # Range: Test lower boundary
 # Range: Delete the same element
 0 ipset -D test 2.0.0.128
 # Range: Add a range of elements
-0 ipset -A test 2.0.0.128-2.0.0.131 timeout 6
+0 ipset -A test 2.0.0.128-2.0.0.131 timeout 4
 # Range: List set
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo
 # Range: Check listing
 0 diff -I 'Size in memory.*' .foo bitmap:ip.t.list4 && rm .foo
-# Sleep 10s so that entries can time out
-0 sleep 10s
+# Sleep 5s so that entries can time out
+0 sleep 5s
 # Range: List set after timeout
 0 ipset list test > .foo
 # Range: Check listing
 # Range: Delete test set
 0 ipset destroy test
 # Network: Try to create a set from an invalid network with timeout
-1 ipset create test bitmap:ip range 2.0.0.0/15
+1 ipset create test bitmap:ip range 2.0.0.0/15 timeout 5
 # Network: Create a set from a valid network with timeout
 0 ipset create test bitmap:ip range 2.0.0.0/16 timeout 5
 # Network: Add lower boundary
 0 ipset add test 2.0.0.0 timeout 0
 # Network: Add upper boundary
-0 ipset add test 2.0.255.255 timeout 10
+0 ipset add test 2.0.255.255 timeout 4
 # Network: Test lower boundary
 0 ipset test test 2.0.0.0
 # Network: Test upper boundary
 # Network: Delete element not added to the set
 1 ipset -D test 2.0.0.2
 # Network: Add element in the middle
-0 ipset -A test 2.0.0.128 timeout 20
+0 ipset -A test 2.0.0.128 timeout 4
 # Network: Delete the same element
 0 ipset -D test 2.0.0.128
 # Network: List set
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo
 # Network: Check listing
 0 diff -I 'Size in memory.*' .foo bitmap:ip.t.list5 && rm .foo
-# Sleep 10s so that entries can time out
-0 sleep 10s
+# Sleep 5s so that entries can time out
+0 sleep 5s
 # Network: List set
 0 ipset list test > .foo
 # Network: Check listing
@@ -93,7 +93,7 @@
 # Subnets: Create a set to store networks with timeout
 0 ipset create test bitmap:ip range 10.0.0.0/8 netmask 24 timeout 5
 # Subnets: Add lower boundary
-0 ipset add test 10.0.0.0 timeout 10
+0 ipset add test 10.0.0.0 timeout 4
 # Subnets: Add upper boundary
 0 ipset add test 10.255.255.255 timeout 0
 # Subnets: Test lower boundary
 # Subnets: Delete the same element from the set                                 
 0 ipset -D test 10.2.0.0
 # Subnets: Add a subnet of subnets
-0 ipset -A test 10.8.0.0/16 timeout 8
+0 ipset -A test 10.8.0.0/16 timeout 4
 # Subnets: List set
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo
 # Subnets: Check listing
 0 diff -I 'Size in memory.*' .foo bitmap:ip.t.list6 && rm .foo
-# Sleep 10s so that entries can time out
-0 sleep 10s
+# Sleep 5s so that entries can time out
+0 sleep 5s
 # Subnets: List set
 0 ipset list test > .foo
 # Subnets: Check listing
index cc6783bc1cc070e77083d524924ff8b047aa9760..69411cae90ba2bb97ce69eba80792924a9d6897a 100644 (file)
@@ -38,8 +38,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip,port,ip.t.list0 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # List set
 0 ipset list test > .foo0 && ./sort.sh .foo0
 # Check listing
index 6fe18ee24a293faa1eb24dc0b7226ef33503ab38..53bf69d677d06480f26d4477abf71c67c0824f04 100644 (file)
@@ -30,8 +30,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip,port.t.list0 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # List set
 0 ipset list test > .foo0 && ./sort.sh .foo0
 # Check listing
index c45bb2dea6e19a24f5fa14956bc27c7e34c26deb..a7f56bd802274c6fdc162f6715e55b59d8b843ef 100644 (file)
@@ -22,8 +22,8 @@
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # IP: Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip.t.list2 && rm .foo
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
 # IP: Delete test set
 0 ipset -X test
 # IP: Restore values so that rehashing is triggered
-0 sed 's/hashsize 128/hashsize 128 timeout 6/' iphash.t.restore | ipset -R
+0 sed 's/hashsize 128/hashsize 128 timeout 5/' iphash.t.restore | ipset -R
 # IP: Check that the values are restored
 0 test `ipset -S test| grep add| wc -l` -eq 129
-# Sleep 8s so that elements can time out
-0 sleep 8
+# Sleep 5s so that elements can time out
+0 sleep 5
 # IP: check that elements timed out
 0 test `ipset -S test| grep add| wc -l` -eq 0
 # IP: Flush test set
@@ -47,7 +47,7 @@
 # IP: Stress test resizing
 0 ./resize.sh
 # Network: Create a set with timeout
-0 ipset -N test iphash --hashsize 128 --netmask 24 timeout 6
+0 ipset -N test iphash --hashsize 128 --netmask 24 timeout 5
 # Network: Add zero valued element
 1 ipset -A test 0.0.0.0
 # Network: Test zero valued element
@@ -74,8 +74,8 @@
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Network: Check listing
 0 diff -I 'Size in memory.*' -I 'Size in memory.*' .foo hash:ip.t.list3 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # Network: List set
 0 ipset -L test > .foo
 # Network: Check listing
index 3189dae0d18ec7b578140b404b2c7a5ab713d50d..b15a2128140d9b0a4dfa17314f2b82aaaf9fc667 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:ip
-Header: family inet hashsize 128 maxelem 65536 netmask 24 timeout 6 
+Header: family inet hashsize 128 maxelem 65536 netmask 24 timeout 5 
 Size in memory: 1352
 References: 0
 Members:
index 712db33ac19a2d9f650bcf7666853c871f45e19d..b4d05e962513b3d51de8334cf87ba29ca1e535c0 100644 (file)
@@ -38,8 +38,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip6,port,ip6.t.list0 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # List set
 0 ipset list test > .foo0 && ./sort.sh .foo0
 # Check listing
index 5b009428d245fc90c5bb18fa63146b275d75ca2d..fdd61da1d0a072952d69edcf5ea83d9a95e84ef0 100644 (file)
@@ -30,8 +30,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip6,port.t.list0 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # List set
 0 ipset list test > .foo0 && ./sort.sh .foo0
 # Check listing
index dae9e1ef66a770ec3c3e0f6b8be6c5f24b0f3bd0..7b206c736c006ff7992ffe1f7f852dc007502538 100644 (file)
@@ -24,8 +24,8 @@
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # IP: Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip6.t.list2 && rm .foo
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
@@ -35,7 +35,7 @@
 # IP: Delete test set
 0 ipset -X test
 # Network: Create a set with timeout
-0 ipset -N test iphash -6 --hashsize 128 --netmask 64 timeout 6
+0 ipset -N test iphash -6 --hashsize 128 --netmask 64 timeout 5
 # Network: Add zero valued element
 1 ipset -A test ::
 # Network: Test zero valued element
@@ -64,8 +64,8 @@
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Network: Check listing
 0 diff -I 'Size in memory.*' .foo hash:ip6.t.list3 && rm .foo
-# Sleep 6s so that elements can time out
-0 sleep 6
+# Sleep 5s so that elements can time out
+0 sleep 5
 # Network: List set
 0 ipset -L test > .foo
 # Network: Check listing
index ce5c5fe29758390db6776b07d19adcb856bf6f66..00b3323179c53b808088603ac27cb44843a29112 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:ip
-Header: family inet6 hashsize 128 maxelem 65536 netmask 64 timeout 6 
+Header: family inet6 hashsize 128 maxelem 65536 netmask 64 timeout 5 
 Size in memory: 1448
 References: 0
 Members:
index 19f45d1ca925a0f0b4898889a29cf1712f666d36..d2d8e8add37ac2f1b6273d723589aaeec8eb43a0 100644 (file)
@@ -1,5 +1,5 @@
 # Create a set with timeout
-0 ipset create test hash:net,port hashsize 128 timeout 6
+0 ipset create test hash:net,port hashsize 128 timeout 5
 # Add zero valued element
 1 ipset add test 0.0.0.0/0,0
 # Test zero valued element
@@ -38,8 +38,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:net,port.t.list0
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
index 20d38a8760c74c229e7c05c8fa11b04e0721cef6..c049cf76d5595ce7ed477768900fac4ebca39f2e 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:net,port
-Header: family inet hashsize 128 maxelem 65536 timeout 6 
+Header: family inet hashsize 128 maxelem 65536 timeout 5 
 Size in memory: 2000
 References: 0
 Members:
index c27bb65f775144880e63ea76f95fcb3ad351bb68..9edd3c90490b25e38c0c6a07024c32cc57c8728a 100644 (file)
@@ -1,5 +1,5 @@
 # Create a set with timeout
-0 ipset create test nethash hashsize 128 timeout 6
+0 ipset create test nethash hashsize 128 timeout 5
 # Add zero valued element
 1 ipset add test 0.0.0.0/0
 # Test zero valued element
@@ -36,8 +36,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:net.t.list0 && rm .foo
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
index 7dec348bc89575ad56f2c80fb1347acec461bb5a..515a93c87d7ce28e97999078184dcfd62c99139c 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:net
-Header: family inet hashsize 128 maxelem 65536 timeout 6 
+Header: family inet hashsize 128 maxelem 65536 timeout 5 
 Size in memory: 1672
 References: 0
 Members:
index bfb6f2799eb4269b8e9653489747dacf44867912..099c4f5a15f5d7401da2a5f1e00ce33285ce0a72 100644 (file)
@@ -1,5 +1,5 @@
 # Create a set with timeout
-0 ipset create test hash:net,port family inet6 hashsize 128 timeout 6
+0 ipset create test hash:net,port family inet6 hashsize 128 timeout 5
 # Add zero valued element
 1 ipset add test ::/0,tcp:8
 # Test zero valued element
@@ -38,8 +38,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:net6,port.t.list0 && rm .foo
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
index 873788e8621fc115611a08f2d9668dada3fdbfdb..31c3eca50ec4ef0ab5670866e69ab192082b0cfa 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:net,port
-Header: family inet6 hashsize 128 maxelem 65536 timeout 6 
+Header: family inet6 hashsize 128 maxelem 65536 timeout 5 
 Size in memory: 2328
 References: 0
 Members:
index f1ae0924abb1b15acf4440b67cc56036b4d2aaf2..ecb415e6c3c8947f45f47a28b5fd74e20701f4c0 100644 (file)
@@ -1,5 +1,5 @@
 # Create a set with timeout
-0 ipset create test nethash family inet6 hashsize 128 timeout 6
+0 ipset create test nethash family inet6 hashsize 128 timeout 5
 # Add zero valued element
 1 ipset add test ::/0
 # Test zero valued element
@@ -36,8 +36,8 @@
 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
 # Check listing
 0 diff -I 'Size in memory.*' .foo hash:net6.t.list0 && rm .foo
-# Sleep 6s so that element can time out
-0 sleep 6
+# Sleep 5s so that element can time out
+0 sleep 5
 # IP: List set
 0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
 # IP: Check listing
index 2a606bcc0c00a69bd9b5e4d1dbbec667b1e747c6..05d4746471745fda7af9906b1c2d57a219a3df88 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: hash:net
-Header: family inet6 hashsize 128 maxelem 65536 timeout 6 
+Header: family inet6 hashsize 128 maxelem 65536 timeout 5 
 Size in memory: 2696
 References: 0
 Members:
index 7cf0cffa37f768df199fdd35d65f44501808a307..ddc1393315efc1ce49c57a57a9b16cebb487eb82 100644 (file)
 # Network: Delete test set
 0 ipset -X test
 # Range: Create a set from a valid range with timeout
-0 ipset -N test macipmap --from 2.0.0.1 --to 2.1.0.0 timeout 10
+0 ipset -N test macipmap --from 2.0.0.1 --to 2.1.0.0 timeout 5
 # Range: Add lower boundary
-0 ipset -A test 2.0.0.1 timeout 8
+0 ipset -A test 2.0.0.1 timeout 4
 # Range: Add upper boundary
-0 ipset -A test 2.1.0.0 timeout 5
+0 ipset -A test 2.1.0.0 timeout 3
 # Range: Test lower boundary
 0 ipset -T test 2.0.0.1
 # Range: Test upper boundary
 # Range: Try to add value after upper boundary
 1 ipset -A test 2.1.0.1
 # Range: Try to add value with MAC
-0 ipset -A test 2.0.0.2,00:11:22:33:44:55 timeout 8
+0 ipset -A test 2.0.0.2,00:11:22:33:44:55 timeout 4
 # Range: Test value with invalid MAC
 1 ipset -T test 2.0.0.2,00:11:22:33:44:56
 # Range: Test value with valid MAC
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
 # Range: Check listing
 0 diff -I 'Size in memory.*' .foo macipmap.t.list3 && rm .foo
-# Range: wait 10s so that elements can timeout
-0 sleep 10
+# Range: sleep 5s so that elements can timeout
+0 sleep 5
 # Range: List set
-0 ipset -L test > .foo
+0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
 # Range: Check listing
 0 diff -I 'Size in memory.*' .foo macipmap.t.list2 && rm .foo
 # Range: Flush test set
index 6a727d8d3473b5a88d7373e74df045141b6047a7..f154a52b90aef8fe1a82fc7262d01e82bd767926 100644 (file)
@@ -1,8 +1,8 @@
 Name: test
 Type: bitmap:ip,mac
-Header: range 2.0.0.1-2.1.0.0 timeout 10 
+Header: range 2.0.0.1-2.1.0.0 timeout x 
 Size in memory: 1048688
 References: 0
 Members:
-2.1.0.0 timeout 5
+2.1.0.0 timeout x
 
index 9f52f0625b88aeb16ed96dbcbcada699c19689e1..04b66b51bc34494f081cab2e80d426c8b9ed1678 100644 (file)
@@ -1,6 +1,6 @@
 Name: test
 Type: bitmap:ip,mac
-Header: range 2.0.0.1-2.1.0.0 timeout x0 
+Header: range 2.0.0.1-2.1.0.0 timeout x 
 Size in memory: 1048688
 References: 0
 Members:
index 54fd6f183606ab0e1df29c716d0ef64f04e9d556..989a83b9e89bfee0b921076134f20aceab26a527 100644 (file)
@@ -53,7 +53,7 @@
 # Full: Delete test set
 0 ipset -X test
 # Full: Create a full set of ports and timeout
-0 ipset -N test portmap --from 0 --to 65535 timeout 8
+0 ipset -N test portmap --from 0 --to 65535 timeout 5
 # Full: Add lower boundary
 0 ipset -A test 0 timeout 5
 # Full: Add upper boundary
@@ -72,8 +72,8 @@
 0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
 # Full: Check listing
 0 diff -I 'Size in memory.*' .foo portmap.t.list3 && rm .foo
-# Full: sleep 10s so that elements can timeout
-0 sleep 10
+# Full: sleep 5s so that elements can timeout
+0 sleep 5
 # Full: List set
 0 ipset -L test > .foo
 # Full: Check listing