1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r25689: test with a non-zero size file

(This used to be commit 2a6713aa23)
This commit is contained in:
Andrew Tridgell 2007-10-18 01:37:46 +02:00 committed by Stefan Metzmacher
parent 4e5e316022
commit ab52f9314d

View File

@ -1462,6 +1462,7 @@ bool torture_hold_oplock(struct torture_context *torture,
for (i=0;i<ARRAY_SIZE(hold_info);i++) {
union smb_open io;
NTSTATUS status;
char c = 1;
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid = 0;
@ -1493,6 +1494,12 @@ bool torture_hold_oplock(struct torture_context *torture,
return false;
}
hold_info[i].fnum = io.ntcreatex.out.file.fnum;
/* make the file non-zero size */
if (smbcli_write(cli->tree, hold_info[i].fnum, 0, &c, 0, 1) != 1) {
printf("Failed to write to file\n");
return false;
}
}
printf("Waiting for oplock events\n");