tests: shell: Fix bogus testsuite failure with 250Hz
Phil Sutter
reviewerPATCH 1/1 tests: shell: Fix bogus testsuite failure with 250Hz
Previous fix for HZ=100 was not sufficient, a kernel with HZ=250 rounds the 10ms to 8ms it seems. Do as Lukas suggests and accept the occasional input/output asymmetry instead of continuing the hide'n'seek game.
--- tests/shell/testcases/sets/0031set_timeout_size_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shell/testcases/sets/0031set_timeout_size_0 +1 -1
@@ -8,5 +8,5 @@ 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 1d2h3m4s10ms }' +$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s\(10\|8\)ms }' $NFT list chain x test | grep -q 'update @y { ip daddr timeout 100ms }'
Signature · 1 line
2.33.0
Pablo Neira Ayuso
maintainerQuoted 7 lines · Phil Sutter
Previous fix for HZ=100 was not sufficient, a kernel with HZ=250 rounds the 10ms to 8ms it seems. Do as Lukas suggests and accept the occasional input/output asymmetry instead of continuing the hide'n'seek game.
Fixes c9c5b5f621c37 ("tests: shell: Fix bogus testsuite failure with 100Hz")Suggested-by Lukas Wunner <[email protected]>Signed-off-by Phil Sutter <[email protected]>
ACK
Quoted 18 lines
--- tests/shell/testcases/sets/0031set_timeout_size_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/shell/testcases/sets/0031set_timeout_size_0 +1
-1@@ -8,5 +8,5 @@ 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 1d2h3m4s10ms }' +$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s\(10\|8\)ms }' $NFT list chain x test | grep -q 'update @y { ip daddr timeout 100ms }'Signature · 1 line
2.33.0
Quoted 3 lines · Phil Sutter
Previous fix for HZ=100 was not sufficient, a kernel with HZ=250 rounds the 10ms to 8ms it seems. Do as Lukas suggests and accept the occasional input/output asymmetry instead of continuing the hide'n'seek game.
[...]
tests/shell/testcases/sets/0031set_timeout_size_0 add rule x test set update ip daddr timeout 100ms @y" · line 12
Quoted 9 lines
tests/shell/testcases/sets/0031set_timeout_size_0 +1
-1@@ -8,5 +8,5 @@ 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 1d2h3m4s10ms }' +$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s\(10\|8\)ms }' $NFT list chain x test | grep -q 'update @y { ip daddr timeout 100ms }'
Thanks, LGTM.
(The backslashes preceding the ( | ) characters could be avoided with grep -E, but that's just a matter of personal preference.)