X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=ea054ee696ed66df10488f687f20db1f8ef9e073;hb=6f6320cc43ec48f72994c02436909b276497c544;hp=264519d9a01dcb0e451f3eaa49a6bd5552abbae2;hpb=adead409a31d74996459bcfa819f3773993923f8;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 264519d..ea054ee 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,33 +1,60 @@ -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 | 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 + +exit $rc