Whamcloud - gitweb
- Fix for the 16kb page directory handling (thanks Andreas, it appears to
[fs/lustre-release.git] / lustre / tests / runfailure-ost
1 #!/bin/sh
2
3 SRCDIR="`dirname $0`"
4 . $SRCDIR/common.sh
5
6 export DEBUG_WAIT=yes
7 . $SRCDIR/llsetup.sh $SRCDIR/net-local.cfg $SRCDIR/mds.cfg \
8   $SRCDIR/obdfilter.cfg $SRCDIR/client-mount.cfg $SRCDIR/ldlm.cfg || exit 2
9
10 test_fail() {
11         echo $1 > /proc/sys/lustre/fail_loc
12         shift
13         echo "Running '$*'"
14         $* 
15
16         echo "Cleaning up and restarting MDS"
17         umount /mnt/lustre || fail "unable to unmount"
18         $OBDCTL <<- EOF
19         name2dev MDSDEV
20         cleanup
21         detach
22         quit
23         EOF
24
25         echo 0 > /proc/sys/lustre/fail_loc
26
27         $OBDCTL <<- EOF
28         newdev
29         attach mds MDSDEV
30         setup ${MDS} ${MDSFS}
31         quit
32         EOF
33         $MNT
34 }
35
36 set -vx
37
38 touch /mnt/lustre/foo
39 chmod a+x /mnt/lustre/foo
40 sync
41
42 # OBD_FAIL_OST_OPEN_NET: OST will discard open request packet
43 cp /etc/issue /mnt/lustre/foo
44 test_fail 0x208 cat /mnt/lustre/foo
45
46 echo "Done."