Whamcloud - gitweb
Merge of b_md to HEAD:
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
1 #!/bin/sh
2
3 LCONF=${LCONF:-../utils/lconf}
4 NAME=${NAME:-local}
5 TMP=${TMP:-/tmp}
6
7 config=$NAME.xml
8 mkconfig=./$NAME.sh
9
10 if [ ! -f $config ]; then
11    sh $mkconfig $config || exit 1
12 fi
13
14 sync; sleep 2; sync
15 ${LCONF} --cleanup --dump $TMP/debug $config
16 LEAK=`dmesg | grep -v " 0 bytes" | grep leaked`
17 if [ "$LEAK" ]; then
18         echo "$LEAK" 1>&2
19         mv $TMP/debug $TMP/debug.`date +%s`
20         #exit -1
21 fi
22 BUSY=`dmesg | grep -i destruct`
23 if [ "$BUSY" ]; then
24         echo "$BUSY" 1>&2
25         #exit -2
26 fi