mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: add a _require_xfs_copy helper
Add a _require helper so that tests can ensure that they're running in the correct environment for xfs_copy to work (no external devices). Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
ff334a75e2
commit
a98a9c291a
@@ -945,3 +945,10 @@ _try_wipe_scratch_xfs()
|
||||
fi
|
||||
rm -f $tmp.mkfs
|
||||
}
|
||||
|
||||
_require_xfs_copy()
|
||||
{
|
||||
[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"
|
||||
[ "$USE_EXTERNAL" = yes ] && \
|
||||
_notrun "Cannot xfs_copy with external devices"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user