* Fwd: Questions on pynfs:st_lock.py:testLongPoll
[not found] <CAABTemQXTxKgqxywjeZ_ORoNqi5pz_HAk9qn=Tu0wnsru0bcFw@mail.gmail.com>
@ 2018-04-16 8:56 ` Antonio M.
0 siblings, 0 replies; only message in thread
From: Antonio M. @ 2018-04-16 8:56 UTC (permalink / raw)
To: linux-nfs
Hi,
It looks like "testLongPoll" in st_lock.py is trying to test whether
lock is not prematurely reaped out before lease expires.
However, I don't understand that the following part of the code where
lockowner3 is trying to grab a lock is also part of the same Client
and owns the same ClientID.
So, after perforing that operation, lease on client will be renewed.
And thus, lease will never expire. Only when the loop completes, LOCK
will be unlocked by the first owner.
Also, the test does not consider that if NFS server is implementing
delayed return of DENIAL for conflicting locks.
Does this test assume certain NFS server implementation ? Also, what
if the lease is anyway going to be renewed for failed operation as
well for same client id ?
# Poll for lock
while timeleft:
time.sleep(1)
if badpoll:
# Third owner tries to butt in and steal lock
res3 = c.lock_file("owner3", fh3, stateid3,
type=WRITEW_LT, lockowner="lockowner3_LOCK22")
if res3.status == NFS4_OK:
t.pass_warn("Locking is not fair")
check(res3, NFS4ERR_DENIED,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-16 8:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAABTemQXTxKgqxywjeZ_ORoNqi5pz_HAk9qn=Tu0wnsru0bcFw@mail.gmail.com>
2018-04-16 8:56 ` Fwd: Questions on pynfs:st_lock.py:testLongPoll Antonio M.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).