X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Fllmountcleanup.sh;h=572cd65030f082a678c344de85e3fa219ac4ca40;hb=576c9a8212bc6607146d99e3413f7a24cbf91b5c;hp=264519d9a01dcb0e451f3eaa49a6bd5552abbae2;hpb=adead409a31d74996459bcfa819f3773993923f8;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 264519d..572cd65 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,33 +1,54 @@ -umount /mnt/obd - -rmmod llight -rmmod mdc -/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