X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=572cd65030f082a678c344de85e3fa219ac4ca40;hp=548098b28ee438384be1ca6dd54445332f4a2568;hb=576c9a8212bc6607146d99e3413f7a24cbf91b5c;hpb=0fb1379443f04da458f97998e3427d57a5f44961 diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 548098b..572cd65 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,48 +1,54 @@ #!/bin/sh -SRCDIR="`dirname $0`" -. $SRCDIR/common.sh - -umount /mnt/obd - -rmmod llight -rmmod mdc - -$R/usr/src/obd/utils/obdctl <&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 + +exit $rc