Message ID | 160013427739.2923511.11743171089779718213.stgit@magnolia (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fstests: tons of random fixes | expand |
On Mon, Sep 14, 2020 at 06:44:37PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > Teach this test to deal with external log devices correctly. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- Looks good to me, Reviewed-by: Zorro Lang <zlang@redhat.com> > tests/xfs/098 | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > > diff --git a/tests/xfs/098 b/tests/xfs/098 > index c63b9d60..b7d3253e 100755 > --- a/tests/xfs/098 > +++ b/tests/xfs/098 > @@ -76,7 +76,13 @@ echo "+ corrupt image" > logstart="$(_scratch_xfs_get_sb_field logstart)" > logstart="$(_scratch_xfs_db -c "convert fsblock ${logstart} byte" | sed -e 's/^.*(\([0-9]*\).*$/\1/g')" > logblocks="$(_scratch_xfs_get_sb_field logblocks)" > -$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" "${SCRATCH_DEV}" >> $seqres.full > + > +if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_LOGDEV" ]; then > + logdev=$SCRATCH_LOGDEV > +else > + logdev=$SCRATCH_DEV > +fi > +$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" $logdev >> $seqres.full > > echo "+ mount image" > _try_scratch_mount 2>/dev/null && _fail "mount should not succeed" >
On Mon, Sep 14, 2020 at 06:44:37PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > Teach this test to deal with external log devices correctly. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/tests/xfs/098 b/tests/xfs/098 index c63b9d60..b7d3253e 100755 --- a/tests/xfs/098 +++ b/tests/xfs/098 @@ -76,7 +76,13 @@ echo "+ corrupt image" logstart="$(_scratch_xfs_get_sb_field logstart)" logstart="$(_scratch_xfs_db -c "convert fsblock ${logstart} byte" | sed -e 's/^.*(\([0-9]*\).*$/\1/g')" logblocks="$(_scratch_xfs_get_sb_field logblocks)" -$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" "${SCRATCH_DEV}" >> $seqres.full + +if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_LOGDEV" ]; then + logdev=$SCRATCH_LOGDEV +else + logdev=$SCRATCH_DEV +fi +$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" $logdev >> $seqres.full echo "+ mount image" _try_scratch_mount 2>/dev/null && _fail "mount should not succeed"