From 10153901f0649b2d12c505a0f9fbef7a69acf128 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 7 Jan 2016 13:01:02 +0530 Subject: tests: Fix spurious failure in bug-1221481-allow-fops-on-dir-split-brain.t Backport of: http://review.gluster.org/#/c/13172/ Occasionally, when ls is executed, prior to READDIRP, a STAT is wound on the operand directory. And AFR fails STAT with EIO if it is in metadata split-brain which "dir" is in the test case in question. As a result, ls also fails with EIO, causing test 20 to return negative exit status. The fix is in the test script where the parts that cause the dir to go into metadata split-brain have been removed. Now "dir" will only have entry split-brain. Change-Id: Icf3998ad6f8735c283171e22445406a2eaaaa23f BUG: 1296400 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/13190 Smoke: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/bugs/replicate') diff --git a/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t b/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t index cd4a9bad87b..1283d8eeef4 100644 --- a/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t +++ b/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t @@ -15,19 +15,16 @@ TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 TEST mkdir $M0/dir TEST touch $M0/dir/file{1..5} -#Create metadata and entry split-brain +#Create entry split-brain TEST kill_brick $V0 $H0 $B0/$V0"1" -TEST setfattr -n user.attribute -v value1 $M0/dir TEST touch $M0/dir/FILE TEST $CLI volume start $V0 force EXPECT_WITHIN $CHILD_UP_TIMEOUT '1' afr_child_up_status_meta $M0 $V0-replicate-0 1 TEST kill_brick $V0 $H0 $B0/$V0"0" -TEST setfattr -n user.attribute -v value2 $M0/dir TEST touch $M0/dir/FILE TEST $CLI volume start $V0 force EXPECT_WITHIN $CHILD_UP_TIMEOUT '1' afr_child_up_status_meta $M0 $V0-replicate-0 0 -TEST ! getfattr $M0/dir cd $M0/dir EXPECT "6" echo $(ls | wc -l) TEST ! cat FILE -- cgit