|author||Niels de Vos <firstname.lastname@example.org>||2015-03-15 23:07:01 +0100|
|committer||Vijay Bellur <email@example.com>||2015-03-16 08:41:25 -0700|
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 <firstname.lastname@example.org> Reviewed-on: http://review.gluster.org/9883 Tested-by: Gluster Build System <email@example.com> Reviewed-by: Xavier Hernandez <firstname.lastname@example.org>
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
@@ -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