Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index b9ce682..076faa7 100755 (executable)
@@ -1,67 +1,10 @@
-#!/bin/sh
+#!/bin/bash
+export PATH=`dirname $0`/../utils:$PATH
+NAME=${NAME:-local}
 
-SRCDIR="`dirname $0`"
-. $SRCDIR/common.sh
+LUSTRE=${LUSTRE:-`dirname $0`/..}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
+. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-$DBGCTL get_debug > /tmp/debug.1
-
-if [ "`mount | grep '/mnt/lustre'`" ]; then
-       umount /mnt/lustre || fail "cannot unmount"
-fi
-
-killall acceptor
-rmmod llite
-rmmod mdc
-
-$OBDCTL <<EOF
-name2dev OSCDEV
-cleanup
-detach
-name2dev LDLMDEV
-cleanup
-detach
-name2dev RPCDEV
-cleanup
-detach
-name2dev OSTDEV
-cleanup
-detach
-name2dev OBDDEV
-cleanup
-detach
-name2dev MDSDEV
-cleanup
-detach
-quit
-EOF
-
-rmmod obdecho
-rmmod mds
-rmmod osc
-rmmod ost
-rmmod obdfilter
-rmmod obdext2
-rmmod ldlm
-rmmod ptlrpc
-rmmod obdclass
-
-$DBGCTL get_debug > /tmp/debug.2
-
-$PTLCTL <<EOF
-setup tcp
-disconnect
-del_uuid self
-del_uuid mds
-del_uuid ost
-del_uuid ldlm
-quit
-EOF
-
-rmmod kqswnal
-rmmod ksocknal
-rmmod portals
-
-losetup -d ${LOOP}0
-losetup -d ${LOOP}1
-losetup -d ${LOOP}2
-exit 0
+cleanupall -f