From d7b46e8e5e8e5b8fead05ccf0901d5492edb6a51 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Sat, 13 May 2017 05:54:26 -0700 Subject: tests: avoid symlink between brick and mountpoint These were causing hung tests when the bricks were restarted, in some cases even accompanied by kernel stack traces involving fuse. They're unnecessary to the purpose of the test. Change-Id: I3c6c485324e2ee9418eb54929015b5bae436e9ea Signed-off-by: Jeff Darcy Reviewed-on: https://review.gluster.org/17284 Tested-by: Jeff Darcy CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Smoke: Gluster Build System Reviewed-by: Kevin Vigor --- tests/basic/afr/self-heal.t | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tests/basic') diff --git a/tests/basic/afr/self-heal.t b/tests/basic/afr/self-heal.t index e1ac17c2d79..f2af52d9773 100644 --- a/tests/basic/afr/self-heal.t +++ b/tests/basic/afr/self-heal.t @@ -194,13 +194,22 @@ TEST rm -rf $M0/* #7. Link/symlink heal +# Make links (especially symlinks) with relative paths instead of absolute +# paths, because absolute paths pointing from the brick to the mountpoint have +# caused problems. +make_link () { + mountpoint=$1; shift + # Do this in a subshell so we don't change "cd -" for the parent. + (cd $mountpoint; ln $*) +} + #Test TEST touch $M0/file -TEST ln $M0/file $M0/link_to_file +TEST make_link $M0 file link_to_file TEST kill_brick $V0 $H0 $B0/brick0 TEST rm -f $M0/link_to_file -TEST ln -s $M0/file $M0/link_to_file -TEST ln $M0/file $M0/hard_link_to_file +TEST make_link $M0 file -s link_to_file +TEST make_link $M0 file hard_link_to_file TEST $CLI volume start $V0 force EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 0 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status -- cgit