diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-10-12 06:03:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:41 -0500 |
commit | 655138602c75925a6d655841ee80cf5346a9a399 (patch) | |
tree | 3f7d5880e2b402d96b41c7355aed3ead1004961f /source4 | |
parent | 860ffba4e147b7c27b416df60bec587eb61ea148 (diff) | |
download | samba-655138602c75925a6d655841ee80cf5346a9a399.tar.gz samba-655138602c75925a6d655841ee80cf5346a9a399.tar.bz2 samba-655138602c75925a6d655841ee80cf5346a9a399.zip |
r10912: added a test for supporting batch oplock upgrades
(This used to be commit 1183af06b70a06ef7a1af665567560e9158fc960)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/raw/ioctl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c index b8bf3b2701..2768002893 100644 --- a/source4/torture/raw/ioctl.c +++ b/source4/torture/raw/ioctl.c @@ -105,6 +105,20 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) status = smb_raw_ioctl(cli->tree, mem_ctx, &nt); CHECK_STATUS(status, NT_STATUS_OK); + printf("trying batch oplock\n"); + nt.ioctl.level = RAW_IOCTL_NTIOCTL; + nt.ntioctl.in.function = (FSCTL_FILESYSTEM | (2<<2)); + nt.ntioctl.in.fnum = fnum; + nt.ntioctl.in.fsctl = True; + nt.ntioctl.in.filter = 0; + + status = smb_raw_ioctl(cli->tree, mem_ctx, &nt); + if (NT_STATUS_IS_OK(status)) { + printf("Server supports batch oplock upgrades on open files\n"); + } else { + printf("Server does not support batch oplock upgrades on open files\n"); + } + printf("Trying bad handle\n"); nt.ntioctl.in.fnum = fnum+1; status = smb_raw_ioctl(cli->tree, mem_ctx, &nt); |