Whamcloud - gitweb
LU-3858 test: fix sanity 27A failure caused by stripe delay 95/7495/4
authorLi Xi <lixi@ddn.com>
Sat, 31 Aug 2013 13:39:36 +0000 (06:39 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 6 Nov 2013 06:57:00 +0000 (06:57 +0000)
When clearing the stripe of root directory, the updating of stripe
might be delayed because of the processing delay of config log.
This will cause the failure of sanity 27A test.

This makes the test suit wait for the update of root directory
stripe.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Ib4f96d9d4d0ae8a0b54e3e306a7abed758dbdf39
Reviewed-on: http://review.whamcloud.com/7495
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index c78359f..a7031ca 100644 (file)
@@ -1809,13 +1809,13 @@ test_27A() { # b=19102
         local restore_count=$($GETSTRIPE -c $MOUNT)
         local restore_offset=$($GETSTRIPE -i $MOUNT)
         $SETSTRIPE -c 0 -i -1 -S 0 $MOUNT
+        wait_update $HOSTNAME "$GETSTRIPE -c $MOUNT | sed 's/  *//g'" "1" 20 ||
+                error "stripe count $($GETSTRIPE -c $MOUNT) != 1"
         local default_size=$($GETSTRIPE -S $MOUNT)
-        local default_count=$($GETSTRIPE -c $MOUNT)
         local default_offset=$($GETSTRIPE -i $MOUNT)
         local dsize=$((1024 * 1024))
         [ $default_size -eq $dsize ] ||
                 error "stripe size $default_size != $dsize"
-        [ $default_count -eq 1 ] || error "stripe count $default_count != 1"
         [ $default_offset -eq -1 ] ||error "stripe offset $default_offset != -1"
         $SETSTRIPE -c $restore_count -i $restore_offset -S $restore_size $MOUNT
 }