Whamcloud - gitweb
Small cleanups to make it look and behave more like the runfailure-net
authorpschwan <pschwan>
Thu, 18 Jul 2002 14:13:46 +0000 (14:13 +0000)
committerpschwan <pschwan>
Thu, 18 Jul 2002 14:13:46 +0000 (14:13 +0000)
lustre/tests/runfailure-ost

index 97fedd8..7b819ce 100755 (executable)
@@ -1,46 +1,27 @@
 #!/bin/sh
 
+set -vx
+
 SRCDIR="`dirname $0`"
 . $SRCDIR/common.sh
 
-export DEBUG_WAIT=yes
-. $SRCDIR/llsetup.sh $SRCDIR/net-local.cfg $SRCDIR/mds.cfg \
-  $SRCDIR/obdfilter.cfg $SRCDIR/client-mount.cfg $SRCDIR/ldlm.cfg || exit 2
-
 test_fail() {
        echo $1 > /proc/sys/lustre/fail_loc
        shift
        echo "Running '$*'"
-       $* 
-
-       echo "Cleaning up and restarting MDS"
-       umount /mnt/lustre || fail "unable to unmount"
-       $OBDCTL <<- EOF
-       name2dev MDSDEV
-       cleanup
-       detach
-       quit
-       EOF
-
-       echo 0 > /proc/sys/lustre/fail_loc
+       $* &
+       sleep 1
+       kill -9 $!
 
-       $OBDCTL <<- EOF
-       newdev
-       attach mds MDSDEV
-       setup ${MDS} ${MDSFS}
-       quit
-       EOF
-       $MNT
+        echo 0 > /proc/sys/lustre/fail_loc
+       umount /mnt/lustre || fail "cannot unmount /mnt/lustre"
+       setup_mount || fail "cannot remount /mnt/lustre"
 }
 
-set -vx
-
-touch /mnt/lustre/foo
-chmod a+x /mnt/lustre/foo
-sync
+[ "`mount | grep /mnt/lustre`" ] || . llsetup.sh "$@" || exit -1
 
 # OBD_FAIL_OST_OPEN_NET: OST will discard open request packet
-cp /etc/issue /mnt/lustre/foo
+touch /mnt/lustre/foo
 test_fail 0x208 cat /mnt/lustre/foo
 
 echo "Done."