From 2b5b46389250ea5224a5bb2eb925a1b8e66effb8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Oct 2004 06:18:56 +0000 Subject: r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic (This used to be commit ecd4e315b99a0f2aa021937308c7b93c33efbd93) --- source4/torture/raw/read.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/torture/raw/read.c') diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index 8fb2a5de59..9b70fb989e 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -235,7 +235,7 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying empty file read\n"); io.lockread.in.fnum = fnum; io.lockread.in.count = 1; - io.lockread.in.offset = 0; + io.lockread.in.offset = 1; io.lockread.in.remaining = 0; io.lockread.out.data = buf; status = smb_raw_read(cli->tree, &io); @@ -252,7 +252,9 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying zero file read\n"); io.lockread.in.count = 0; status = smb_raw_read(cli->tree, &io); - CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT); + CHECK_STATUS(status, NT_STATUS_OK); + + smbcli_unlock(cli->tree, fnum, 1, 1); printf("Trying bad fnum\n"); io.lockread.in.fnum = fnum+1; @@ -268,9 +270,9 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.lockread.in.remaining = 0; io.lockread.in.count = strlen(test_data); status = smb_raw_read(cli->tree, &io); - CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT); + CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED); - smbcli_unlock(cli->tree, fnum, 0, 1); + smbcli_unlock(cli->tree, fnum, 1, 0); status = smb_raw_read(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_OK); -- cgit