misc xfstests fixes
Hi all,
this fixes a few failures I'm seeing on unusual configurations not expected by the tests.
PATCH 1/3 generic/484: force I/O to the data device for XFS
Otherwise the error injection to the data device might not work as expected. For example in some zoned setups I see the failures in a slightly different spot than expected without this.
--- tests/generic/484 | 3 +++ 1 file changed, 3 insertions(+)
tests/generic/484 +3 -0
@@ -42,6 +42,9 @@ _scratch_mkfs > $seqres.full 2>&1 _dmerror_init _dmerror_mount +# ensure we are on the data device, as dm error inject the error there +[ "$FSTYP" == "xfs" ] && _xfs_force_bdev data $SCRATCH_MNT + # create file testfile=$SCRATCH_MNT/syncfs-reports-errors touch $testfile
Signature · 1 line
2.47.3
Re: [PATCH 1/3] generic/484: force I/O to the data device for XFS
Quoted 5 lines · Christoph Hellwig
Otherwise the error injection to the data device might not work as expected. For example in some zoned setups I see the failures in a slightly different spot than expected without this.
Signed-off-by Christoph Hellwig <[email protected]>
Wow, how did I miss this all these years?
Ohhh, because this is an internal-rtdev failure isn't it?
How about removing the "unset SCRATCH_RTDEV" a few lines up too?
With that,
--D
Quoted 22 lines
--- tests/generic/484 | 3 +++ 1 file changed, 3 insertions(+)tests/generic/484 +3
-0@@ -42,6 +42,9 @@ _scratch_mkfs > $seqres.full 2>&1 _dmerror_init _dmerror_mount +# ensure we are on the data device, as dm error inject the error there +[ "$FSTYP" == "xfs" ] && _xfs_force_bdev data $SCRATCH_MNT + # create file testfile=$SCRATCH_MNT/syncfs-reports-errors touch $testfileSignature · 1 line
2.47.3
PATCH 2/3 xfs/049: create the nested XFS file systems on the loop device
In reply to Christoph HellwigWithout this I see failures on 4k sector size RT devices, as mkfs.xfs can't pick up the logical block size on files. Note that the test already does this for the nested ext2 image as well.
--- tests/xfs/049 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/xfs/049 +3 -2
@@ -58,7 +58,9 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seqres.full 2>&1 \ || _fail "!!! failed to mount" _log "Create xfs fs in file on scratch" -${MKFS_XFS_PROG} -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \ +truncate -s 40m $SCRATCH_MNT/test.xfs +loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs) +${MKFS_XFS_PROG} -f $loop_dev1 \ >> $seqres.full 2>&1 \ || _fail "!!! failed to mkfs xfs"
@@ -67,7 +69,6 @@ mkdir $SCRATCH_MNT/test $SCRATCH_MNT/test2 >> $seqres.full 2>&1 \ || _fail "!!! failed to make mount points" _log "Mount xfs via loop" -loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs) _mount $loop_dev1 $SCRATCH_MNT/test >> $seqres.full 2>&1 \ || _fail "!!! failed to loop mount xfs"
Signature · 1 line
2.47.3
Re: [PATCH 2/3] xfs/049: create the nested XFS file systems on the loop device
Quoted 5 lines · Christoph Hellwig
Without this I see failures on 4k sector size RT devices, as mkfs.xfs can't pick up the logical block size on files. Note that the test already does this for the nested ext2 image as well.
Signed-off-by Christoph Hellwig <[email protected]>
LGTM,
--D
Quoted 31 lines
--- tests/xfs/049 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/xfs/049 +3
-2@@ -58,7 +58,9 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seqres.full 2>&1 \ || _fail "!!! failed to mount" _log "Create xfs fs in file on scratch" -${MKFS_XFS_PROG} -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \ +truncate -s 40m $SCRATCH_MNT/test.xfs +loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs) +${MKFS_XFS_PROG} -f $loop_dev1 \ >> $seqres.full 2>&1 \ || _fail "!!! failed to mkfs xfs"@@ -67,7 +69,6 @@ mkdir $SCRATCH_MNT/test $SCRATCH_MNT/test2 >> $seqres.full 2>&1 \ || _fail "!!! failed to make mount points" _log "Mount xfs via loop" -loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs) _mount $loop_dev1 $SCRATCH_MNT/test >> $seqres.full 2>&1 \ || _fail "!!! failed to loop mount xfs"Signature · 1 line
2.47.3
PATCH 3/3 xfs/158: _notrun when the file system can't be created
In reply to Christoph HellwigI get an "inode btree counters not supported without finobt support" with some zoned setups with the latests xfsprogs. Just _notrun the test if we can't create the original file system feature combination that we're trying to upgrade from.
--- tests/xfs/158 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tests/xfs/158 +4 -2
@@ -22,12 +22,14 @@ _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ echo "Should not be able to format with inobtcount but not finobt." # Make sure we can't upgrade a filesystem to inobtcount without finobt. -_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_xfs_admin -O inobtcount=1 2>> $seqres.full _check_scratch_xfs_features INOBTCNT # Format V5 filesystem without inode btree counter support and populate it. -_scratch_mkfs -m crc=1,inobtcount=0 >> $seqres.full +_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_mount mkdir $SCRATCH_MNT/stress
Signature · 1 line
2.47.3
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
Quoted 4 lines · Christoph Hellwig
I get an "inode btree counters not supported without finobt support" with some zoned setups with the latests xfsprogs. Just
_notrunthe test if we can't create the original file system feature combination that we're trying to upgrade from.
What configuration, specifically? I haven't noticed any problems with xfs/158 and:
MKFS_OPTIONS -- -f -m metadir=1 -r zoned=1 /dev/sdfMKFS_OPTIONS -- -f -rrtdev=/dev/sdd -m metadir=1 -d rtinherit=1 -r zoned=1 /dev/sdf
--D
Quoted 30 lines
Signed-off-by Christoph Hellwig <[email protected]>--- tests/xfs/158 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)tests/xfs/158 +4
-2@@ -22,12 +22,14 @@ _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ echo "Should not be able to format with inobtcount but not finobt." # Make sure we can't upgrade a filesystem to inobtcount without finobt. -_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_xfs_admin -O inobtcount=1 2>> $seqres.full _check_scratch_xfs_features INOBTCNT # Format V5 filesystem without inode btree counter support and populate it. -_scratch_mkfs -m crc=1,inobtcount=0 >> $seqres.full +_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_mount mkdir $SCRATCH_MNT/stressSignature · 1 line
2.47.3
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
In reply to Christoph HellwigQuoted 15 lines · Christoph Hellwig
I get an "inode btree counters not supported without finobt support" with some zoned setups with the latests xfsprogs. Just
_notrunthe test if we can't create the original file system feature combination that we're trying to upgrade from.Signed-off-by Christoph Hellwig <[email protected]>--- tests/xfs/158 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)tests/xfs/158 +0
-0
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 25
Quoted 5 lines
tests/xfs/158 +1
-1@@ -22,12 +22,14 @@ _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ echo "Should not be able to format with inobtcount but not finobt." # Make sure we can't upgrade a filesystem to inobtcount without finobt. -_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \
Hmm... is "try_scratch_mkfs" a function in your personal repo ?
Quoted 14 lines
tests/xfs/158 +3
-1+ _notrun "invalid feature combination" >> $seqres.full _scratch_xfs_admin -O inobtcount=1 2>> $seqres.full _check_scratch_xfs_features INOBTCNT # Format V5 filesystem without inode btree counter support and populate it. -_scratch_mkfs -m crc=1,inobtcount=0 >> $seqres.full +_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_mount mkdir $SCRATCH_MNT/stressSignature · 1 line
2.47.3
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
Quoted 5 lines · Zorro Lang
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 25
Quoted 3 lines
# Make sure we can't upgrade a filesystem to inobtcount without finobt.
tests/xfs/158 +1
-1-_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \Hmm... is "
try_scratch_mkfs" a function in your personal repo ?
This was supposed to be _try_scratch_mkfs. But I guess that typo is a good way to make the test never fail :)
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Zorro Lang
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 25
Quoted 3 lines
# Make sure we can't upgrade a filesystem to inobtcount without finobt.
tests/xfs/158 +1
-1-_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \Hmm... is "
try_scratch_mkfs" a function in your personal repo ?This was supposed to be
_try_scratch_mkfs. But I guess that typo is a good way to make the test never fail :)
Hah, but there's not _try_scratch_mkfs in mainline fstests currently, there's _try_scratch_mkfs_xfs .
Quoted 1 line
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
In reply to Christoph HellwigQuoted 18 lines · Christoph Hellwig
I get an "inode btree counters not supported without finobt support" with some zoned setups with the latests xfsprogs. Just
_notrunthe test if we can't create the original file system feature combination that we're trying to upgrade from.Signed-off-by Christoph Hellwig <[email protected]>--- tests/xfs/158 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)tests/xfs/158 +0
-0@@ -22,12 +22,14 @@ _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ echo "Should not be able to format with inobtcount but not finobt." # Make sure we can't upgrade a filesystem to inobtcount without finobt.
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 32
Quoted 10 lines
tests/xfs/158 +4
-2-_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full +try_scratch_mkfs -m crc=1,inobtcount=0,finobt=0 || \ + _notrun "invalid feature combination" >> $seqres.full _scratch_xfs_admin -O inobtcount=1 2>> $seqres.full _check_scratch_xfs_features INOBTCNT # Format V5 filesystem without inode btree counter support and populate it. -_scratch_mkfs -m crc=1,inobtcount=0 >> $seqres.full +_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.full
Hi Christoph,
BTW, shouldn't we do ">> $seqres.full" behind the _scratch_mkfs, why does that for _notrun?
Two patches of this patchset have been acked. As this patchset is a random fix, so I'd like to merge those 2 "acked" patches at first, then you can re-send the 3rd patch with other patches later. Is that good to you?
Thanks,
Zorro
Quoted 6 lines
tests/xfs/158 +0
-0_scratch_mount mkdir $SCRATCH_MNT/stressSignature · 1 line
2.47.3
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
Quoted 11 lines · Zorro Lang
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 32
Quoted 2 lines
tests/xfs/158 +2
-0+_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.fullHi Christoph,
BTW, shouldn't we do ">> $seqres.full" behind the
_scratch_mkfs, why does that for_notrun?Two patches of this patchset have been acked. As this patchset is a random fix, so I'd like to merge those 2 "acked" patches at first, then you can re-send the 3rd patch with other patches later. Is that good to you?
Please drop it. I have some ideas to attack the whole set of issues with combining flags in a more systematic way, but I'll need some time to try and test them.
Re: [PATCH 3/3] xfs/158: _notrun when the file system can't be created
Quoted 9 lines · Christoph Hellwig
Quoted 8 lines · Zorro Lang
tests/xfs/158 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \ · line 32
Quoted 2 lines
tests/xfs/158 +2
-0+_scratch_mkfs -m crc=1,inobtcount=0 || \ + _notrun "invalid feature combination" >> $seqres.fullHi Christoph,
BTW, shouldn't we do ">> $seqres.full" behind the
_scratch_mkfs, why does that for_notrun?
Quoted 7 lines
Quoted 3 lines
Two patches of this patchset have been acked. As this patchset is a random fix, so I'd like to merge those 2 "acked" patches at first, then you can re-send the 3rd patch with other patches later. Is that good to you?
Please drop it. I have some ideas to attack the whole set of issues with combining flags in a more systematic way, but I'll need some time to try and test them.
OK, thanks Christoph, I'll merge other 2 patches in next fstests release.