diff mbox

[2/4] xfstests: make _scratch_mkfs_blocksized usable

Message ID 1454515328-1586-3-git-send-email-hch@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig Feb. 3, 2016, 4:02 p.m. UTC
See http://www.infradead.org/rpr.html

The default mkfs.xfs options contain -b size=4096, so all tests
using _scratch_mkfs_blocksized won't actually run unless those
options are changed.  As we're trying to specificly test 1k
blocks we should always override the default option.

BTW, why is _scratch_mkfs_blocksized in the reflink file and not
with more generic helpers?

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/reflink | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Darrick J. Wong Feb. 3, 2016, 9:13 p.m. UTC | #1
On Wed, Feb 03, 2016 at 05:02:06PM +0100, Christoph Hellwig wrote:
> See http://www.infradead.org/rpr.html
> 
> The default mkfs.xfs options contain -b size=4096, so all tests
> using _scratch_mkfs_blocksized won't actually run unless those
> options are changed.  As we're trying to specificly test 1k
> blocks we should always override the default option.
> 
> BTW, why is _scratch_mkfs_blocksized in the reflink file and not
> with more generic helpers?

Uh... I don't know.  I'll move it.  I have a feeling this might have
slipped through the cracks. :/

Applied, thanks.

--D

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  common/reflink | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/common/reflink b/common/reflink
> index 398e505..bb1068a 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -201,13 +201,7 @@ _scratch_mkfs_blocksized()
>  
>      case $FSTYP in
>      xfs)
> -	# don't override MKFS_OPTIONS that set a block size.
> -	echo $MKFS_OPTIONS |egrep -q "b?size="
> -	if [ $? -eq 0 ]; then
> -		_scratch_mkfs_xfs
> -	else
> -		_scratch_mkfs_xfs -b size=$blocksize
> -	fi
> +	_scratch_mkfs_xfs -b size=$blocksize
>  	;;
>      ext2|ext3|ext4|ocfs2)
>  	${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV
> -- 
> 2.1.4
> 
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/common/reflink b/common/reflink
index 398e505..bb1068a 100644
--- a/common/reflink
+++ b/common/reflink
@@ -201,13 +201,7 @@  _scratch_mkfs_blocksized()
 
     case $FSTYP in
     xfs)
-	# don't override MKFS_OPTIONS that set a block size.
-	echo $MKFS_OPTIONS |egrep -q "b?size="
-	if [ $? -eq 0 ]; then
-		_scratch_mkfs_xfs
-	else
-		_scratch_mkfs_xfs -b size=$blocksize
-	fi
+	_scratch_mkfs_xfs -b size=$blocksize
 	;;
     ext2|ext3|ext4|ocfs2)
 	${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV