Skip to content
Snippets Groups Projects
Commit 4e34af56 authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Allow sanityN.sh to run with a zconf-mounted setup.

Be more verbose about what the specific error is.
parent b331828d
No related branches found
No related tags found
No related merge requests found
...@@ -91,11 +91,11 @@ pass() { ...@@ -91,11 +91,11 @@ pass() {
echo PASS echo PASS
} }
MOUNT1=`mount| awk '/^'$NAME' .* lustre_lite / { print $3 }'| head -1` MOUNT1=`mount| awk '/ lustre/ { print $3 }'| head -1`
MOUNT2=`mount| awk '/^'$NAME' .* lustre_lite / { print $3 }'| tail -1` MOUNT2=`mount| awk '/ lustre/ { print $3 }'| tail -1`
[ -z "$MOUNT1" ] && error "NAME=$NAME not mounted once" [ -z "$MOUNT1" ] && error "NAME=$NAME not mounted once"
[ "$MOUNT1" = "$MOUNT2" ] && error "NAME=$NAME not mounted twice" [ "$MOUNT1" = "$MOUNT2" ] && error "NAME=$NAME not mounted twice"
[ `mount| awk '/^'$NAME' .* lustre_lite / { print $3 }'| wc -l` -ne 2 ] && \ [ `mount| awk '/ lustre/ { print $3 }'| wc -l` -ne 2 ] && \
error "NAME=$NAME mounted more than twice" error "NAME=$NAME mounted more than twice"
DIR1=${DIR1:-$MOUNT1} DIR1=${DIR1:-$MOUNT1}
...@@ -173,6 +173,7 @@ run_test 4 "fstat validation on multiple mount points ==========" ...@@ -173,6 +173,7 @@ run_test 4 "fstat validation on multiple mount points =========="
test_5() { test_5() {
mcreate $DIR1/f5 mcreate $DIR1/f5
truncate $DIR2/f5 100 truncate $DIR2/f5 100
$CHECKSTAT -t file -s 100 $DIR1/f5 || error
rm $DIR1/f5 rm $DIR1/f5
} }
run_test 5 "create a file on one mount, truncate it on the other" run_test 5 "create a file on one mount, truncate it on the other"
...@@ -200,7 +201,8 @@ test_9() { ...@@ -200,7 +201,8 @@ test_9() {
echo -n $C >> $DIR/f9 echo -n $C >> $DIR/f9
[ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1 [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
done done
[ "`cat $DIR1/f9`" = "abcdefghijkl" ] || error [ "`cat $DIR1/f9`" = "abcdefghijkl" ] || \
error "`od -a $DIR1/f10` != abcdefghijkl"
} }
run_test 9 "append of file with sub-page size on multiple mounts" run_test 9 "append of file with sub-page size on multiple mounts"
...@@ -214,7 +216,8 @@ test_10() { ...@@ -214,7 +216,8 @@ test_10() {
[ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1 [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
OFFSET=`expr $OFFSET + 1` OFFSET=`expr $OFFSET + 1`
done done
[ "`cat $DIR1/f10`" = "abcdefghijkl" ] || error [ "`cat $DIR1/f10`" = "abcdefghijkl" ] || \
error "`od -a $DIR1/f10` != abcdefghijkl"
} }
run_test 10 "write of file with sub-page size on multiple mounts " run_test 10 "write of file with sub-page size on multiple mounts "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment