]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: Fix bogus testsuite failure with 100Hz
authorPhil Sutter <phil@nwl.cc>
Mon, 26 Jul 2021 13:27:32 +0000 (15:27 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 26 Jul 2021 14:37:40 +0000 (16:37 +0200)
On kernels with CONFIG_HZ=100, clock granularity does not allow tracking
timeouts in single digit ms range. Change sets/0031set_timeout_size_0 to
not expose this detail.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/sets/0031set_timeout_size_0

index 9edd5f6ffdea69db6bc2cc0828a6ab0ad803ec41..796640d64670abd79c1a797a6bfc379ade2d0691 100755 (executable)
@@ -3,10 +3,10 @@
 RULESET="add table x
 add set x y { type ipv4_addr; size 128; timeout 30s; flags dynamic; }
 add chain x test
-add rule x test set update ip saddr timeout 1d2h3m4s8ms @y
+add rule x test set update ip saddr timeout 1d2h3m4s10ms @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 1d2h3m4s8ms }'
+$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s10ms }'
 $NFT list chain x test | grep -q 'update @y { ip daddr timeout 100ms }'