Whamcloud - gitweb
LU-797 tests: skip ost-pools.sh 23b when SLOW=no
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 3 Feb 2012 22:27:40 +0000 (15:27 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 15 Feb 2012 16:34:47 +0000 (11:34 -0500)
Running test_23b can take over 30 minutes, and should not be run on a
large LUN inside a VM.  Print out some of the constants that determine
whether the test is run or not, for debugging purposes.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7491002276e36994be4baf30a731576c8ced7530
Reviewed-on: http://review.whamcloud.com/2091
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/tests/ost-pools.sh

index 4036e5f..a9416a1 100644 (file)
@@ -29,6 +29,8 @@ init_logging
 
 check_and_setup_lustre
 
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="23b"
+
 DIR=${DIR:-$MOUNT}
 assert_DIR
 
@@ -1245,7 +1247,9 @@ test_23b() {
     AVAIL=$($LFS df -p $POOL $dir | awk '/summary/ { print $4 }')
     [ $AVAIL -gt $MAXFREE ] &&
         skip_env "Filesystem space $AVAIL is larger than $MAXFREE limit" &&
-                       return 0
+            return 0
+    log "OSTCOUNT=$OSTCOUNT, OSTSIZE=$OSTSIZE"
+    log "MAXFREE=$MAXFREE, AVAIL=$AVAIL, SLOW=$SLOW"
 
     $LFS quotaoff -ug $MOUNT
     chown $RUNAS_ID.$RUNAS_ID $dir
@@ -1258,10 +1262,10 @@ test_23b() {
         RC=$?
                echo "$i: $stat"
         if [ $RC -eq 1 ]; then
-            echo $stat | grep "Disk quota exceeded"
+            echo $stat | grep -q "Disk quota exceeded"
             [[ $? -eq 0 ]] && error "dd failed with EDQUOT with quota off"
 
-            echo $stat | grep "No space left on device"
+            echo $stat | grep -q "No space left on device"
             [[ $? -ne 0 ]] &&
                 error "dd did not fail with ENOSPC"
         fi