diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-26 06:18:56 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-10-26 06:18:56 +0000 |
commit | f6058d0ebe8e8abd3394e00875b7dfb9a0245e1e (patch) | |
tree | cf8dd3d0a9a682afd2768f79c4d07cee290ab2ae | |
parent | 092b4bae14fae21ee2cd0eebf64f66f7a5573f08 (diff) | |
download | samba-f6058d0ebe8e8abd3394e00875b7dfb9a0245e1e.tar.gz samba-f6058d0ebe8e8abd3394e00875b7dfb9a0245e1e.tar.xz samba-f6058d0ebe8e8abd3394e00875b7dfb9a0245e1e.zip |
r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic
-rw-r--r-- | source/torture/raw/read.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/torture/raw/read.c b/source/torture/raw/read.c index 8fb2a5de59a..9b70fb989ef 100644 --- a/source/torture/raw/read.c +++ b/source/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); |