From 94e5f4bf6555fd102dcc15e3b91685d7728cd064 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 1 May 2015 21:51:09 +0530 Subject: tests: Fix spurious failures Backport of: http://review.gluster.org/10480 http://review.gluster.org/10487 http://review.gluster.org/10488 http://review.gluster.com/10540 - Use REBALANCE_TIMEOUT in EXPECT_WITHIN - Use fdatasync to prevent write - behind from giving success - Add logfile to glupy - Check aux umount is unmounted for quota tests - Disable flush behind so that file will be closed Change-Id: Ia2447176273557738b7a71cc25dd9b9effc16d58 BUG: 1218485 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/10543 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/bugs/core/bug-908146.t | 1 + tests/bugs/distribute/bug-1122443.t | 2 +- tests/bugs/distribute/bug-1161156.t | 2 +- tests/features/glupy.t | 2 +- tests/include.rc | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/bugs/core/bug-908146.t b/tests/bugs/core/bug-908146.t index 8b519ff2ff..bf34992fee 100755 --- a/tests/bugs/core/bug-908146.t +++ b/tests/bugs/core/bug-908146.t @@ -20,6 +20,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 $H0:$B0/${V0}0 TEST $CLI volume set $V0 performance.open-behind off +TEST $CLI volume set $V0 performance.flush-behind off TEST $CLI volume start $V0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --direct-io-mode=enable TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M1 --attribute-timeout=0 --entry-timeout=0 --direct-io-mode=enable diff --git a/tests/bugs/distribute/bug-1122443.t b/tests/bugs/distribute/bug-1122443.t index d944a066eb..906be7072b 100644 --- a/tests/bugs/distribute/bug-1122443.t +++ b/tests/bugs/distribute/bug-1122443.t @@ -47,7 +47,7 @@ BEFORE="$(stat -c %n:%Y $M0/subdir/* | tr '\n' ',')" # Migrate brick TEST $CLI volume add-brick $V0 $H0:$B0/${V0}1 TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}0 start -EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/${V0}0" +EXPECT_WITHIN $REBALANCE_TIMEOUT "completed" remove_brick_status_completed_field "$V0 $H0:$B0/${V0}0" TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}0 commit # Get mtime after migration diff --git a/tests/bugs/distribute/bug-1161156.t b/tests/bugs/distribute/bug-1161156.t index 3aa0f17829..cc9522dc1a 100755 --- a/tests/bugs/distribute/bug-1161156.t +++ b/tests/bugs/distribute/bug-1161156.t @@ -41,7 +41,7 @@ TEST $CLI volume quota $V0 hard-timeout 0 TEST dd if=/dev/zero of=$N0/$mydir/newfile_1 bs=512 count=10240 # wait for write behind to complete. EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "15.0MB" usage "/" -TEST ! dd if=/dev/zero of=$N0/$mydir/newfile_2 bs=1k count=10240 +TEST ! dd if=/dev/zero of=$N0/$mydir/newfile_2 bs=1k count=10240 conv=fdatasync # Test rename within a directory. It should pass even when the # corresponding directory quota is filled. diff --git a/tests/features/glupy.t b/tests/features/glupy.t index 8b79a148d4..2ff6430ec6 100755 --- a/tests/features/glupy.t +++ b/tests/features/glupy.t @@ -20,7 +20,7 @@ volume vol-glupy end-volume EOF -TEST glusterfs -f $B0/glupytest.vol $M0; +TEST glusterfs -f $B0/glupytest.vol -l /var/log/glusterfs/glupy.log $M0; TEST touch $M0/filename; EXPECT "filename" ls $M0 diff --git a/tests/include.rc b/tests/include.rc index d4772bd42f..569e0db7e0 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -387,6 +387,9 @@ function cleanup() done killall -15 glusterfs glusterfsd glusterd 2>/dev/null || true; + for m in `mount | grep fuse.glusterfs | awk '{print $3}'`; do + umount $m + done test x"$OSTYPE" = x"NetBSD" && pkill -15 perfused rpc.statd || true # allow completion of signal handlers for SIGTERM before issue SIGKILL sleep 1 -- cgit