From cc29a264f74c06765e3b31551890f06a81fe6b03 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 27 Feb 2008 19:56:38 +0000 Subject: [PATCH] b=14229 i=Adilger fix test_59 to fail if write/read failed --- lustre/tests/recovery-small.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index c6d1eea..8d6acd5 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -862,13 +862,18 @@ run_test 58 "Eviction in the middle of open RPC reply processing" test_59() { # bug 10589 zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2" + echo $DIR2 | grep -q $MOUNT2 || error "DIR2 is not set properly: $DIR2" #define OBD_FAIL_LDLM_CANCEL_EVICT_RACE 0x311 sysctl -w lustre.fail_loc=0x311 - writes=$(LANG=C dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1 | awk -F '+' '/out/ {print $1}') + writes=$(LANG=C dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1) + [ $? = 0 ] || error "dd write failed" + writes=$(echo $writes | awk -F '+' '/out/ {print $1}') sysctl -w lustre.fail_loc=0 sync - zconf_umount `hostname` $DIR2 -f - reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in/ {print $1}') + zconf_umount `hostname` $MOUNT2 -f + reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1) + [ $? = 0 ] || error "dd read failed" + reads=$(echo $reads | awk -F '+' '/in/ {print $1}') [ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes } run_test 59 "Read cancel race on client eviction" -- 1.8.3.1