xfstests: skip generic/192 if noatime is set
authorDavid Sterba <dsterba@suse.cz>
Wed, 3 Jul 2013 14:00:05 +0000 (16:00 +0200)
committerBen Myers <bpm@sgi.com>
Fri, 19 Jul 2013 20:50:09 +0000 (15:50 -0500)
Test generic/192 fails if noatime is set

generic/192
    -delta1 - access time after sleep in-core: 40
    -delta2 - access time after sleep on-disk: 40
    +delta1 - access time after sleep in-core: 0
    +delta2 - access time after sleep on-disk: 0

but it's pointless to test atime effects with noatime.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
tests/generic/192

index a40c1219e63ecaeb1e2bdbeb24bfe3a238d21642..2b4e41c3719e1c2e7f39cb526805d3f4b7f7236b 100755 (executable)
@@ -38,6 +38,13 @@ _access_time()
        stat --format=%X $1
 }
 
+is_noatime_set() {
+       case "$MOUNT_OPTIONS" in
+               *noatime*) return 0;;
+       esac
+       return 1
+}
+
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
@@ -52,6 +59,10 @@ _supported_os Linux
 #delay=45
 delay=40
 
+if is_noatime_set; then
+       _notrun "this test makes no sense with noatime"
+fi
+
 testfile=$TEST_DIR/testfile
 rm -f $testfile
 rm -f $seqres.full