X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=076faa7be7c1fe7dea8fdf9ec1e261fcbb690679;hb=08aa217ce49aba1ded52e0f7adb8a607035123fd;hp=bc864a731d4a2e7da2083ae8383fa6d0fba311f7;hpb=c5050e412572b00cbe93d8517d2d1f767bebfa92;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index bc864a7..076faa7 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,50 +1,10 @@ -#!/bin/sh - +#!/bin/bash export PATH=`dirname $0`/../utils:$PATH - -LCONF=${LCONF:-lconf} NAME=${NAME:-local} -TMP=${TMP:-/tmp} - -config=$NAME.xml -mkconfig=$NAME.sh - -if [ "$PORTALS" ]; then - portals_opt="--portals=$PORTALS" -fi - -if [ "$LUSTRE" ]; then - lustre_opt="--lustre=$LUSTRE" -fi - -if [ "$LDAPURL" ]; then - conf_opt="--ldapurl $LDAPURL --config $NAME" -else - if [ ! -f $config ]; then - sh $mkconfig $config || exit 1 - fi - conf_opt="$config" -fi - -[ "$NODE" ] && node_opt="--node $NODE" -sync; sleep 2; sync -${LCONF} $portals_opt $lustre_opt $node_opt --cleanup $@ \ - --dump $TMP/debug $conf_opt -rc=$? -BUSY=`dmesg | grep -i destruct` -if [ "$BUSY" ]; then - echo "$BUSY" 1>&2 - mv $TMP/debug $TMP/debug-busy.`date +%s` - exit 255 -fi -LEAK_LUSTRE=`dmesg | grep "obd mem.*leaked" | tail -1 | grep -v "leaked: 0"` -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 254 -fi +LUSTRE=${LUSTRE:-`dirname $0`/..} +. $LUSTRE/tests/test-framework.sh +init_test_env $@ +. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} -exit $rc +cleanupall -f