generic: test for atime-related mount options

Tests the noatime, relatime, strictatime and nodiratime mount
options.

There is an extra check for Btrfs to ensure that the access time is
never updated on read-only subvolumes. (Regression test for bug
fixed with commit 93fd63c2f001ca6797c6b15b696a484b165b4800)

Signed-off-by: Koen De Wit <koen.de.wit@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Koen De Wit
2014-02-19 08:26:56 +11:00
committed by Dave Chinner
parent 053556537f
commit db6d20e672
4 changed files with 210 additions and 0 deletions
+8
View File
@@ -2159,6 +2159,14 @@ _verify_reflink()
|| echo "$1 and $2 are not reflinks: different extents"
}
_require_relatime()
{
_scratch_mkfs > /dev/null 2>&1
_mount -t $FSTYP -o relatime $SCRATCH_DEV $SCRATCH_MNT || \
_notrun "relatime not supported by the current kernel"
_scratch_unmount
}
_create_loop_device()
{
file=$1