From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: Re: [nft PATCH] tests: shell: Join arithmetic statements in maps/vmap_timeout
Date: Fri, 11 Oct 2024 11:27:37 +0200 [thread overview]
Message-ID: <ZwjviVcN1LfcBXee@calendula> (raw)
In-Reply-To: <20241011092508.1488-1-phil@nwl.cc>
On Fri, Oct 11, 2024 at 11:25:08AM +0200, Phil Sutter wrote:
> In light of the recent typo fix, go an extra step and merge the modulo
> and offset adjustment in a single term.
LGTM.
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
> tests/shell/testcases/maps/vmap_timeout | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/tests/shell/testcases/maps/vmap_timeout b/tests/shell/testcases/maps/vmap_timeout
> index 6d73f3cc9ae24..8ac7e8e7684ab 100755
> --- a/tests/shell/testcases/maps/vmap_timeout
> +++ b/tests/shell/testcases/maps/vmap_timeout
> @@ -9,8 +9,7 @@ $NFT -f $dumpfile
>
> port=23
> for i in $(seq 1 100) ; do
> - timeout=$((RANDOM%5))
> - timeout=$((timeout+1))
> + timeout=$((RANDOM % 5 + 1))
> expire=$((RANDOM%timeout))
> j=1
>
> @@ -28,11 +27,9 @@ for i in $(seq 1 100) ; do
>
> port=$((port + 1))
> for j in $(seq 2 400); do
> - timeout=$((RANDOM%5))
> - timeout=$((timeout+1))
> + timeout=$((RANDOM % 5 + 1))
> expire=$((RANDOM%timeout))
> - utimeout=$((RANDOM%5))
> - utimeout=$((utimeout+1))
> + utimeout=$((RANDOM % 5 + 1))
>
> timeout_str="timeout ${timeout}s"
> expire_str=""
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-10-11 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 9:25 [nft PATCH] tests: shell: Join arithmetic statements in maps/vmap_timeout Phil Sutter
2024-10-11 9:27 ` Pablo Neira Ayuso [this message]
2024-10-11 9:37 ` Phil Sutter
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=ZwjviVcN1LfcBXee@calendula \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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.