generic/508: fix to check inode creation time feature on scratch mountpoint

_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>
This commit is contained in:
Chao Yu
2018-10-27 09:55:20 +08:00
committed by Eryu Guan
parent 298be055a0
commit d98030d212
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -3830,6 +3830,19 @@ _require_btime()
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
################################################################################
+1 -1
View File
@@ -46,10 +46,10 @@ _supported_os Linux
_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