diff mbox series

[2/4] common/xfs: fix broken code in _check_xfs_filesystem

Message ID 164740141477.3371628.6804259397500636490.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: random fixes | expand

Commit Message

Darrick J. Wong March 16, 2022, 3:30 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Fix some problems with undefined variables in the scrub control code.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/xfs |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Zorro Lang March 22, 2022, 4:57 a.m. UTC | #1
On Tue, Mar 15, 2022 at 08:30:14PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Fix some problems with undefined variables in the scrub control code.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Actually from the beginning I don't know what's the $scrubflag used for, due
to it never be used in any other place of xfstests. I thought you left it for
personal debug reason, or even thought you'd like to make it as XFS_SCRUB_FLAG
to be a global parameter. Anyway I'm good if you'd like to remove it now.

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  common/xfs |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/common/xfs b/common/xfs
> index 053b6189..ac1d021e 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -568,12 +568,12 @@ _check_xfs_filesystem()
>  		# before executing a scrub operation.
>  		$XFS_IO_PROG -c syncfs $mntpt >> $seqres.full 2>&1
>  
> -		"$XFS_SCRUB_PROG" $scrubflag -v -d -n $mntpt > $tmp.scrub 2>&1
> +		"$XFS_SCRUB_PROG" -v -d -n $mntpt > $tmp.scrub 2>&1
>  		if [ $? -ne 0 ]; then
>  			_log_err "_check_xfs_filesystem: filesystem on $device failed scrub"
> -			echo "*** xfs_scrub $scrubflag -v -d -n output ***" >> $seqres.full
> +			echo "*** xfs_scrub -v -d -n output ***" >> $seqres.full
>  			cat $tmp.scrub >> $seqres.full
> -			echo "*** end xfs_scrub output" >> $serqres.full
> +			echo "*** end xfs_scrub output" >> $seqres.full
>  			ok=0
>  		fi
>  		rm -f $tmp.scrub
>
diff mbox series

Patch

diff --git a/common/xfs b/common/xfs
index 053b6189..ac1d021e 100644
--- a/common/xfs
+++ b/common/xfs
@@ -568,12 +568,12 @@  _check_xfs_filesystem()
 		# before executing a scrub operation.
 		$XFS_IO_PROG -c syncfs $mntpt >> $seqres.full 2>&1
 
-		"$XFS_SCRUB_PROG" $scrubflag -v -d -n $mntpt > $tmp.scrub 2>&1
+		"$XFS_SCRUB_PROG" -v -d -n $mntpt > $tmp.scrub 2>&1
 		if [ $? -ne 0 ]; then
 			_log_err "_check_xfs_filesystem: filesystem on $device failed scrub"
-			echo "*** xfs_scrub $scrubflag -v -d -n output ***" >> $seqres.full
+			echo "*** xfs_scrub -v -d -n output ***" >> $seqres.full
 			cat $tmp.scrub >> $seqres.full
-			echo "*** end xfs_scrub output" >> $serqres.full
+			echo "*** end xfs_scrub output" >> $seqres.full
 			ok=0
 		fi
 		rm -f $tmp.scrub