Whamcloud - gitweb
Fix for bug 2921 (test failure only). We had coincidentally created a file
authoradilger <adilger>
Wed, 24 Mar 2004 09:21:03 +0000 (09:21 +0000)
committeradilger <adilger>
Wed, 24 Mar 2004 09:21:03 +0000 (09:21 +0000)
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

index 4cb5131..a08355f 100755 (executable)
@@ -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"