summaryrefslogtreecommitdiffstats
path: root/tests/shell
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-06-07 18:31:59 +0200
committerFlorian Westphal <fw@strlen.de>2018-06-07 18:32:17 +0200
commit2dc88818b7cb8f74140c7a72b273f26c828c0a81 (patch)
tree10aff3e11ed93812c75ccf63b205dd1301bacbda /tests/shell
parent79fd53906d4834e64fad41cfe5ba2f14ec213fe3 (diff)
tests: use 100ms for set timeout
Pablo reports set test fails with HZ=250, as it lists "324ms" instead of "321". This is because of rounding errors that occur when converting from user-side millisecond scale to kernel-internal jiffies one. use 100ms for now to avoid this error. Alternatives would be to store use-provided value in kernel or to avoid the conversions; this would require a change to make timeout independent from jiffies on kernel side. Reported-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell')
-rwxr-xr-xtests/shell/testcases/sets/0031set_timeout_size_04
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
index a401ffa6..747d7dc7 100755
--- a/tests/shell/testcases/sets/0031set_timeout_size_0
+++ b/tests/shell/testcases/sets/0031set_timeout_size_0
@@ -4,9 +4,9 @@ RULESET="add table x
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"
+add rule x test set update ip daddr timeout 100ms @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 }'
+$NFT list chain x test | grep -q 'update @y { ip daddr timeout 100ms }'