All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz
@ 2021-11-02 20:07 Phil Sutter
  2021-11-02 20:21 ` Pablo Neira Ayuso
  2021-11-03  7:57 ` Lukas Wunner
  0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2021-11-02 20:07 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Lukas Wunner

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 <lukas@wunner.de>
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tests/shell/testcases/sets/0031set_timeout_size_0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
index 796640d64670a..9a4a27f6c4512 100755
--- a/tests/shell/testcases/sets/0031set_timeout_size_0
+++ b/tests/shell/testcases/sets/0031set_timeout_size_0
@@ -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 }'
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz
  2021-11-02 20:07 [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz Phil Sutter
@ 2021-11-02 20:21 ` Pablo Neira Ayuso
  2021-11-03  7:57 ` Lukas Wunner
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2021-11-02 20:21 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netfilter-devel, Lukas Wunner

On Tue, Nov 02, 2021 at 09:07:53PM +0100, Phil Sutter wrote:
> 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 <lukas@wunner.de>
> Signed-off-by: Phil Sutter <phil@nwl.cc>

ACK

> ---
>  tests/shell/testcases/sets/0031set_timeout_size_0 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
> index 796640d64670a..9a4a27f6c4512 100755
> --- a/tests/shell/testcases/sets/0031set_timeout_size_0
> +++ b/tests/shell/testcases/sets/0031set_timeout_size_0
> @@ -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 }'
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz
  2021-11-02 20:07 [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz Phil Sutter
  2021-11-02 20:21 ` Pablo Neira Ayuso
@ 2021-11-03  7:57 ` Lukas Wunner
  1 sibling, 0 replies; 3+ messages in thread
From: Lukas Wunner @ 2021-11-03  7:57 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel

On Tue, Nov 02, 2021 at 09:07:53PM +0100, Phil Sutter wrote:
> 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.
[...]
> --- a/tests/shell/testcases/sets/0031set_timeout_size_0
> +++ b/tests/shell/testcases/sets/0031set_timeout_size_0
> @@ -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.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-03  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 20:07 [nft PATCH] tests: shell: Fix bogus testsuite failure with 250Hz Phil Sutter
2021-11-02 20:21 ` Pablo Neira Ayuso
2021-11-03  7:57 ` Lukas Wunner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.