X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=076faa7be7c1fe7dea8fdf9ec1e261fcbb690679;hb=219e03a261e510e1551ab0695633cc4d2f5196fb;hp=2bd991f3eb13c78d8e290020cd318c68ec92ae80;hpb=2d2259666710af4826c564d391d4fddd6ca8b0ed;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 2bd991f..076faa7 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,29 +1,10 @@ -#!/bin/sh - -LCONF=${LCONF:-../utils/lconf} +#!/bin/bash +export PATH=`dirname $0`/../utils:$PATH NAME=${NAME:-local} -TMP=${TMP:-/tmp} - -config=$NAME.xml -mkconfig=$NAME.sh -if [ ! -f $config ]; then - sh $mkconfig $config || exit 1 -fi +LUSTRE=${LUSTRE:-`dirname $0`/..} +. $LUSTRE/tests/test-framework.sh +init_test_env $@ +. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} -sync; sleep 2; sync -${LCONF} --cleanup --dump $TMP/debug $config -BUSY=`dmesg | grep -i destruct` -if [ "$BUSY" ]; then - echo "$BUSY" 1>&2 - mv $TMP/debug $TMP/debug-busy.`date +%s` - exit -1 -fi -LEAK_LUSTRE=`dmesg | tail -20 | grep -v "leaked: 0" | grep leaked` -LEAK_PORTALS=`dmesg | tail -20 | grep "Portals memory leaked"` -if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then - echo "$LEAK_LUSTRE" 1>&2 - echo "$LEAK_PORTALS" 1>&2 - mv $TMP/debug $TMP/debug-leak.`date +%s` - exit -2 -fi +cleanupall -f