Whamcloud - gitweb
Branch b1_8(1.8.2)
authortianzy <tianzy>
Thu, 3 Sep 2009 02:25:49 +0000 (02:25 +0000)
committertianzy <tianzy>
Thu, 3 Sep 2009 02:25:49 +0000 (02:25 +0000)
fix a rare error in test_25 of sanity-quota.sh
b=20433
i=yong.fan
i=panda

lustre/tests/sanity-quota.sh

index 78a6315..27c257a 100644 (file)
@@ -2035,6 +2035,8 @@ test_25_sub() {
         [ $MDS_QUOTA_USED2_NEW -ne $((MDS_QUOTA_USED2_OLD + 1)) ] && \
                 quota_error a $TSTUSR2 "$TSTUSR2 inode quota usage transfer from $TSTUSR to $TSTUSR2 failed: [$MDS_QUOTA_USED2_OLD|$MDS_QUOTA_USED2_NEW]"
        OST0_QUOTA_USED2_NEW=`$LFS quota -o $OST0_UUID $1 $TSTUSR2 $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $1 }'`
+       # when chown, the quota on ost could be displayed out of quota temporarily. Delete the '*' in this situation. b=20433
+       OST0_QUOTA_USED2_NEW=${OST0_QUOTA_USED2_NEW%\*}
         OST0_QUOTA_USED2_DELTA=$((OST0_QUOTA_USED2_NEW - OST0_QUOTA_USED2_OLD))
         [ $OST0_QUOTA_USED2_DELTA -ne $OST0_QUOTA_USED_DELTA ] && \
                 quota_error a $TSTUSR2 "$TSTUSR2 block quota usage transfer from $TSTUSR to $TSTUSR2 failed: [$OST0_QUOTA_USED2_OLD|$OST0_QUOTA_USED2_NEW]"