7 CHECKSTAT=${CHECKSTAT:-"checkstat -v"}
8 MOUNT1=${MOUNT1:-/mnt/lustre1}
9 MOUNT2=${MOUNT2:-/mnt/lustre2}
10 export NAME=${NAME:-mount2}
14 sh llmountcleanup.sh > /dev/null
20 sh llrmount.sh > /dev/null
35 mount | grep $MOUNT1 || sh llmount.sh
37 echo -n "test 1: check create on 2 mtpt's..."
39 [ -f $MOUNT2/f1 ] || error
42 echo "test 2: check attribute updates on 2 mtpt's..."
44 $CHECKSTAT -t file -p 0777 $MOUNT1/f1 || error
47 echo "test 2b: check cached attribute updates on 2 mtpt's..."
51 $CHECKSTAT -t file -p 0777 $MOUNT1/f2b || error
54 echo "test 2c: check cached attribute updates on 2 mtpt's..."
58 $CHECKSTAT -t file -p 0777 $MOUNT2/f2c || error
61 echo "test 3: check after remount attribute updates on 2 mtpt's..."
65 $CHECKSTAT -t file -p 0666 $MOUNT1/f1 || error
68 echo "test 4: unlink on one mountpoint removes file on other..."
70 $CHECKSTAT -a $MOUNT1/f1 || error
73 echo -n "test 5: symlink on one mtpt, readlink on another..."
74 ( cd $MOUNT1 ; ln -s this/is/good lnk )
76 [ "this/is/good" = "`perl -e 'print readlink("/mnt/lustre2/lnk");'`" ] || error
79 echo -n "test 6: fstat validation on multiple mount points..."
80 ./multifstat $MOUNT1/f6 $MOUNT2/f6
83 if [ -n "$BUG_1365" ]; then
84 echo -n "test 7: create a file on one mount, truncate it on the other..."
86 truncate $MOUNT2/f1 100
90 echo "Skipping test for 1365: set \$BUG_1365 to run it (and crash, likely)."
93 echo "test 9: remove of open file on other node..."
94 ./openunlink $MOUNT1/f9 $MOUNT2/f9 || error
97 echo "test 9b: remove of open directory on other node..."
98 ./opendirunlink $MOUNT1/dir1 $MOUNT2/dir1 || error
101 #echo "test 9c: remove of open special file on other node..."
102 #./opendevunlink $MOUNT1/dev1 $MOUNT2/dev1 || error
105 echo -n "test 10: append of file with sub-page size on multiple mounts..."
108 for C in a b c d e f g h i j k l; do
109 MOUNT=`eval echo \\$MOUNT$MTPT`
110 echo -n $C >> $MOUNT/f10
111 [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
113 [ "`cat $MOUNT1/f10`" = "abcdefghijkl" ] && pass || error
115 echo -n "test 11: write of file with sub-page size on multiple mounts..."
119 for C in a b c d e f g h i j k l; do
120 MOUNT=`eval echo \\$MOUNT$MTPT`
121 echo -n $C | dd of=$MOUNT/f11 bs=1 seek=$OFFSET count=1
122 [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
123 OFFSET=`expr $OFFSET + 1`
125 [ "`cat $MOUNT1/f11`" = "abcdefghijkl" ] && pass || error
127 rm -f $MOUNT1/f[0-9]* $MOUNT1/lnk