From 27628b7b0950a673cfb5584c76d25c183f5be02f Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 24 Oct 2014 17:10:15 +0200 Subject: Regression test portability: quota-anon-fd-nfs.t Fix portability problems in quota-anon-fd-nfs.t - Use mount_nfs wrapper and include nfs.rc to get it defined. - umount NFS before cleanup to avvoid deadlocks. - umount -l is Linux-specific, use umount -f on BSD. - wait for 1s for portmap registration before mouting NFS. - mount from $H0 instead of localhost: the later fails on NetBSD. - Test quota without filling GB of data, 20MB is enough and it will be gentle with smaller setups. - wait for write behind to complete before testing quota overflow BUG: 1129939 Change-Id: I097d5faed2fa7b6438aaa56def85172f23bbe7dc Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8969 Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Niels de Vos Tested-by: Kiran Patil Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/include.rc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'tests/include.rc') diff --git a/tests/include.rc b/tests/include.rc index 82527856902..56366eda083 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -424,11 +424,22 @@ function cleanup() # unmount all stale mounts from /tmp, This is a temporary work around # till the stale mount in /tmp is found. - umount -l /tmp/mnt* 2>/dev/null - umount -l $M0 2>/dev/null || umount -f $M0 2>/dev/null || true; - umount -l $M1 2>/dev/null || umount -f $M1 2>/dev/null || true; - umount -l $N0 2>/dev/null || umount -f $N0 2>/dev/null || true; - umount -l $N1 2>/dev/null || umount -f $N1 2>/dev/null || true; + case `uname -s` in + Linux) + flag="-l" + ;; + NetBSD|FreeBSD|Darwin) + flag="-f" + ;; + *) + flag="" + ;; + esac + umount $flag /tmp/mnt* 2>/dev/null + umount $flag $M0 2>/dev/null || umount -f $M0 2>/dev/null || true; + umount $flag $M1 2>/dev/null || umount -f $M1 2>/dev/null || true; + umount $flag $N0 2>/dev/null || umount -f $N0 2>/dev/null || true; + umount $flag $N1 2>/dev/null || umount -f $N1 2>/dev/null || true; } -- cgit