+run_test 10b "write of file with sub-page size on multiple mounts "
+
+test_11() {
+ mkdir $DIR1/d11
+ multiop $DIR1/d11/f O_c &
+ MULTIPID=$!
+ usleep 200
+ cp -p /bin/ls $DIR1/d11/f
+ $DIR2/d11/f
+ RC=$?
+ kill -USR1 $MULTIPID
+ wait $MULTIPID || error
+ [ $RC -eq 0 ] && error || true
+}
+run_test 11 "execution of file opened for write should return error ===="
+
+test_12() {
+ sh lockorder.sh
+}
+run_test 12 "test lock ordering (link, stat, unlink) ==========="
+
+test_13() { # bug 2451 - directory coherency
+ rm -rf $DIR1/d13
+ mkdir $DIR1/d13 || error
+ cd $DIR1/d13 || error
+ ls
+ ( touch $DIR1/d13/f13 ) # needs to be a separate shell
+ ls
+ rm -f $DIR2/d13/f13 || error
+ ls 2>&1 | grep f13 && error "f13 shouldn't return an error (1)" || true
+ # need to run it twice
+ ( touch $DIR1/d13/f13 ) # needs to be a separate shell
+ ls
+ rm -f $DIR2/d13/f13 || error
+ ls 2>&1 | grep f13 && error "f13 shouldn't return an error (2)" || true
+}
+run_test 13 "test directory page revocation ===================="
+
+test_14() {
+ mkdir $DIR1/d14
+ cp -p /bin/ls $DIR1/d14/ls
+ exec 100>> $DIR1/d14/ls
+ $DIR2/d14/ls && error || true
+ exec 100<&-
+}
+run_test 14 "execution of file opened for write should return -ETXTBSY=="
+
+test_14a() {
+ mkdir -p $DIR1/d14
+ cp -p `which multiop` $DIR1/d14/multiop
+ $DIR1/d14/multiop $TMP/test14.junk O_c &
+ MULTIPID=$!
+ sleep 1
+ multiop $DIR2/d14/multiop Oc && error "expected error, got success"
+ kill -USR1 $MULTIPID || return 2
+ wait $MULTIPID || return 3
+}
+run_test 14a "open(RDWR) of file being executed should return -ETXTBSY"
+
+test_14b() {
+ mkdir -p $DIR1/d14
+ cp -p `which multiop` $DIR1/d14/multiop
+ $DIR1/d14/multiop $TMP/test14.junk O_c &
+ MULTIPID=$!
+ sleep 1
+ truncate $DIR2/d14/multiop 0 && error "expected error, got success"
+ kill -USR1 $MULTIPID || return 2
+ wait $MULTIPID || return 3
+}
+run_test 14b "truncate of file being executed should return -ETXTBSY"
+
+test_15() { # bug 974 - ENOSPC
+ echo $PATH
+ sh oos2.sh $MOUNT1 $MOUNT2
+}
+run_test 15 "test out-of-space with multiple writers ==========="
+
+test_16() {
+ ./fsx -R -W -c 50 -p 100 -N 2500 \
+ $MOUNT1/fsxfile $MOUNT2/fsxfile
+}
+run_test 16 "2500 iterations of dual-mount fsx ================="
+
+log "cleanup: ======================================================"
+rm -rf $DIR1/[df][0-9]* $DIR1/lnk || true