Whamcloud - gitweb
LU-7418 tests: avoid background writeout in sanity 29 29/20929/2
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 22 Jun 2016 17:36:10 +0000 (11:36 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 24 Jun 2016 02:56:06 +0000 (02:56 +0000)
Intermittent failures of sanity.sh test_29 are caused by background
writeout starting (or continuing) after the MDC DLM locks were
cancelled, requiring the layout lock to be re-fetched from the MDS.
Cancelling the DLM locks via "lru_size=clear" is not enough, since
this will not cancel any locks that are currently in use.

Instead, ensure that all the dirty pages from previous tests are
written out so that no new writes are started during the test.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ie45965a974e0cd170f969fa122e1762c2361c278
Reviewed-on: http://review.whamcloud.com/20929
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index 53d33b5..66c1ccc 100644 (file)
@@ -2119,6 +2119,7 @@ run_test 28 "create/mknod/mkdir with bad file types ============"
 
 test_29() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run" && return 0
+       sync; sleep 1; sync # flush out any dirty pages from previous tests
        cancel_lru_locks
        test_mkdir $DIR/d29
        touch $DIR/d29/foo