74096c
From 47d8c316f622850d060af90d1d939528ace5607a Mon Sep 17 00:00:00 2001
74096c
From: Csaba Henk <csaba@redhat.com>
74096c
Date: Thu, 14 Feb 2019 02:01:38 +0100
74096c
Subject: [PATCH 475/478] fuse lock interrupt: fix flock_interrupt.t
74096c
74096c
Upstream:
74096c
> Reviewed-on: https://review.gluster.org/22213
74096c
> updates: bz#1193929
74096c
> Change-Id: I347de62755100cd69e3cf341434767ae23fd1ba4
74096c
> Signed-off-by: Csaba Henk <csaba@redhat.com>
74096c
74096c
BUG: 1821743
74096c
Change-Id: I0088f804bca215152e7ca2c490402c11f7b5333a
74096c
Signed-off-by: Csaba Henk <csaba@redhat.com>
74096c
Reviewed-on: https://code.engineering.redhat.com/gerrit/216158
74096c
Tested-by: RHGS Build Bot <nigelb@redhat.com>
74096c
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
74096c
---
74096c
 tests/features/flock_interrupt.t | 10 +++++-----
74096c
 1 file changed, 5 insertions(+), 5 deletions(-)
74096c
74096c
diff --git a/tests/features/flock_interrupt.t b/tests/features/flock_interrupt.t
74096c
index 8603b65..964a4bc 100644
74096c
--- a/tests/features/flock_interrupt.t
74096c
+++ b/tests/features/flock_interrupt.t
74096c
@@ -22,12 +22,12 @@ EXPECT 'Started' volinfo_field $V0 'Status';
74096c
 TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;
74096c
 TEST touch $M0/testfile;
74096c
 
74096c
-function flock_interrupt {
74096c
-        flock $MO/testfile sleep 3 & flock -w 1 $M0/testfile true;
74096c
-        echo ok;
74096c
-}
74096c
+echo > got_lock
74096c
+flock $M0/testfile sleep 6 & { sleep 0.3; flock -w 2 $M0/testfile true; echo ok > got_lock; } &
74096c
 
74096c
-EXPECT_WITHIN 2 ok flock_interrupt;
74096c
+EXPECT_WITHIN 4 ok cat got_lock;
74096c
 
74096c
 ## Finish up
74096c
+sleep 7;
74096c
+rm -f got_lock;
74096c
 cleanup;
74096c
-- 
74096c
1.8.3.1
74096c