* [PATCH v2] generic/{175,297,298}: fix use of uninitialized var
@ 2023-08-15 8:28 Amir Goldstein
2023-08-15 11:48 ` Zorro Lang
2023-08-15 14:42 ` Darrick J. Wong
0 siblings, 2 replies; 3+ messages in thread
From: Amir Goldstein @ 2023-08-15 8:28 UTC (permalink / raw)
To: Zorro Lang; +Cc: Darrick J . Wong, Luis Chamberlain, Chandan Babu R, fstests
The truncate command in those tests use an uninitialized variable i.
in kdevops, i must contain some leftover, so we get errors like:
/data/fstests-install/xfstests/tests/generic/298: line 45: /dev/loop12):
syntax error: operand expected (error token is "/dev/loop12)")
Apparently, noone including the author of the tests knows why this
truncate command is in the test, so remove the wrong truncate command.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
Changes since v1:
- Remove the unneeded truncate command instead of fixing it
tests/generic/175 | 1 -
tests/generic/297 | 1 -
tests/generic/298 | 1 -
3 files changed, 3 deletions(-)
diff --git a/tests/generic/175 b/tests/generic/175
index 07af2199..f827beb6 100755
--- a/tests/generic/175
+++ b/tests/generic/175
@@ -33,7 +33,6 @@ _pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
fnr=19
echo "Create extents"
-truncate -s $(( (2 ** i) * 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..54c2ac21 100755
--- a/tests/generic/297
+++ b/tests/generic/297
@@ -42,7 +42,6 @@ _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
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..115a9bf7 100755
--- a/tests/generic/298
+++ b/tests/generic/298
@@ -42,7 +42,6 @@ _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
for i in $(seq 0 $fnr); do
echo " ++ Reflink size $i, $((2 ** i)) blocks" >> $seqres.full
n=$(( (2 ** i) * blksz))
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] generic/{175,297,298}: fix use of uninitialized var
2023-08-15 8:28 [PATCH v2] generic/{175,297,298}: fix use of uninitialized var Amir Goldstein
@ 2023-08-15 11:48 ` Zorro Lang
2023-08-15 14:42 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2023-08-15 11:48 UTC (permalink / raw)
To: Amir Goldstein; +Cc: fstests
On Tue, Aug 15, 2023 at 11:28:35AM +0300, Amir Goldstein wrote:
> The truncate command in those tests use an uninitialized variable i.
> in kdevops, i must contain some leftover, so we get errors like:
> /data/fstests-install/xfstests/tests/generic/298: line 45: /dev/loop12):
> syntax error: operand expected (error token is "/dev/loop12)")
>
> Apparently, noone including the author of the tests knows why this
> truncate command is in the test, so remove the wrong truncate command.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
Good to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>
>
> Changes since v1:
> - Remove the unneeded truncate command instead of fixing it
>
> tests/generic/175 | 1 -
> tests/generic/297 | 1 -
> tests/generic/298 | 1 -
> 3 files changed, 3 deletions(-)
>
> diff --git a/tests/generic/175 b/tests/generic/175
> index 07af2199..f827beb6 100755
> --- a/tests/generic/175
> +++ b/tests/generic/175
> @@ -33,7 +33,6 @@ _pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
>
> fnr=19
> echo "Create extents"
> -truncate -s $(( (2 ** i) * 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..54c2ac21 100755
> --- a/tests/generic/297
> +++ b/tests/generic/297
> @@ -42,7 +42,6 @@ _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
> 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..115a9bf7 100755
> --- a/tests/generic/298
> +++ b/tests/generic/298
> @@ -42,7 +42,6 @@ _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
> for i in $(seq 0 $fnr); do
> echo " ++ Reflink size $i, $((2 ** i)) blocks" >> $seqres.full
> n=$(( (2 ** i) * blksz))
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] generic/{175,297,298}: fix use of uninitialized var
2023-08-15 8:28 [PATCH v2] generic/{175,297,298}: fix use of uninitialized var Amir Goldstein
2023-08-15 11:48 ` Zorro Lang
@ 2023-08-15 14:42 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2023-08-15 14:42 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Zorro Lang, Luis Chamberlain, Chandan Babu R, fstests
On Tue, Aug 15, 2023 at 11:28:35AM +0300, Amir Goldstein wrote:
> The truncate command in those tests use an uninitialized variable i.
> in kdevops, i must contain some leftover, so we get errors like:
> /data/fstests-install/xfstests/tests/generic/298: line 45: /dev/loop12):
> syntax error: operand expected (error token is "/dev/loop12)")
>
> Apparently, noone including the author of the tests knows why this
> truncate command is in the test, so remove the wrong truncate command.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
LGTM! :)
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
>
> Changes since v1:
> - Remove the unneeded truncate command instead of fixing it
>
> tests/generic/175 | 1 -
> tests/generic/297 | 1 -
> tests/generic/298 | 1 -
> 3 files changed, 3 deletions(-)
>
> diff --git a/tests/generic/175 b/tests/generic/175
> index 07af2199..f827beb6 100755
> --- a/tests/generic/175
> +++ b/tests/generic/175
> @@ -33,7 +33,6 @@ _pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
>
> fnr=19
> echo "Create extents"
> -truncate -s $(( (2 ** i) * 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..54c2ac21 100755
> --- a/tests/generic/297
> +++ b/tests/generic/297
> @@ -42,7 +42,6 @@ _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
> 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..115a9bf7 100755
> --- a/tests/generic/298
> +++ b/tests/generic/298
> @@ -42,7 +42,6 @@ _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
> for i in $(seq 0 $fnr); do
> echo " ++ Reflink size $i, $((2 ** i)) blocks" >> $seqres.full
> n=$(( (2 ** i) * blksz))
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-15 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 8:28 [PATCH v2] generic/{175,297,298}: fix use of uninitialized var Amir Goldstein
2023-08-15 11:48 ` Zorro Lang
2023-08-15 14:42 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox