diff options
Diffstat (limited to 'tests/check_counters')
-rw-r--r-- | tests/check_counters | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/check_counters b/tests/check_counters new file mode 100644 index 0000000..0099f23 --- /dev/null +++ b/tests/check_counters @@ -0,0 +1,9 @@ +#!/bin/bash + +read ip p packets b bytes <<< $(../src/ipset l $1 | grep ^$2) +test -z "$packets" -o -z "$bytes" && exit 1 +test $packets -ne $3 -o $bytes -ne $4 && exit 1 +exit 0 + + + |