From 0778882d11265f258b3e0f3d9892527ac8ea7341 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 15 Mar 2015 23:07:01 +0100 Subject: 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 Reviewed-on: http://review.gluster.org/9883 Tested-by: Gluster Build System Reviewed-by: Xavier Hernandez --- tests/basic/ec/nfs.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/basic') 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 -- cgit