public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: fstests@vger.kernel.org
Cc: David Disseldorp <ddiss@suse.de>
Subject: [PATCH 2/3] tests/generic/027: use c-style for loops
Date: Tue, 13 Dec 2022 00:08:19 +0100	[thread overview]
Message-ID: <20221212230820.3466-2-ddiss@suse.de> (raw)
In-Reply-To: <20221212230820.3466-1-ddiss@suse.de>

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 tests/generic/027 | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/generic/027 b/tests/generic/027
index 47f1981d..002be120 100755
--- a/tests/generic/027
+++ b/tests/generic/027
@@ -53,22 +53,18 @@ fi
 
 dir=$SCRATCH_MNT/testdir
 echo -n "iteration" >>$seqres.full
-i=1
-while [ $i -le $loop ]; do
+for ((i = 1; i < loop; i++)); do
 	echo -n " $i" >>$seqres.full
-	nr_worker=8
-	while [ $nr_worker -gt 0 ]; do
+	for ((nr_worker = 8; nr_worker > 0; nr_worker--)); do
 		# half buffered I/O half direct I/O
 		if [ `expr $nr_worker % 2` -eq 0 ]; then
 			create_file $dir/$nr_worker -d >>$seqres.full &
 		else
 			create_file $dir/$nr_worker >>$seqres.full &
 		fi
-		let nr_worker=$nr_worker-1
 	done
 	wait
 	rm -rf $dir
-	let i=$i+1
 done
 _scratch_unmount
 
-- 
2.35.3


  reply	other threads:[~2022-12-12 23:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 23:08 [PATCH 1/3] common/attr: require xfs_spaceman for xfs acl_get_max David Disseldorp
2022-12-12 23:08 ` David Disseldorp [this message]
2022-12-13  5:51   ` [PATCH 2/3] tests/generic/027: use c-style for loops Eric Biggers
2022-12-13  8:56     ` David Disseldorp
2022-12-12 23:08 ` [PATCH 3/3] check: ensure sect_stop is initialized if interrupted David Disseldorp
2022-12-13 14:51   ` Zorro Lang
2022-12-13 14:41 ` [PATCH 1/3] common/attr: require xfs_spaceman for xfs acl_get_max Zorro Lang
2022-12-13 15:32   ` David Disseldorp
2022-12-13 18:25     ` Zorro Lang
2022-12-13 19:08       ` David Disseldorp
2022-12-13 19:27         ` Darrick J. Wong
2022-12-13 19:58           ` Zorro Lang

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=20221212230820.3466-2-ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox