]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/{175,297,298}: fix use of uninitialized var
authorAmir Goldstein <amir73il@gmail.com>
Tue, 15 Aug 2023 08:28:35 +0000 (11:28 +0300)
committerZorro Lang <zlang@kernel.org>
Fri, 18 Aug 2023 18:48:06 +0000 (02:48 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/175
tests/generic/297
tests/generic/298

index 07af21992051102568d205d368b4c53607a840b5..f827beb67fe9c6720b910bb85e565ce0347623c6 100755 (executable)
@@ -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))
index 6bdc3e1c7a50a7d337df4998ff23df4c6665d178..54c2ac2142b6a5760d656b7a2e11b6524a6f53b3 100755 (executable)
@@ -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))
index 95d4c02bce985cbe558b0da5ea7eaea1b0d23693..115a9bf74ef204ce89f4a82d210863b9b14f5e08 100755 (executable)
@@ -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))