diff options
author | Phil Sutter <phil@nwl.cc> | 2024-10-11 11:22:44 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-10-11 11:37:02 +0200 |
commit | ff0846371c0c1cca41fd61ef2c481248684b8aa9 (patch) | |
tree | 93272718b3f507d6df4d5a062090bf9aa6217b08 /tests | |
parent | 95017b8c8f10ada09c2faa7e6bae71b60f38f259 (diff) |
tests: shell: Join arithmetic statements in maps/vmap_timeout
In light of the recent typo fix, go an extra step and merge the modulo
and offset adjustment in a single term.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/testcases/maps/vmap_timeout | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/shell/testcases/maps/vmap_timeout b/tests/shell/testcases/maps/vmap_timeout index 6d73f3cc..8ac7e8e7 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="" |