smbtorture tests for SMB3 OFFLOAD_READ / OFFLOAD_WRITE?
David Disseldorp
ddiss at suse.de
Fri Sep 30 08:27:35 UTC 2016
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.
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:
...
> + 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?
Cheers, David
More information about the samba-technical
mailing list