diff options
author | Csaba Henk <csaba@redhat.com> | 2018-10-22 00:59:05 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-12-14 18:11:01 +0000 |
commit | eb77d69be528580ca6e4c109762b862114beca87 (patch) | |
tree | 7e6fd97cac707f2ef2a435deb55602459598f7ea /tests | |
parent | d49b41e817d592c1904b6f01716df6546dad3ebe (diff) |
fuse: SETLKW interrupt
Use the (f)getxattr based clearlocks interface to
interrupt a pending lock request.
updates: #465
Change-Id: I4e91a4d8791fc688fed400a02de4c53487e61be2
Signed-off-by: Csaba Henk <csaba@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/features/flock_interrupt.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/features/flock_interrupt.t b/tests/features/flock_interrupt.t new file mode 100644 index 00000000000..8603b656c24 --- /dev/null +++ b/tests/features/flock_interrupt.t @@ -0,0 +1,33 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +## Start and create a volume +TEST glusterd; +TEST pidof glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}0; + +## Verify volume is is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; + +## Start volume and verify +TEST $CLI volume start $V0; +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; +} + +EXPECT_WITHIN 2 ok flock_interrupt; + +## Finish up +cleanup; |