diff options
Diffstat (limited to 'tests/hash:ip,port.t')
-rw-r--r-- | tests/hash:ip,port.t | 64 |
1 files changed, 43 insertions, 21 deletions
diff --git a/tests/hash:ip,port.t b/tests/hash:ip,port.t index cb88f96..e3b292b 100644 --- a/tests/hash:ip,port.t +++ b/tests/hash:ip,port.t @@ -1,43 +1,65 @@ -# Range: Create a set with timeout +# Create a set with timeout 0 ipset create test hash:ip,port timeout 5 -# Range: Add partly zero valued element +# Add partly zero valued element 0 ipset add test 2.0.0.1,0 -# Range: Test partly zero valued element +# Test partly zero valued element 0 ipset test test 2.0.0.1,0 -# Range: Delete partly zero valued element +# Delete partly zero valued element 0 ipset del test 2.0.0.1,0 -# Range: Add lower boundary +# Add lower boundary 0 ipset add test 2.0.0.1,5 -# Range: Add upper boundary +# Add upper boundary 0 ipset add test 2.1.0.0,128 -# Range: Test lower boundary +# Test lower boundary 0 ipset test test 2.0.0.1,5 -# Range: Test upper boundary +# Test upper boundary 0 ipset test test 2.1.0.0,128 -# Range: Test value not added to the set +# Test value not added to the set 1 ipset test test 2.0.0.1,4 -# Range: Delete value not added to the set +# Delete value not added to the set 1 ipset del test 2.0.0.1,6 -# Range: Test value before lower boundary +# Test value before lower boundary 1 ipset test test 2.0.0.0,5 -# Range: Test value after upper boundary +# Test value after upper boundary 1 ipset test test 2.1.0.1,128 -# Range: Try to add value before lower boundary +# Try to add value before lower boundary 0 ipset add test 2.0.0.0,5 -# Range: Try to add value after upper boundary +# Try to add value after upper boundary 0 ipset add test 2.1.0.1,128 -# Range: List set +# List set 0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0 -# Range: Check listing +# Check listing 0 diff -I 'Size in memory.*' .foo hash:ip,port.t.list0 && rm .foo -# Range: Sleep 6s so that elements can time out +# Sleep 6s so that elements can time out 0 sleep 6 -# Range: List set +# List set 0 ipset list test > .foo0 && ./sort.sh .foo0 -# Range: Check listing +# Check listing 0 diff -I 'Size in memory.*' .foo hash:ip,port.t.list1 && rm .foo -# Range: Flush test set +# Flush test set 0 ipset flush test -# Range: Delete test set +# Delete test set +0 ipset destroy test +# Create a set with default TCP protocol +0 ipset create test hash:ip,port proto tcp +# Add element without specifying protocol +0 ipset add test 2.0.0.1,80 +# Add "same" element but with UDP protocol +0 ipset add test 2.0.0.1,udp:80 +# Test element without specifying protocol +0 ipset test test 2.0.0.1,80 +# Test element with TCP protocol +0 ipset test test 2.0.0.1,tcp:80 +# Test element with UDP protocol +0 ipset test test 2.0.0.1,udp:80 +# Add element with ospf +0 ipset add test 2.0.0.1,ospf:0 +# Test element with ospf +0 ipset test test 2.0.0.1,ospf:0 +# List set +0 ipset list test > .foo0 && ./sort.sh .foo0 +# Check listing +0 diff -I 'Size in memory.*' .foo hash:ip,port.t.list2 && rm .foo +# Delete set 0 ipset destroy test # eof |