mirror of
https://github.com/samba-team/samba.git
synced 2025-03-23 06:50:21 +03:00
r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic
(This used to be commit ecd4e315b99a0f2aa021937308c7b93c33efbd93)
This commit is contained in:
parent
ba15d622d3
commit
2b5b463892
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user