summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-03-15 23:07:01 +0100
committerVijay Bellur <vbellur@redhat.com>2015-03-16 08:41:25 -0700
commit0778882d11265f258b3e0f3d9892527ac8ea7341 (patch)
tree5c03b0adab5f08ce09d725a28f637a63da417b59 /tests
parent0ef870741a2f49d47a02725aed13a95335a6e42f (diff)
tests: prevent regular hangs in ec/nfs.t
When the test systems gets into a memory pressure state (the Jenkins VMs do not have much RAM), the localhost NFS-mount can get hung. It is possible to prevent this by writing with O_DIRECT. Unfortnately, the 'dd' command on NetBSD does not seem to support such an option. The alternative is to reduce the I/O that can get cached on the NFS-client, like reducing the "count" option for "dd". Change-Id: I1da9cb41133bb934bcbae0a6bc091f798514ed3d BUG: 1163543 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9883 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic/ec/nfs.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/basic/ec/nfs.t b/tests/basic/ec/nfs.t
index b826296d58b..16e88c1460b 100755
--- a/tests/basic/ec/nfs.t
+++ b/tests/basic/ec/nfs.t
@@ -15,7 +15,10 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Started" volinfo_field $V0 'Status'
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available;
TEST mount_nfs $H0:/$V0 $N0 nolock
-TEST dd if=/dev/zero of=$N0/test bs=1024k count=1k
+# The test below fails with "bs=1024k count=1k", but passes when "oflag=direct"
+# is used. There also does not seem to be an issue on systems with sufficient
+# memory. Reducing the "count" prevents hangs too.
+TEST dd if=/dev/zero of=$N0/test bs=1024k count=32
## Before killing daemon to avoid deadlocks
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0