Author: tridge Date: 2005-10-12 06:03:28 +0000 (Wed, 12 Oct 2005) New Revision: 10912
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10912 Log: added a test for supporting batch oplock upgrades Modified: branches/SAMBA_4_0/source/torture/raw/ioctl.c Changeset: Modified: branches/SAMBA_4_0/source/torture/raw/ioctl.c =================================================================== --- branches/SAMBA_4_0/source/torture/raw/ioctl.c 2005-10-11 20:14:04 UTC (rev 10911) +++ branches/SAMBA_4_0/source/torture/raw/ioctl.c 2005-10-12 06:03:28 UTC (rev 10912) @@ -105,6 +105,20 @@ 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);