Whamcloud - gitweb
merge b_devel -> b_eq
authormeijia <meijia>
Sat, 3 May 2003 03:18:17 +0000 (03:18 +0000)
committermeijia <meijia>
Sat, 3 May 2003 03:18:17 +0000 (03:18 +0000)
lustre/tests/sanity-ldlm.sh [new file with mode: 0644]

diff --git a/lustre/tests/sanity-ldlm.sh b/lustre/tests/sanity-ldlm.sh
new file mode 100644 (file)
index 0000000..e5bd422
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+set -e
+
+SRCDIR=`dirname $0`
+PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
+
+MOUNT=${MOUNT:-/mnt/lustre}
+DIR=${DIR:-$MOUNT}
+export NAME=$NAME
+clean() {
+        echo -n "cln.."
+        sh llmountcleanup.sh > /dev/null || exit 20
+}
+CLEAN=${CLEAN:-clean}
+start() {
+        echo -n "mnt.."
+        sh llrmount.sh > /dev/null || exit 10
+        echo "done"
+}
+START=${START:-start}
+
+log() {
+       echo "$*"
+       lctl mark "$*" || /bin/true
+}
+
+pass() {
+    echo PASS
+}
+
+mount | grep $MOUNT || sh llmount.sh
+
+log '== drop ldlm request  ======================== test 1'
+echo 0x302 > /proc/sys/lustre/fail_loc
+echo 3 > /proc/sys/lustre/timeout
+touch $DIR/f &
+sleep 5
+echo 0 > /proc/sys/lustre/fail_loc
+lctl --device 6 recover
+pass
+$CLEAN
+$START
+
+log '== drop ldlm reply (bug 1139) ================ test 2'
+echo 0x213 > /proc/sys/lustre/fail_loc
+echo 3 > /proc/sys/lustre/timeout
+touch $DIR/f
+pass
+$CLEAN
+$START
+
+log '== drop reply after completion (bug 1068) ==== test 3'
+touch $DIR/f
+stat $DIR/f
+echo 0x213 > /proc/sys/lustre/fail_loc
+echo 3 > /proc/sys/lustre/timeout
+echo foo >> $DIR/f
+pass
+$CLEAN
+$START