d5865881de
The test is failing in master. see gluster-devel for more details. Change-Id: I7a589ad2c54bd55d62f4e66fdf8037c19fc123ea BUG: 1448364 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://review.gluster.org/17234 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
55 lines
1.3 KiB
Bash
55 lines
1.3 KiB
Bash
#!/bin/bash
|
|
logdir=$(gluster --print-logdir)
|
|
BRICK_LOGFILES="$logdir/bricks/d-backends-brick?.log"
|
|
rm -f $BRICK_LOGFILES &> /dev/null
|
|
|
|
# Test that lock revocation works
|
|
|
|
. $(dirname $0)/../include.rc
|
|
. $(dirname $0)/../volume.rc
|
|
cleanup;
|
|
|
|
function deadlock_fop() {
|
|
local MNT=$1
|
|
for i in {1..1000}; do
|
|
dd if=/dev/zero of=$MNT/testfile bs=1k count=10 &> /dev/null
|
|
if grep "MONKEY LOCKING" $BRICK_LOGFILES &> /dev/null; then
|
|
break
|
|
fi
|
|
done
|
|
}
|
|
|
|
function monkey_unlock() {
|
|
grep "MONKEY LOCKING" $BRICK_LOGFILES &> /dev/null && echo SUCCESS
|
|
return 0
|
|
}
|
|
|
|
function append_to_file() {
|
|
local FILE_PATH=$1
|
|
echo "hello" >> $FILE_PATH
|
|
return 0
|
|
}
|
|
|
|
#Init
|
|
TEST glusterd
|
|
TEST pidof glusterd
|
|
TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1}
|
|
TEST $CLI volume set $V0 self-heal-daemon off
|
|
TEST $CLI volume set $V0 features.locks-monkey-unlocking on
|
|
TEST $CLI volume set $V0 features.locks-revocation-secs 2
|
|
TEST $CLI volume start $V0
|
|
TEST $GFS --volfile-id=$V0 -s $H0 $M0;
|
|
TEST $GFS --volfile-id=$V0 -s $H0 $M1;
|
|
|
|
# Deadlock writes to a file using monkey unlocking
|
|
deadlock_fop $M0 &
|
|
EXPECT_WITHIN 60 "SUCCESS" monkey_unlock
|
|
|
|
# Sleep > unlock timeout and attempt to write to the file
|
|
sleep 3
|
|
TEST append_to_file $M1/testfile
|
|
|
|
cleanup
|
|
#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1369401
|
|
#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=1448364
|