Testing Replay operations with Multi Channel

Anubhav Rakshit anubhav.rakshit at gmail.com
Thu Jul 3 05:43:58 MDT 2014


Hi Metze,

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


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.

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.
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.

Thanks,
anubhav


More information about the samba-technical mailing list