X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=ea054ee696ed66df10488f687f20db1f8ef9e073;hb=4878172a970b8120517cb98e83414a78192177fa;hp=298d01d53fa62b100c462ed62c0ec6b9fc435414;hpb=cee4763f010a922b5e2b750c10290463d0ef9189;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 298d01d..ea054ee 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,80 +1,60 @@ #!/bin/sh -SRCDIR="`dirname $0`/" -. $SRCDIR/common.sh +export PATH=`dirname $0`/../utils:$PATH -TIME=`date +'%s'` +LCONF=${LCONF:-lconf} +NAME=${NAME:-local} +TMP=${TMP:-/tmp} -$DBGCTL debug_kernel /tmp/debug.1.$TIME 1 +config=$NAME.xml +mkconfig=$NAME.sh -if mount | grep '/mnt/lustre'; then - umount /mnt/lustre || fail "cannot unmount" -fi - -killall acceptor -rmmod llite - -$OBDCTL <&2 + mv $TMP/debug $TMP/debug-busy.`date +%s` + exit 255 +fi +LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"` +LEAK_PORTALS=`dmesg | tail -n 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 +lsmod | grep portals && echo "modules still loaded" && exit 1 -losetup -d ${LOOP}0 -losetup -d ${LOOP}1 -losetup -d ${LOOP}2 -exit 0 +exit $rc