generic/04[456] tests how truncate and delayed allocation works. ext4 uses the data=ordered to avoid exposing stale data, and so it uses a different mechanism than xfs. So these tests will fail on it. Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> --- common/rc | 19 +++++++++++++++++++ tests/generic/044 | 1 + tests/generic/045 | 1 + tests/generic/046 | 1 + 4 files changed, 22 insertions(+) diff --git a/common/rc b/common/rc index 9bed6dad9303..dd640c70f428 100644 --- a/common/rc +++ b/common/rc @@ -4495,6 +4495,25 @@ _exclude_test_mount_option() _exclude_mount_option "$TEST_FS_MOUNT_OPTS" $@ } +_require_scratch_mount_ordered() +{ + [ "$FSTYP" = "ext4" ] || return + + _require_scratch + + local ordered_set=false + for opt in $(_normalize_mount_options "$MOUNT_OPTIONS"); do + case "$opt" in + data=ordered) + ordered_set=true + break + ;; + esac + done + + $ordered_set || _notrun "Test requires ext4 with data=ordered mount option" +} + _require_atime() { _exclude_scratch_mount_option "noatime" diff --git a/tests/generic/044 b/tests/generic/044 index 5d21875cf772..b596f66d07e8 100755 --- a/tests/generic/044 +++ b/tests/generic/044 @@ -19,6 +19,7 @@ _require_xfs_io_command "fiemap" _scratch_mkfs >/dev/null 2>&1 _require_metadata_journaling $SCRATCH_DEV _scratch_mount +_require_scratch_mount_ordered # create files i=1; diff --git a/tests/generic/045 b/tests/generic/045 index 9904142f89ac..3ee59642239c 100755 --- a/tests/generic/045 +++ b/tests/generic/045 @@ -19,6 +19,7 @@ _require_xfs_io_command "fiemap" _scratch_mkfs >/dev/null 2>&1 _require_metadata_journaling $SCRATCH_DEV _scratch_mount +_require_scratch_mount_ordered # create files i=1; diff --git a/tests/generic/046 b/tests/generic/046 index 5ed60c762fe8..9e77bd9573af 100755 --- a/tests/generic/046 +++ b/tests/generic/046 @@ -19,6 +19,7 @@ _require_xfs_io_command "fiemap" _scratch_mkfs >/dev/null 2>&1 _require_metadata_journaling $SCRATCH_DEV _scratch_mount +_require_scratch_mount_ordered # create files i=1; -- 2.47.2