Testing Replay operations with Multi Channel

Stefan (metze) Metzmacher metze at samba.org
Thu Jul 3 07:36:21 MDT 2014


Hi Anubhav,

> Can you pl. take a look if the following is in-line with your ideas about
> testing Multi Channel?
> 
> Testing Replay operations with Multi Channel
> -------------------------------------------------------------------
> 
> The SMB3 client has capability to Replay an operation when a Channel
> failsover or
> is disconnected. Following SMB2 opcodes can be replayed.
> 
> - SMB2 SET_INFO
> - SMB2 IOCTL
> - SMB2 WRITE
> - SMB2 CREATE

We should also check what happens if the REPLAY flag is send on other
operations...
Is it ignored? Does it generate NT_STATUS_INVALID_PARAMETER?...

What about LOCK/UNLOCK?

Please also list the important properties for the different kind of replays.
What makes sure that the replay works strategy is useful and reliable?

E.g. for CREATE, the create_guid in the DURABLE_HANDLE_REQUEST_V2
and the Epoch in LEASE_REQUEST_V2. Anything else?

> MS-SMB2 spec sheet has an example flow of Replay operation with Multi
> Channel in
> Sec 4.9.. We can create smbtorture test cases modeled on this.
> 
> Test Case 1: Test SMB2 Create Replay on Alternate Channel.
> 
> 1.1 Establish Multiple Channels say  ac0, ac1 , ac2
> 1.2 Perform a SMB2 Create with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 and
> SMB2_CREATE_REQUEST_LEASE_V2 using ac0
> 1.3 Drop ac0 transport connection.
> 1.4 Send the same SMB2 Create with SMB2_FLAGS_REPLAY_OPERATION.on ac1
> 1.5 Verify that 1.4 succeds.

Please document the replay critical fields and test expected and
unexpected input
and their result.

Please also test with oplocks instead of leases.

What happens if you change the order of 1.2 and 1.4?

> Test Case 2: Test SMB2 Write Replay on Alternate Channels
> 
> 2.1 Establish Multiple Channels say  ac0, ac1 , ac2
> 2.2 Perform a SMB2 Create with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 and
> SMB2_CREATE_REQUEST_LEASE_V2 using ac0
> 2.2 Write some string like "FIRST WRITE" to the above File using ac0.
> 2.3 Write some string like "SECOND WRITE" to the same File using ac0.
> 2.4 Drop ac0 transport connection.
> 2.5.Replay SMB2 Write with "SECOND WRITE" using ac1.

What do you mean by Replay exactly, which parameters differ?

> 2.6 Read back and verify that the data matches "SECOND WRITE".
> 
> 
> MS-SMB2 mentions in Sec 3.2.7.1 that Client increments
> Session.ChannelSequence on Network
> Disconnects.We can have some test cases with that scenario too.
> 
> I am not sure how/what to test for SET_INFO and IOCTL.

These are more of less like WRITE.

For set_info you can use END_OF_FILE_INFORMATION
have a look at source4/torture/smb2/setinfo.c.

For IOCTL maybe FSCTL_CREATE_OR_GET_OBJECT_ID.

Note: while the tests should demonstrate the normal behavior,
the most important thing for this tests is to demonstrate what
does *not* work and what the correct error codes are.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140703/0baec43c/attachment.pgp>


More information about the samba-technical mailing list