summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 06:18:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:45 -0500
commit2b5b46389250ea5224a5bb2eb925a1b8e66effb8 (patch)
tree876e20dcad69c41103e06224bab8c99afd1200a5 /source4/torture
parentba15d622d3e9d1eaf0b740c1367dee50f4b29e5c (diff)
downloadsamba-2b5b46389250ea5224a5bb2eb925a1b8e66effb8.tar.gz
samba-2b5b46389250ea5224a5bb2eb925a1b8e66effb8.tar.bz2
samba-2b5b46389250ea5224a5bb2eb925a1b8e66effb8.zip
r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic
(This used to be commit ecd4e315b99a0f2aa021937308c7b93c33efbd93)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/read.c10
1 files changed, 6 insertions, 4 deletions
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);