summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-04-10 06:06:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:01 -0500
commit7f6ed60c70c25d7938ae5eca7e5a575298c5e670 (patch)
treea33d66c16ecd195b62a5774680b25eacc59e129d /source4/torture
parent48d3fb39fff4d6f92c121557cf6c754e4ffe8fe8 (diff)
downloadsamba-7f6ed60c70c25d7938ae5eca7e5a575298c5e670.tar.gz
samba-7f6ed60c70c25d7938ae5eca7e5a575298c5e670.tar.bz2
samba-7f6ed60c70c25d7938ae5eca7e5a575298c5e670.zip
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)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/oplock.c8
1 files changed, 7 insertions, 1 deletions
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);