Whamcloud - gitweb
LU-12511 utils: Move utilies specific values out of Lustre UAPI headers
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index ad48b47..454ed6e 100755 (executable)
@@ -1,71 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 
-SRCDIR="`dirname $0`/"
-. $SRCDIR/common.sh
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
 
-$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_extN
-rmmod mds_ext3
-rmmod mds_ext2
-rmmod mds
-rmmod osc
-rmmod ost
-rmmod obdfilter
-rmmod obdext2
-rmmod ldlm
-rmmod ptlrpc
-rmmod obdclass
-rmmod extN
-
-$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