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
47 run_test 0 "empty replay"
50 # this test attempts to trigger a race in the precreation code,
51 # and must run before any other objects are created on the filesystem
53 createmany -o $DIR/$tfile 20 || return 1
54 unlinkmany $DIR/$tfile 20 || return 2
56 run_test 0b "ensure object created after recover exists. (3284)"
61 $CHECKSTAT -t dir $DIR/dir01 || return 1
66 run_test 1a "unlink cross-node dir (fail mds with inode)"
71 $CHECKSTAT -t dir $DIR/dir11 || return 1
76 run_test 1b "unlink cross-node dir (fail mds with name)"
80 createmany -o $DIR/dir21/f 3000
82 $CHECKSTAT -t dir $DIR/dir21 || return 1
83 $CHECKSTAT -t file $DIR/dir21/f1002 || return 1
89 run_test 2a "unlink cross-node file (fail mds with name)"
94 $LCTL mark "FAILOVER mds2"
97 $CHECKSTAT -t dir $DIR/dir3a1 || return 1
99 run_test 3a "mkdir cross-node dir (fail mds with inode)"
104 $LCTL mark "FAILOVER mds1"
107 $CHECKSTAT -t dir $DIR/dir3b1 || return 1
109 run_test 3b "mkdir cross-node dir (fail mds with inode)"
111 equals_msg test complete, cleaning up