]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: 311: fsck the dmflakey device instead of the real device
authorJosef Bacik <jbacik@fusionio.com>
Thu, 16 May 2013 13:48:03 +0000 (08:48 -0500)
committerRich Johnston <rjohnston@sgi.com>
Thu, 16 May 2013 13:48:03 +0000 (08:48 -0500)
xfs was having issues with generic/311 because of caching issues. Make
_check_scratch_fs take an optional argument to use as the device to fsck.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/rc
tests/generic/311 [changed mode: 0755->0644]

index 7adf8b8cd587f1c249b8632232d5ded8bc10c362..fe6bbfcbfc553e60c7c7683afc3349518d71acdd 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1678,6 +1678,9 @@ _check_test_fs()
 
 _check_scratch_fs()
 {
+    device=$SCRATCH_DEV
+    [ $# -eq 1 ] && device=$1
+
     case $FSTYP in
     xfs)
        SCRATCH_LOG="none"
@@ -1688,19 +1691,19 @@ _check_scratch_fs()
        [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
            SCRATCH_RT="$SCRATCH_RTDEV"
 
-       _check_xfs_filesystem $SCRATCH_DEV $SCRATCH_LOG $SCRATCH_RT
+       _check_xfs_filesystem $device $SCRATCH_LOG $SCRATCH_RT
        ;;
     udf)
-       _check_udf_filesystem $SCRATCH_DEV $udf_fsize
+       _check_udf_filesystem $device $udf_fsize
        ;;
     nfs*)
        # Don't know how to check an NFS filesystem, yet.
        ;;
     btrfs)
-       _check_btrfs_filesystem $SCRATCH_DEV
+       _check_btrfs_filesystem $device
        ;;
     *)
-       _check_generic_filesystem $SCRATCH_DEV
+       _check_generic_filesystem $device
        ;;
     esac
 }
old mode 100755 (executable)
new mode 100644 (file)
index 2b3b569..675d927
@@ -125,7 +125,7 @@ _run_test()
 
        #Unmount and fsck to make sure we got a valid fs after replay
        _unmount_flakey
-       _check_scratch_fs
+       _check_scratch_fs $FLAKEY_DEV
        [ $? -ne 0 ] && _fatal "fsck failed"
 
        _mount_flakey