smbtorture tests for SMB3 OFFLOAD_READ / OFFLOAD_WRITE?
Gordon Ross
gordon.w.ross at gmail.com
Fri Oct 7 23:36:07 UTC 2016
Huh. Sorry, somehow I didn't see this email.
On Sep 30, 2016 4:27 AM, "David Disseldorp" <ddiss at suse.de> wrote:
>
> Thanks a lot for sending these through, Gordon. I'll take a closer look
> in the coming days, but still have a few initial questions:
> - Is there a way of testing for server support, aside from issuing one
> of the READ/WRITE ioctls? We'll need to skip these tests for Samba
> selftest invocations.
Ah, I wondered about that. Yes, if the server responds to the ODX read
ioctl with STATUS_NOT_SUPPORTED then a Windows client will fall back
to the COPYCHUNKS ioctl. So yes, this test should just report "not
supported" and bail out in that case. Is there a standard way for
smbtorture test to report that?
> On Mon, 26 Sep 2016 17:59:45 -0400, Gordon Ross wrote:
>
> > +static bool test_ioctl_odx_write_simple(struct torture_context *torture,
> > + struct smb2_tree *tree)
> > +{
> > + struct smb2_handle src_h;
> > + struct smb2_handle dest_h;
> > + NTSTATUS status;
> > + uint32_t fsize = 0x4000;
> ...
> > + ok = test_setup_create_fill(torture, tree, tmp_ctx, FNAME,
> > + &src_h, fsize-64, SEC_RIGHTS_FILE_ALL,
> > + FILE_ATTRIBUTE_NORMAL);
> > + torture_assert(torture, ok, "src file create fill");
>
> IIUC, this test is filling the source to 16320 bytes, then attempting to
> copy 16384 bytes into the 16384 dest file. Is the short-read ignored?
> Also, I would expect the pattern check to choke on the last (zeroed) 64
> bytes of the dest file:
ODX read is supposed to round up to disk blocks.
The rounded up range should transfer as zeros.
This test is exercising that logic.
> ...
> > + ok = check_pattern(torture, tree, tmp_ctx, dest_h, 0, fsize, 0);
> > + if (!ok) {
> > + torture_fail(torture, "inconsistent file data");
> > + }
>
> Does the test pass against Windows Server?
I'm pretty sure, but I'll double check after I add reporting of "not supported".
Thanks,
Gordon
More information about the samba-technical
mailing list