Whamcloud - gitweb
LU-12730 tests: sync file before checking LSOM 46/37146/13
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 6 Jan 2020 16:15:44 +0000 (01:15 +0900)
committerOleg Drokin <green@whamcloud.com>
Fri, 1 May 2020 04:26:40 +0000 (04:26 +0000)
In sanity test_807, make sure files are synced before checking
LSOM info.

Test-Parameters: trivial envdefinitions=ONLY=807 testlist=sanity,sanity,sanity,sanity
Test-Parameters: envdefinitions=ONLY=807 testlist=sanity,sanity,sanity,sanity,sanity
Test-Parameters: envdefinitions=ONLY=807 testlist=sanity,sanity,sanity,sanity,sanity
Test-Parameters: envdefinitions=ONLY=807 testlist=sanity,sanity,sanity,sanity,sanity
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id6a452cc6b734d706581e70fed3770973ccce503
Reviewed-on: https://review.whamcloud.com/37146
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 9fa70ee..dbed968 100755 (executable)
@@ -22856,7 +22856,7 @@ test_807() {
                error "truncate $tdir/trunc failed"
 
        local bs=1048576
-       dd if=/dev/zero of=$DIR/$tdir/single_dd bs=$bs count=1 ||
+       dd if=/dev/zero of=$DIR/$tdir/single_dd bs=$bs count=1 conv=fsync ||
                error "write $tfile failed"
 
        # multi-client wirtes
@@ -22877,7 +22877,8 @@ test_807() {
                wait ${pids[$i]}
        done
 
-       sleep 5
+       do_rpc_nodes "$CLIENTS" cancel_lru_locks osc
+       do_nodes "$CLIENTS" "sync ; sleep 5 ; sync"
        $LSOM_SYNC -u $cl_user -m $FSNAME-MDT0000 $MOUNT
        check_lsom_data $DIR/$tdir/trunc
        check_lsom_data $DIR/$tdir/single_dd