summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2019-02-14 02:01:38 +0100
committerAmar Tumballi <amarts@redhat.com>2019-03-05 02:49:08 +0000
commit35ac5ae13fcf517cedc58005e258142c2e4620ab (patch)
treef867f8351f0b483802f0098976d5f240e8d1feff
parent2b51b89f0f67ba1f7655cadb3fab9b4d3766faa6 (diff)
fuse lock interrupt: fix flock_interrupt.t
updates: bz#1193929 Change-Id: I347de62755100cd69e3cf341434767ae23fd1ba4 Signed-off-by: Csaba Henk <csaba@redhat.com>
-rw-r--r--tests/features/flock_interrupt.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/features/flock_interrupt.t b/tests/features/flock_interrupt.t
index 8603b65..964a4bc 100644
--- a/tests/features/flock_interrupt.t
+++ b/tests/features/flock_interrupt.t
@@ -22,12 +22,12 @@ EXPECT 'Started' volinfo_field $V0 'Status';
TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;
TEST touch $M0/testfile;
-function flock_interrupt {
- flock $MO/testfile sleep 3 & flock -w 1 $M0/testfile true;
- echo ok;
-}
+echo > got_lock
+flock $M0/testfile sleep 6 & { sleep 0.3; flock -w 2 $M0/testfile true; echo ok > got_lock; } &
-EXPECT_WITHIN 2 ok flock_interrupt;
+EXPECT_WITHIN 4 ok cat got_lock;
## Finish up
+sleep 7;
+rm -f got_lock;
cleanup;