Whamcloud - gitweb
Merge of b_md to HEAD:
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index 98f3510..82f2a17 100755 (executable)
@@ -2,13 +2,25 @@
 
 LCONF=${LCONF:-../utils/lconf}
 NAME=${NAME:-local}
+TMP=${TMP:-/tmp}
 
 config=$NAME.xml
 mkconfig=./$NAME.sh
 
-if [ ! -f $config -o $mkconfig -nt $config ]; then
+if [ ! -f $config ]; then
    sh $mkconfig $config || exit 1
 fi
 
-${LCONF} --cleanup --dump /tmp/debug $config
-
+sync; sleep 2; sync
+${LCONF} --cleanup --dump $TMP/debug $config
+LEAK=`dmesg | grep -v " 0 bytes" | grep leaked`
+if [ "$LEAK" ]; then
+       echo "$LEAK" 1>&2
+       mv $TMP/debug $TMP/debug.`date +%s`
+       #exit -1
+fi
+BUSY=`dmesg | grep -i destruct`
+if [ "$BUSY" ]; then
+       echo "$BUSY" 1>&2
+       #exit -2
+fi