From 655138602c75925a6d655841ee80cf5346a9a399 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 12 Oct 2005 06:03:28 +0000 Subject: r10912: added a test for supporting batch oplock upgrades (This used to be commit 1183af06b70a06ef7a1af665567560e9158fc960) --- source4/torture/raw/ioctl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source4/torture/raw') 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); -- cgit