Whamcloud - gitweb
add test_68(using lustre file as swap space) into slow test set because it always...
authorjxiong <jxiong>
Tue, 23 Oct 2007 05:46:35 +0000 (05:46 +0000)
committerjxiong <jxiong>
Tue, 23 Oct 2007 05:46:35 +0000 (05:46 +0000)
lustre/tests/sanity.sh

index 6285336..7d1e1b0 100644 (file)
@@ -11,7 +11,7 @@ ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"14c  27o  27q  42a  42b  42c  42d  45   74b   75"}
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 24o 27m 36f 36g 51b 51c 60c 63 64b 71 73 101 103 115 120g"
+[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 101 103 115 120g"
 
 # Tests that fail on uml, maybe elsewhere, FIXME
 CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
@@ -2830,8 +2830,12 @@ test_68() {
        grep -q llite_lloop /proc/modules
        [ $? -ne 0 ] && skip "can't find module llite_lloop" && return
 
+        MEMTOTAL=`meminfo MemTotal`
+        NR_BLOCKS=$((MEMTOTAL>>8))
+        [[ $NR_BLOCKS -le 2048 ]] && NR_BLOCKS=2048
+
        LLOOP=$TMP/lloop.`date +%s`.`date +%N`
-       dd if=/dev/zero of=$DIR/f68 bs=64k seek=2047 count=1
+       dd if=/dev/zero of=$DIR/f68 bs=64k seek=$NR_BLOCKS count=1
        mkswap $DIR/f68
 
        $LCTL blockdev_attach $DIR/f68 $LLOOP || error "attach failed"
@@ -2841,7 +2845,6 @@ test_68() {
        swapon -p 32767 $LLOOP || error "swapon $LLOOP failed"
 
        echo "before: `swapon -s | grep $LLOOP`"
-       MEMTOTAL=`meminfo MemTotal`
        $MEMHOG $MEMTOTAL || error "error allocating $MEMTOTAL kB"
        echo "after: `swapon -s | grep $LLOOP`"
        SWAPUSED=`swap_used $LLOOP`