generic/258: check filesystem support for negative timestamps

Some filesystems do not support negative c/m/atime timestamps. And
for these filesystems, generic/258 will fail.

Since there's currently no way to check sb->s_time_min from
userspace, this patch adds a new common/rc function
_require_negative_timestamps() that will _notrun depending on the
$FSTYP variable.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Luis Henriques
2020-03-04 16:11:20 +00:00
committed by Eryu Guan
parent b2faf20470
commit b2d552fbca
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -4168,6 +4168,14 @@ _check_xfs_scrub_does_unicode() {
return 0
}
_require_negative_timestamps() {
case "$FSTYP" in
ceph)
_notrun "$FSTYP does not support negative timestamps"
;;
esac
}
init_rc
################################################################################
+1
View File
@@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_test
_require_negative_timestamps
TESTFILE=$TEST_DIR/timestamp-test.txt