From 7f6ed60c70c25d7938ae5eca7e5a575298c5e670 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Apr 2006 06:06:26 +0000 Subject: 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) --- source4/torture/raw/oplock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source4/torture/raw/oplock.c') diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 6008724d48..7074b7b357 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -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); -- cgit