From 2dc88818b7cb8f74140c7a72b273f26c828c0a81 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 7 Jun 2018 18:31:59 +0200 Subject: 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 Signed-off-by: Florian Westphal --- tests/shell/testcases/sets/0031set_timeout_size_0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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 }' -- cgit v1.2.3