xfs: skip test that want to mdrestore to block devices on zoned devices
PATCH 1/1 xfs: skip test that want to mdrestore to block devices on zoned devices
mdrestore doesn't work on zoned device, so skip tests using to pre-populate a file system image.
This was previously papered over by requiring fallocate, which got removed in commit eff1baf42a79 ("common/populate: drop fallocate mode 0 requirement").
Signed-off-by Christoph Hellwig <[email protected]>
--- common/populate | 2 +- common/xfs | 14 ++++++++++++++ tests/xfs/284 | 1 + tests/xfs/598 | 1 + 4 files changed, 17 insertions(+), 1 deletion(-)
common/populate +1 -1
@@ -19,7 +19,7 @@ _require_populate_commands() { "xfs") _require_command "$XFS_DB_PROG" "xfs_db" _require_command "$WIPEFS_PROG" "wipefs" - _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + _require_scratch_xfs_mdrestore ;; ext*) _require_command "$DUMPE2FS_PROG" "dumpe2fs"
common/xfs +14 -0
@@ -772,6 +772,20 @@ _scratch_xfs_mdrestore() _xfs_mdrestore "$metadump" "$SCRATCH_DEV" "$logdev" "$rtdev" "$@" } +# Check if mdrestore to the scratch device is supported +_require_scratch_xfs_mdrestore() { + _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + + # mdrestore can't restore to zoned devices + _require_non_zoned_device $SCRATCH_DEV + if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ]; then + _require_non_zoned_device $SCRATCH_LOGDEV + fi + if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ]; then + _require_non_zoned_device $SCRATCH_RTDEV + fi +} + # Do not use xfs_repair (offline fsck) to rebuild the filesystem _xfs_skip_offline_rebuild() { touch "$RESULT_DIR/.skip_rebuild"
tests/xfs/284 +1 -0
@@ -27,6 +27,7 @@ _require_xfs_copy _require_test _require_scratch _require_no_large_scratch_dev +_require_scratch_xfs_mdrestore function filter_mounted() {
tests/xfs/598 +1 -0
@@ -28,6 +28,7 @@ _require_test _require_scratch _require_xfs_mkfs_ciname _require_xfs_ciname +_require_scratch_xfs_mdrestore _scratch_mkfs -n version=ci > $seqres.full _scratch_mount
Signature · 1 line
2.47.2
Quoted 9 lines · Christoph Hellwig
mdrestore doesn't work on zoned device, so skip tests using to pre-populate a file system image.
This was previously papered over by requiring fallocate, which got removed in commit
eff1baf42a79("common/populate: drop fallocate mode 0 requirement").Signed-off-by Christoph Hellwig <[email protected]>---
Looks good,
Reviewed-by "Darrick J. Wong" <[email protected]>
--D
Quoted 72 lines
common/populate | 2 +- common/xfs | 14 ++++++++++++++ tests/xfs/284 | 1 + tests/xfs/598 | 1 + 4 files changed, 17 insertions(+), 1 deletion(-)common/populate +1
-1@@ -19,7 +19,7 @@ _require_populate_commands() { "xfs") _require_command "$XFS_DB_PROG" "xfs_db" _require_command "$WIPEFS_PROG" "wipefs" - _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + _require_scratch_xfs_mdrestore ;; ext*) _require_command "$DUMPE2FS_PROG" "dumpe2fs"common/xfs +14
-0@@ -772,6 +772,20 @@ _scratch_xfs_mdrestore() _xfs_mdrestore "$metadump" "$SCRATCH_DEV" "$logdev" "$rtdev" "$@" } +# Check if mdrestore to the scratch device is supported +_require_scratch_xfs_mdrestore() { + _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + + # mdrestore can't restore to zoned devices + _require_non_zoned_device $SCRATCH_DEV + if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ]; then + _require_non_zoned_device $SCRATCH_LOGDEV + fi + if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ]; then + _require_non_zoned_device $SCRATCH_RTDEV + fi +} + # Do not use xfs_repair (offline fsck) to rebuild the filesystem _xfs_skip_offline_rebuild() { touch "$RESULT_DIR/.skip_rebuild"tests/xfs/284 +1
-0@@ -27,6 +27,7 @@ _require_xfs_copy _require_test _require_scratch _require_no_large_scratch_dev +_require_scratch_xfs_mdrestore function filter_mounted() {tests/xfs/598 +1
-0@@ -28,6 +28,7 @@ _require_test _require_scratch _require_xfs_mkfs_ciname _require_xfs_ciname +_require_scratch_xfs_mdrestore _scratch_mkfs -n version=ci > $seqres.full _scratch_mountSignature · 1 line
2.47.2