From 6d3b85cf7c326a0ea3a02cbb3d79c302f1296d4f Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 24 Mar 2004 09:21:03 +0000 Subject: [PATCH] Fix for bug 2921 (test failure only). We had coincidentally created a file in test 4 with the same size, and if we didn't wait for its deletion then it could so happen that the "kbytesfree before" would equal "kbytesfree after" since that file was freed while we wrote the new one. b=2921 --- lustre/tests/replay-ost-single.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index 4cb5131..a08355f 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -137,17 +137,16 @@ kbytesfree() { test_6() { f=$DIR/$tfile - rm $f 2>/dev/null && sync && sleep 2 && sync # wait for delete thread - grep [0-9] /proc/fs/lustre/osc/OSC*MNT*/kbytes* + rm -f $f + sync && sleep 2 && sync # wait for delete thread before=`kbytesfree` dd if=/dev/urandom bs=1024 count=5120 of=$f #define OBD_FAIL_MDS_REINT_NET_REP 0x119 do_facet mds "sysctl -w lustre.fail_loc=0x80000119" sync sleep 1 # ensure we have a fresh statfs - grep [0-9] /proc/fs/lustre/osc/OSC*MNT*/kbytes* after_dd=`kbytesfree` - echo "before: $before after_dd: $after_dd" + log "before: $before after_dd: $after_dd" (( $before > $after_dd )) || return 1 rm -f $f fail ost @@ -155,9 +154,8 @@ test_6() { sync # let the delete happen sleep 2 - grep [0-9] /proc/fs/lustre/osc/OSC*MNT*/kbytes* after=`kbytesfree` - echo "before: $before after: $after" + log "before: $before after: $after" (( $before <= $after + 40 )) || return 3 # take OST logs into account } run_test 6 "Fail OST before obd_destroy" -- 1.8.3.1