[PATCH] s4: smbtorture - Add additional test that shows our current locking precedence is correct.
jra at samba.org
Mon Jul 7 12:48:02 MDT 2014
Volker and I had an interesting conversation over
the weekend after which I realized we didn't know
what the Windows algorithm for lock precedence on
SMB1 multi-lock calls really was.
So here is a test that shows we currently have it
correct - tested against Win2K12 (wonder if I ever
checked this in the past, in the pre-test-driven
development days :-).
Anyway, this at least will prevent us from regressing.
For those interested :-).
This test is designed to show that
lock precedence on the server is based
on the order received, not on the ability
to grant. For example:
A blocked lock request containing 2 locks
will be satified before a subsequent blocked
lock request over one of the same regions,
even if that region is then unlocked. E.g.
(a) lock 100->109, 120->129 (granted)
(b) lock 100->109, 120-129 (blocks)
(c) lock 100->109 (blocks)
(d) unlock 100->109
lock (c) will not be granted as lock (b)
will take precedence.
Please review & push if appropriate !
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5965 bytes
Desc: not available
More information about the samba-technical