git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e5e316
)
r25689: test with a non-zero size file
author
Andrew Tridgell
<tridge@samba.org>
Wed, 17 Oct 2007 23:37:46 +0000
(
01:37
+0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 21 Dec 2007 04:43:14 +0000
(
05:43
+0100)
(This used to be commit
2a6713aa239d07f6898f507ddb3631504c379792
)
source4/torture/raw/oplock.c
patch
|
blob
|
history
diff --git
a/source4/torture/raw/oplock.c
b/source4/torture/raw/oplock.c
index 1f44f96b44cbeeaf622fce1b4963cc30e3441c6f..e642c1846c0e0ad5a9362006e81a0ed0608538af 100644
(file)
--- a/
source4/torture/raw/oplock.c
+++ b/
source4/torture/raw/oplock.c
@@
-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");