Whamcloud - gitweb
LU-10970 tests: make sure write is complete 03/32203/5
authorPatrick Farrell <paf@cray.com>
Mon, 30 Apr 2018 12:10:38 +0000 (07:10 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Jul 2018 16:00:30 +0000 (16:00 +0000)
The current test does not guarantee the write has arrived
on the server before dropping caches and checking memory
usage.  If the write is still in progress, the baseline
memory used value will be incorrect.

Sync on the client to force the write out.

Test-Parameters: trivial

Cray-bug-id: LUS-5923
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ic0379ffdfd14ff630d65a0197a99fba929868e9c
Reviewed-on: https://review.whamcloud.com/32203
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
lustre/tests/sanity.sh

index 8b3b7a1..e00cf4c 100755 (executable)
@@ -16245,6 +16245,9 @@ test_255b() {
        dd if=/dev/zero of=$DIR/$tfile bs=1048576 count=$size_mb ||
                error "dd to $DIR/$tfile failed"
 
+       #force write to complete before dropping OST cache & checking memory
+       sync
+
        local total=$(facet_meminfo ost1 MemTotal)
        echo "Total memory: $total KiB"