X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=572cd65030f082a678c344de85e3fa219ac4ca40;hp=caa07d3bb8272649ea4036126d616ecb429fc61d;hb=576c9a8212bc6607146d99e3413f7a24cbf91b5c;hpb=0e09dc78da5b3e118ecca326fee62b06d9381a83 diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index caa07d3..572cd65 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,60 +1,54 @@ #!/bin/sh -SRCDIR="`dirname $0`" -. $SRCDIR/common.sh - -umount /mnt/lustre || fail "cannot unmount" - -killall acceptor -rmmod llite -rmmod mdc - -$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