7 # This test needs to be run on the client
10 LUSTRE=${LUSTRE:-`dirname $0`/..}
11 . $LUSTRE/tests/test-framework.sh
13 . ${CONFIG:=$LUSTRE/tests/cfg/lmv.sh}
20 SETUP=${SETUP:-"setup"}
21 CLEANUP=${CLEANUP:-"stopall"}
23 if [ "$ONLY" == "cleanup" ]; then
24 lctl set_param debug=0 || true
36 if [ "$ONLY" == "setup" ]; then
42 # LU-482 Avert LVM and VM inability to flush caches in pre .33 kernels
43 if [ $LINUX_VERSION_CODE -lt $(kernel_version 2 6 33) ]; then
44 sync; sleep 5; sync; sleep 5; sync; sleep 5
51 run_test 0 "empty replay"
54 # this test attempts to trigger a race in the precreation code,
55 # and must run before any other objects are created on the filesystem
57 createmany -o $DIR/$tfile 20 || return 1
58 unlinkmany $DIR/$tfile 20 || return 2
60 run_test 0b "ensure object created after recover exists. (3284)"
65 $CHECKSTAT -t dir $DIR/dir01 || return 1
70 run_test 1a "unlink cross-node dir (fail mds with inode)"
75 $CHECKSTAT -t dir $DIR/dir11 || return 1
80 run_test 1b "unlink cross-node dir (fail mds with name)"
84 createmany -o $DIR/dir21/f 3000
86 $CHECKSTAT -t dir $DIR/dir21 || return 1
87 $CHECKSTAT -t file $DIR/dir21/f1002 || return 1
93 run_test 2a "unlink cross-node file (fail mds with name)"
98 $LCTL mark "FAILOVER mds2"
101 $CHECKSTAT -t dir $DIR/dir3a1 || return 1
103 run_test 3a "mkdir cross-node dir (fail mds with inode)"
108 $LCTL mark "FAILOVER mds1"
111 $CHECKSTAT -t dir $DIR/dir3b1 || return 1
113 run_test 3b "mkdir cross-node dir (fail mds with inode)"
115 equals_msg test complete, cleaning up