Whamcloud - gitweb
LU-8215 tests: sanity-benchmark/iozone should wait for space recovery 99/20499/2
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Mon, 30 May 2016 10:45:51 +0000 (14:45 +0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Aug 2018 07:18:03 +0000 (07:18 +0000)
otherwise it may fail due to a transient state where the space confsumed
by the previous run hasn't recovered yet. this happens to tiny filesystems
used in local setups.

Change-Id: I04b3ce096621583629277c1e52c64a1551bc8ace
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/20499
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-benchmark.sh

index 5ea7a0c..370afae 100644 (file)
@@ -107,6 +107,7 @@ test_iozone() {
     export O_DIRECT
     
     local IOZDIR=$DIR/d0.iozone
+    wait_delete_completed || true
     mkdir -p $IOZDIR
     $LFS setstripe -c -1 $IOZDIR
     sync
@@ -129,6 +130,7 @@ test_iozone() {
     tail -1 $IOZLOG | grep -q complete || \
        { error "iozone (1) failed" && return 1; }
     rm -f $IOZLOG
+    wait_delete_completed || true
     $DEBUG_ON
     
     # check if O_DIRECT support is implemented in kernel
@@ -139,6 +141,7 @@ test_iozone() {
            O_DIRECT=no
        fi
        rm -f $DIR/f.iozone
+       wait_delete_completed || true
     fi
     if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then
        $DEBUG_OFF
@@ -146,6 +149,7 @@ test_iozone() {
        tail -1 $IOZLOG | grep -q complete || \
            { error "iozone (2) failed" && return 1; }
        rm -f $IOZLOG
+       wait_delete_completed || true
        $DEBUG_ON
     fi
 
@@ -166,6 +170,7 @@ test_iozone() {
        tail -1 $IOZLOG | grep -q complete || \
            { error "iozone (3) failed" && return 1; }
        rm -f $IOZLOG
+       wait_delete_completed || true
        $DEBUG_ON
     elif [ $IOZVER -lt 3145 ]; then
        VER=`iozone -v | awk '/Revision:/ { print $3 }'`