Skip to contentSkip to conversation

tests: shell: Fix bogus testsuite failure with 100Hz

PATCH In review Phil Sutter 2 participants 2 messages Jul 26, 2021 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: shell: Fix bogus testsuite failure with 100Hz

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.

---
 tests/shell/testcases/sets/0031set_timeout_size_0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/shell/testcases/sets/0031set_timeout_size_0 +2 -2
index 9edd5f6ffdea6..796640d64670a 100755
@@ -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 }'
Signature · 1 line
2.32.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Phil Sutter

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.