1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

r15016: add a test for a 2nd open with an exclusive oplock. It does not cause

a break, as exclusive oplocks don't cache close requests
(This used to be commit 9f2617a062e99805c42fe9b2fa0179b1672b25e5)
This commit is contained in:
Andrew Tridgell 2006-04-10 06:06:26 +00:00 committed by Gerald (Jerry) Carter
parent 48d3fb39ff
commit 7f6ed60c70

View File

@ -146,7 +146,13 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
printf("unlink it - should be no break\n");
printf("a 2nd open should not cause a break\n");
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.failures, 0);
printf("unlink it - should also be no break\n");
unl.unlink.in.pattern = fname;
unl.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &unl);