summaryrefslogtreecommitdiffstats
path: root/tests/features
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2018-10-29 14:41:26 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-17 09:16:13 +0000
commitc2e758b54d8a3f778e3e63db0000bb8b63de9b25 (patch)
treebfb3198c6a8d7c744b891f6d9dac0e624e1f9ebb /tests/features
parentb7aec05aa965202ab73120acf0da4c32fe0cf16c (diff)
lease: Treat unlk request as noop if lease not found
When the glusterfs server recalls the lease, it expects client to flush data and unlock the lease. If not it sets a timer (starting from the time it sends RECALL request) and post timeout, it revokes it. Here we could have a race where in client did send UNLK lease request but because of network delay it may have reached after server revokes it. To handle such situations, treat such requests as noop and return sucesss. Change-Id: I166402d10273f4f115ff04030ecbc14676a01663 updates: bz#1648768 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Diffstat (limited to 'tests/features')
-rw-r--r--tests/features/glfs-lease.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/features/glfs-lease.c b/tests/features/glfs-lease.c
index f781f46c4ca..e82cd875b38 100644
--- a/tests/features/glfs-lease.c
+++ b/tests/features/glfs-lease.c
@@ -262,7 +262,7 @@ testcase1_rd_lease()
VERIFY_RESULT(6, ret, NONE);
ret = unlk_read_lease(fd1, lid1);
- VERIFY_RESULT(7, ret, SHUD_FAIL);
+ VERIFY_RESULT(7, ret, SHUD_PASS);
ret = glfs_close(fd1);
VERIFY_RESULT(8, ret, SHUD_PASS);
@@ -285,7 +285,7 @@ testcase2_wr_lease()
VERIFY_RESULT(1, ret, SHUD_FAIL);
ret = unlk_write_lease(fd1, lid1);
- VERIFY_RESULT(2, ret, SHUD_FAIL);
+ VERIFY_RESULT(2, ret, SHUD_PASS);
ret = set_write_lease(fd1, lid1);
VERIFY_RESULT(3, ret, SHUD_PASS);