Whamcloud - gitweb
Land b1_4_smallfix onto b1_4 (20041216_1438)
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index bc864a7..7c907b0 100755 (executable)
@@ -28,23 +28,26 @@ fi
 
 [ "$NODE" ] && node_opt="--node $NODE"
 
-sync; sleep 2; sync
-${LCONF} $portals_opt $lustre_opt $node_opt --cleanup $@ \
+[ "$MOUNT2" ] && umount $MOUNT2
+
+${LCONF} $NOMOD $portals_opt $lustre_opt $node_opt --cleanup $@ \
     --dump $TMP/debug $conf_opt
 rc=$?
+echo "lconf DONE"
 BUSY=`dmesg | grep -i destruct`
 if [ "$BUSY" ]; then
        echo "$BUSY" 1>&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"`
+LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"`
+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
+lsmod | grep portals && echo "modules still loaded" && exit 1
 
 exit $rc