mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
PATCH 3/3 V6] xfs: test changing UUID on V5 superblock
Tests xfs_db's ability to change & restore UUIDs on V5 filesystems, and tests xfs_copy's ability to change the UUID on the copy. Update to _filter_uuid is so that it will catch the UUID output from xfs_admin -u, which is slightly different than the regexp it was expecting. This requires new userspace which knows how to change the UUID on a V5 superblock. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
5b415d2be5
commit
a092363bbd
+2
-2
@@ -275,9 +275,9 @@ _filter_uuid()
|
||||
{
|
||||
if [ ! -z $1 ]; then
|
||||
UUID=$1
|
||||
sed -e "s/\(uuid:\) $UUID/\1 <EXACTUUID>/i"
|
||||
sed -e "s/\(uuid[ :=]\+\) $UUID/\1 <EXACTUUID>/i"
|
||||
else
|
||||
sed -e "s/\(uuid:\) *[0-9a-f-][0-9a-f-]*/\1 <UUID>/i"
|
||||
sed -e "s/\(uuid[ :=]\+\) *[0-9a-f-][0-9a-f-]*/\1 <UUID>/ig"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -2714,6 +2714,21 @@ _require_test_fcntl_advisory_locks()
|
||||
_notrun "Require fcntl advisory locks support"
|
||||
}
|
||||
|
||||
# XFS ability to change UUIDs on V5/CRC filesystems
|
||||
#
|
||||
_require_meta_uuid()
|
||||
{
|
||||
# This will create a crc fs on $SCRATCH_DEV
|
||||
_require_xfs_crc
|
||||
|
||||
$XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1 \
|
||||
|| _notrun "Userspace doesn't support meta_uuid feature"
|
||||
|
||||
_scratch_mount >/dev/null 2>&1 \
|
||||
|| _notrun "Kernel doesn't support meta_uuid feature"
|
||||
umount $SCRATCH_MNT
|
||||
}
|
||||
|
||||
_get_total_inode()
|
||||
{
|
||||
if [ -z "$1" ]; then
|
||||
|
||||
Reference in New Issue
Block a user