common/rc: ignore MKFS_OPTIONS in _scratch_mkfs_xfs_supported()
PATCH 1/1 common/rc: ignore MKFS_OPTIONS in _scratch_mkfs_xfs_supported()
In recent mkfs updates in xfsprogs, commit 9090e187bc3e ("mkfs: add respecification detection to generic parsing") added re-specification detection to "-m" option, it causes several tests _notrun if MKFS_OPTIONS has the same options as those being tested in _scratch_mkfs_xfs_supported(), because they're specified multiple times.
MKFS_OPTIONS="-m crc=0" ./check xfs/001 xfs/001 3s ... [not run] mkfs.xfs doesn't have crc feature
Fix it by removing MKFS_OPTIONS when testing mkfs features in _scratch_mkfs_xfs_supported(), only $mkfs_opts matters.
--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
@@ -477,7 +477,7 @@ _scratch_mkfs_xfs_supported() _scratch_options mkfs - $MKFS_XFS_PROG -N $MKFS_OPTIONS $SCRATCH_OPTIONS $mkfs_opts $SCRATCH_DEV + $MKFS_XFS_PROG -N $SCRATCH_OPTIONS $mkfs_opts $SCRATCH_DEV } _scratch_mkfs_xfs()
Signature · 1 line
2.5.5
Quoted 6 lines · Eryu Guan
In recent mkfs updates in xfsprogs, commit
9090e187bc3e("mkfs: add respecification detection to generic parsing") added re-specification detection to "-m" option, it causes several tests_notrunifMKFS_OPTIONShas the same options as those being tested in_scratch_mkfs_xfs_supported(), because they're specified multiple times.
Quoted 7 lines
MKFS_OPTIONS="-m crc=0" ./check xfs/001 xfs/001 3s ... [not run] mkfs.xfs doesn't have crc featureFix it by removing
MKFS_OPTIONSwhen testing mkfs features in_scratch_mkfs_xfs_supported(), only $mkfs_opts matters.Signed-off-by Eryu Guan <[email protected]>
Self-NAK, this breaks other tests like xfs/186. Currently xfs/186 only runs with MKFS_OPTIONS="-m crc=0" set, and depends on MKFS_OPTIONS in _scratch_mkfs_xfs_supported(). Not sure what's the best fix yet.
Thanks,
Eryu
Quoted 20 lines
--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-1@@ -477,7 +477,7 @@ _scratch_mkfs_xfs_supported() _scratch_options mkfs - $MKFS_XFS_PROG -N $MKFS_OPTIONS $SCRATCH_OPTIONS $mkfs_opts $SCRATCH_DEV + $MKFS_XFS_PROG -N $SCRATCH_OPTIONS $mkfs_opts $SCRATCH_DEV } _scratch_mkfs_xfs()Signature · 1 line
2.5.5