mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: fix $XFS_DB_PROG usage
xfs_db requires us to pass in the log device, if any; this can be accomplished via _scratch_xfs_db_options (if we're operating on the scratch device, anyway). However, many of the tests/xfs/ scripts pass only $SCRATCH_DEV directly, so they'll fail if we test with an external log. Fix that by adding a new _scratch_xfs_db helper. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
fff869cb9c
commit
c08ebd092d
@@ -1106,6 +1106,11 @@ _scratch_xfs_db_options()
|
||||
echo $SCRATCH_OPTIONS $* $SCRATCH_DEV
|
||||
}
|
||||
|
||||
_scratch_xfs_db()
|
||||
{
|
||||
$XFS_DB_PROG "$@" $(_scratch_xfs_db_options)
|
||||
}
|
||||
|
||||
_scratch_xfs_logprint()
|
||||
{
|
||||
SCRATCH_OPTIONS=""
|
||||
@@ -2083,7 +2088,7 @@ _require_xfs_db_command()
|
||||
fi
|
||||
command=$1
|
||||
|
||||
$XFS_DB_PROG -x -c "help" $SCRATCH_DEV | grep $command > /dev/null || \
|
||||
_scratch_xfs_db -x -c "help" | grep $command > /dev/null || \
|
||||
_notrun "xfs_db $command support is missing"
|
||||
}
|
||||
|
||||
@@ -3367,11 +3372,11 @@ _require_meta_uuid()
|
||||
# This will create a crc fs on $SCRATCH_DEV
|
||||
_require_xfs_crc
|
||||
|
||||
$XFS_DB_PROG -x -c "uuid restore" $SCRATCH_DEV 2>&1 \
|
||||
_scratch_xfs_db -x -c "uuid restore" 2>&1 \
|
||||
| grep -q "invalid UUID\|supported on V5 fs" \
|
||||
&& _notrun "Userspace doesn't support meta_uuid feature"
|
||||
|
||||
$XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1
|
||||
_scratch_xfs_db -x -c "uuid generate" >/dev/null 2>&1
|
||||
|
||||
_scratch_mount >/dev/null 2>&1 \
|
||||
|| _notrun "Kernel doesn't support meta_uuid feature"
|
||||
|
||||
Reference in New Issue
Block a user