_require_btime() just check inode creation time feature on TEST_DIR
mountpoint, but generic/508 needs to do that check on SCRATCH_MNT
mountpoint. Let's add _require_scratch_btime() for that, meanwhile
handling scratch_{mkfs,mount,umount} inside the function to decouple
with caller.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
rm -f $TEST_DIR/test_creation_time
}
+_require_scratch_btime()
+{
+ _require_scratch
+ _scratch_mkfs > /dev/null 2>&1
+ _scratch_mount
+
+ $XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -v" \
+ | grep btime >>$seqres.full 2>&1 || \
+ _notrun "inode creation time not supported by this filesystem"
+
+ _scratch_unmount
+}
+
init_rc
################################################################################
_require_test_lsattr
_require_statx
_require_xfs_io_command "statx" "-v"
-_require_btime
_require_scratch
_require_scratch_shutdown
+_require_scratch_btime
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV