summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-10-18 01:37:46 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:14 +0100
commitab52f9314dd28015786a2df6ce78a68eb5a275c5 (patch)
tree50d6f6bf99fc1869c8e8097e0baef9252c2e2759 /source4/torture
parent4e5e316022c96857ed2de1d10e87b12bfdd545d4 (diff)
downloadsamba-ab52f9314dd28015786a2df6ce78a68eb5a275c5.tar.gz
samba-ab52f9314dd28015786a2df6ce78a68eb5a275c5.tar.bz2
samba-ab52f9314dd28015786a2df6ce78a68eb5a275c5.zip
r25689: test with a non-zero size file
(This used to be commit 2a6713aa239d07f6898f507ddb3631504c379792)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/oplock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 1f44f96b44..e642c1846c 100644
--- 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");