From 3389bc58ea9773a66ed4bc7bd96b93dc1c97e4cc Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 20 Nov 2019 22:31:48 +0530 Subject: tests/fuse/bug-965974.t: turn off md-cache, to fix failure of the test Imagine the following set of operations: 1. touch $M0/file 2. ln $M0/file $M0/file.lnk 3. rm $M1/file 4. wait for md-cache-timeout 5. stat $M0/file.lnk $M0/file stat on $M0/file in step 5 succeeds when md-cache-timeout is non-zero even though it was removed from $M1. The reason is 1. fuse-bridge on $M0 would resolve both file and file.lnk to same inode. This inode i1 is cached in md-cache. 2. After md-cache-timeout lookup on $M0/file.lnk would be sent to backend. This lookup will be successful as file.lnk is present on backend and would refresh the md-cache. 3. The lookup on $M0/file sent within md-cache-timeout after lookup on $M0/file.lnk would be sent with i1. Since i1 was refreshed by lookup on $M0/file.lnk, the cache is deemed valid and md-cache responds lookup on $M0/file as success To fix this failure we can either: 1. remove lookup on $M0/file.lnk, so that lookup on $M0/file is actually sent to backend. 2. turn off md-cache This patch chooses option 2. credits: Csaba Henk Change-Id: I352c2acd377fe10c4bdf3b6e53c1de86a4e544c7 Signed-off-by: Raghavendra G Updates: bz#1756900 --- tests/bugs/fuse/bug-985074.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/bugs') diff --git a/tests/bugs/fuse/bug-985074.t b/tests/bugs/fuse/bug-985074.t index d10fd9f8b41..ffa6df54144 100644 --- a/tests/bugs/fuse/bug-985074.t +++ b/tests/bugs/fuse/bug-985074.t @@ -30,7 +30,7 @@ TEST glusterd TEST $CLI volume create $V0 $H0:$B0/$V0 TEST $CLI volume start $V0 -TEST $CLI volume set $V0 md-cache-timeout 3 +TEST $CLI volume set $V0 performance.stat-prefetch off TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --entry-timeout=0 --attribute-timeout=0 TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M1 --entry-timeout=0 --attribute-timeout=0 @@ -40,8 +40,7 @@ TEST ln $M0/file $M0/file.link TEST ls -ali $M0 $M1 TEST rm -f $M1/file.link TEST ls -ali $M0 $M1 -# expire the md-cache timeout -sleep 3 + TEST mv $M0/file $M0/file.link TEST stat $M0/file.link TEST ! stat $M0/file -- cgit