summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0031set_timeout_size_0
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-09 00:52:30 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-09 09:21:07 +0200
commit9ef4f9e6fe0c766395d00701131289bc2007c23c (patch)
treeb31dd884a3bc14cb32112ee4b7e3873cbe9c9e42 /tests/shell/testcases/sets/0031set_timeout_size_0
parent1eadd73e30deab778ddfc26e9222a4d23bedb140 (diff)
src: support timeouts in milliseconds
currently the frontend uses seconds everywhere and multiplies/divides by 1000. Pass milliseconds around instead and extend the scanner to accept 'ms' in timestrings. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases/sets/0031set_timeout_size_0')
-rwxr-xr-xtests/shell/testcases/sets/0031set_timeout_size_07
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
index 3d3f919a..a401ffa6 100755
--- a/tests/shell/testcases/sets/0031set_timeout_size_0
+++ b/tests/shell/testcases/sets/0031set_timeout_size_0
@@ -1,7 +1,12 @@
#!/bin/bash
RULESET="add table x
-add set x y { type ipv4_addr; size 128; timeout 30s; }"
+add set x y { type ipv4_addr; size 128; timeout 30s; }
+add chain x test
+add rule x test set update ip saddr timeout 1d2h3m4s5ms @y
+add rule x test set update ip daddr timeout 321ms @y"
set -e
$NFT -f - <<< $RULESET
+$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s5ms }'
+$NFT list chain x test | grep -q 'update @y { ip daddr timeout 321ms }'