All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] tests: shell: fix spurious errors in sets/0036add_set_element_expiration_0
Date: Wed, 27 Sep 2023 17:32:27 +0200	[thread overview]
Message-ID: <ZRRLCywy5pSEoD/i@calendula> (raw)
In-Reply-To: <ZRRD7B/dvuCwgfvD@orbyte.nwl.cc>

On Wed, Sep 27, 2023 at 05:02:04PM +0200, Phil Sutter wrote:
> On Wed, Sep 27, 2023 at 04:48:03PM +0200, Pablo Neira Ayuso wrote:
> > Add seconds as expiration, otherwise 14m59 reports 14m in minute
> > granularity, this ensures suficient time in a very slow environment with
> > debugging instrumentation.
> > 
> > Fixes: adf38fd84257 ("tests: shell: use minutes granularity in sets/0036add_set_element_expiration_0")
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > ---
> > I still see this failing occasionally due to timing issues, fix it.
> > 
> >  tests/shell/testcases/sets/0036add_set_element_expiration_0 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/shell/testcases/sets/0036add_set_element_expiration_0 b/tests/shell/testcases/sets/0036add_set_element_expiration_0
> > index 12f10074409f..a50ac91d43a6 100755
> > --- a/tests/shell/testcases/sets/0036add_set_element_expiration_0
> > +++ b/tests/shell/testcases/sets/0036add_set_element_expiration_0
> > @@ -8,7 +8,7 @@ drop_seconds() {
> >  
> >  RULESET="add table ip x
> >  add set ip x y { type ipv4_addr; flags dynamic,timeout; } 
> > -add element ip x y { 1.1.1.1 timeout 30m expires 15m }"
> > +add element ip x y { 1.1.1.1 timeout 30m expires 15m59s }"
> >  
> >  test_output=$($NFT -e -f - <<< "$RULESET" 2>&1 | grep -v '# new generation' | drop_seconds)
> 
> The next line in that file is:
> 
> | if [ "$test_output" != "$RULESET" ] ; then
> 
> You add "59s" to $RULESET and drop it from $test_output. I guess, to
> make it work, you also need to pipe $RULESET through drop_seconds before
> the comparison.

Indeed, apologies: See latest patch.

https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230927152514.473765-1-pablo@netfilter.org/

  reply	other threads:[~2023-09-27 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 14:48 [PATCH nft] tests: shell: fix spurious errors in sets/0036add_set_element_expiration_0 Pablo Neira Ayuso
2023-09-27 15:02 ` Phil Sutter
2023-09-27 15:32   ` Pablo Neira Ayuso [this message]
2023-09-27 15:47     ` Pablo Neira Ayuso
2023-09-27 15:53       ` Florian Westphal
2023-09-27 19:53         ` Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2023-09-27 15:18 Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZRRLCywy5pSEoD/i@calendula \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.