From 4e34af564689db0874ad8722b3db6e18bf41ffbc Mon Sep 17 00:00:00 2001 From: adilger <adilger> Date: Fri, 12 Dec 2003 00:20:51 +0000 Subject: [PATCH] Allow sanityN.sh to run with a zconf-mounted setup. Be more verbose about what the specific error is. --- lustre/tests/sanityN.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index b3173e970a..581c514e90 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -91,11 +91,11 @@ pass() { echo PASS } -MOUNT1=`mount| awk '/^'$NAME' .* lustre_lite / { print $3 }'| head -1` -MOUNT2=`mount| awk '/^'$NAME' .* lustre_lite / { print $3 }'| tail -1` +MOUNT1=`mount| awk '/ lustre/ { print $3 }'| head -1` +MOUNT2=`mount| awk '/ lustre/ { print $3 }'| tail -1` [ -z "$MOUNT1" ] && error "NAME=$NAME not mounted once" [ "$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" DIR1=${DIR1:-$MOUNT1} @@ -173,6 +173,7 @@ run_test 4 "fstat validation on multiple mount points ==========" test_5() { mcreate $DIR1/f5 truncate $DIR2/f5 100 + $CHECKSTAT -t file -s 100 $DIR1/f5 || error rm $DIR1/f5 } run_test 5 "create a file on one mount, truncate it on the other" @@ -200,7 +201,8 @@ test_9() { echo -n $C >> $DIR/f9 [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1 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" @@ -214,7 +216,8 @@ test_10() { [ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1 OFFSET=`expr $OFFSET + 1` 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 " -- GitLab