s4: torture: kernel_oplocks. Create a regression test case for bug #13058.
authorJeremy Allison <jra@samba.org>
Fri, 3 Nov 2017 19:02:17 +0000 (12:02 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 10 Nov 2017 22:27:10 +0000 (23:27 +0100)
commit15597a95ecd2d1c2b7edce4942d489c95796951f
tree83030a0801f2d4228322796dfec30b4151edf21a
parent62a556d5c8ce0650e3a2095ee62bea16c8eab1d5
s4: torture: kernel_oplocks. Create a regression test case for bug #13058.

It implements the following test case:

1. client of smbd-1 opens the file and sets the oplock.
2. client of smbd-2 tries to open the file. open() fails(EAGAIN) and open is deferred.
3. client of smbd-1 sends oplock break request to the client.
4. client of smbd-1 closes the file.
5. client of smbd-1 opens the file and sets the oplock.
6. client of smbd-2 calls defer_open_done(), sees that the file lease was not changed
and does not reschedule open.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13058

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source4/torture/smb2/oplock.c