From: Amir Goldstein <amir73il@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
Chandan Babu R <chandan.babu@oracle.com>,
Luis Chamberlain <mcgrof@kernel.org>,
fstests@vger.kernel.org
Subject: [PATCH] generic/{175,297,298}: fix use of uninitialized var
Date: Sat, 12 Aug 2023 18:15:00 +0300 [thread overview]
Message-ID: <20230812151500.553233-1-amir73il@gmail.com> (raw)
Not sure how those tests pass in regression tests.
Probably truncate silently fails and is not critical to the test.
in kdevops I get errors like:
/data/fstests-install/xfstests/tests/generic/298: line 45: /dev/loop12):
syntax error: operand expected (error token is "/dev/loop12)")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
tests/generic/175 | 2 +-
tests/generic/297 | 2 +-
tests/generic/298 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/generic/175 b/tests/generic/175
index 07af2199..14825a39 100755
--- a/tests/generic/175
+++ b/tests/generic/175
@@ -33,7 +33,7 @@ _pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
fnr=19
echo "Create extents"
-truncate -s $(( (2 ** i) * blksz)) "$testdir/file1"
+truncate -s $(( (2 ** (fnr + 1)) * blksz)) "$testdir/file1"
for i in $(seq 0 $fnr); do
echo " ++ Reflink size $i, $((2 ** i)) blocks" >> "$seqres.full"
n=$(( (2 ** i) * blksz))
diff --git a/tests/generic/297 b/tests/generic/297
index 6bdc3e1c..1fc48671 100755
--- a/tests/generic/297
+++ b/tests/generic/297
@@ -42,7 +42,7 @@ _pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
fnr=26 # 2^26 reflink extents should be enough to find a slow op?
timeout=8 # guarantee a good long run...
echo "Find a reflink size that takes a long time"
-truncate -s $(( (2 ** i) * blksz)) $testdir/file1
+truncate -s $(( (2 ** (fnr + 1)) * blksz)) $testdir/file1
for i in $(seq 0 $fnr); do
echo " ++ Reflink size $i, $((2 ** i)) blocks" >> $seqres.full
n=$(( (2 ** i) * blksz))
diff --git a/tests/generic/298 b/tests/generic/298
index 95d4c02b..2e917a87 100755
--- a/tests/generic/298
+++ b/tests/generic/298
@@ -42,7 +42,7 @@ _pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
fnr=26 # 2^26 reflink extents should be enough to find a slow op?
timeout=8 # guarantee a good long run...
echo "Find a reflink size that takes a long time"
-truncate -s $(( (2 ** i) * blksz)) $testdir/file1
+truncate -s $(( (2 ** (fnr + 1)) * blksz)) $testdir/file1
for i in $(seq 0 $fnr); do
echo " ++ Reflink size $i, $((2 ** i)) blocks" >> $seqres.full
n=$(( (2 ** i) * blksz))
--
2.34.1
next reply other threads:[~2023-08-12 15:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 15:15 Amir Goldstein [this message]
2023-08-13 14:52 ` [PATCH] generic/{175,297,298}: fix use of uninitialized var Zorro Lang
2023-08-13 15:35 ` Darrick J. Wong
2023-08-13 18:53 ` Amir Goldstein
2023-08-15 2:16 ` Darrick J. Wong
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=20230812151500.553233-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=chandan.babu@oracle.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=zlang@redhat.com \
/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