generic/508: fix to check inode creation time feature on scratch mountpoint
[xfstests-dev.git] / common / rc
index 38d9de7207ee68af0a3176d82ab6566359c63793..d20bb36cba58fec3896ae2d1b112fb56c583be61 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -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
 
 ################################################################################