Whamcloud - gitweb
LU-3413 scrub: NOT create new files in test_11 during scrub 85/6485/5
authorFan Yong <fan.yong@intel.com>
Sat, 25 May 2013 06:18:40 +0000 (14:18 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 02:31:12 +0000 (02:31 +0000)
In sanity-scrub test_11, there may be new files created between two
cycles OI scrub. The test scripts cannot distinguish whether the OI
scrub skipped objects are new created or caused by OI scrub issues.

So we umount the clients after the test environment preparation to
prevent new files to be created from client during OI scrub.

On the other hand, enable full debug to check whether some internal
files creating during the OI scrub.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie1bdebd12ea456bab07bd4c3a55776fa9451144e
Reviewed-on: http://review.whamcloud.com/6485
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/tests/sanity-scrub.sh

index e8e13fa..4f73945 100644 (file)
@@ -26,6 +26,7 @@ SAVED_OSTSIZE=${OSTSIZE}
 MDSSIZE=100000
 OSTSIZE=100000
 
+MOUNT_2=""
 check_and_setup_lustre
 
 [ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
@@ -760,6 +761,9 @@ test_11() {
 
        createmany -o $MOUNT/$tname/f $CREATED || error "(2) Fail to create!"
 
+       cleanup_mount $MOUNT
+       do_facet $SINGLEMDS $LCTL clear
+       start_full_debug_logging
        # reset OI scrub start point by force
        $START_SCRUB -r || error "(3) Fail to start OI scrub!"
        sleep 3
@@ -789,6 +793,8 @@ test_11() {
        [ $SKIPPED -eq 0 ] ||
                error "(8) Expect 0 objects skipped, but got $SKIPPED"
 
+       stop_full_debug_logging
+       restore_mount $MOUNT || error "(9) Fail to start client!"
        rm -rf $MOUNT/$tname > /dev/null
 }
 run_test 11 "OI scrub skips the new created objects only once"