[XFSTESTS 2/6] check: Enforce xfs filesystem recreation on $TEST_DEV

Carlos Maiolino cmaiolino at redhat.com
Tue Dec 1 08:43:29 CST 2015


On Wed, Nov 18, 2015 at 03:17:45PM +0100, Andreas Gruenbacher wrote:
> When recreating xfs filesystems on $TEST_DEV, pass option -f to enforce
> the filesystem creation instead of refusing to overwrite existing xfs
> filesystems.  We already do that for ext2/ext3/ext4 filesystems.
> 

I don't believe this is a right thing to do, $TEST_DEV isn't supposed to be
rebuilt, but, to be kept around over several xfstests runs, for filesystem aging
testing.

Having this here might cause a xfstests user to accidentally mkfs an aged
filesystem, which IMHO is not something we want to do with $TEST_DEV


> Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
> ---
>  common/rc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 4c2f42c..ce6ae3d 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -572,6 +572,9 @@ _test_mkfs()
>      btrfs)
>          $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
>  	;;
> +    xfs)
> +	$MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV
> +	;;
>      ext2|ext3|ext4)
>  	$MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV
>  	;;
> -- 
> 2.5.0
> 
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos



More information about the xfs mailing list