xfs
[Top] [All Lists]

[PATCH] xfstests: 311: fsck the dmflakey device instead of the real devi

To: <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests: 311: fsck the dmflakey device instead of the real device V2
From: Josef Bacik <jbacik@xxxxxxxxxxxx>
Date: Wed, 15 May 2013 11:20:17 -0400
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1368631221; bh=1cncM6sbzTjcTM/re/eax/imZR2jRsEHBj9SrkC4/UI=; h=From:To:Subject:Date; b=YKsHreYdPGoshAwv9NoUBz3NmhkZadE2Au8dpKrIksWZl1IMLw2+pN4OUge27EkG0 U9jRi8hhpf0aA8FWPlfIN6k/R9wdzlWvb3b2IIZOazTTHwSkDLfVSVMllWBt9OsxRd iBPzi6mplNzu336wXgo5gJ9tmQ2sql4UOQbyUEfQ=
Dave pointed out that xfs was having issues with 311 because of caching issues.
He suggested that I fsck the dm-flakey device to make sure we don't have this
problem.  Make _check_scratch_fs take an optional argument to use as the device
to fsck.  Thanks,

Signed-off-by: Josef Bacik <jbacik@xxxxxxxxxxxx>
---
V1->V2: make _check_scratch_fs() take the optional argument of the device to
check

 common/rc         |   11 +++++++----
 tests/generic/311 |    2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/common/rc b/common/rc
index 7adf8b8..fe6bbfc 100644
--- 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
 }
diff --git a/tests/generic/311 b/tests/generic/311
index 2b3b569..675d927 100644
--- a/tests/generic/311
+++ b/tests/generic/311
@@ -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
-- 
1.7.7.6

<Prev in Thread] Current Thread [Next in Thread>