File Server Protocol Family Server Test Design Specification

March 30, 2026 · View on GitHub

Content

Test Environment

Windows Test Environment

Below environment topology is used to demonstrate how Windows uses MS-SMB2 protocol to access files which are hosted in remote shares. To simplify the environment, all objects are created under Hyper-V manager and use VMs instead of physical machines.

Operating System Used

Operating SystemVirtual Machines
Windows Server 2012 R2DC01, Node01, Node02, Storage01
Windows 8.1Client01

Network Overview

Partner Test Environment


There are 2 options for partner to reuse above test environment:

  • Replace the whole cluster and the storage.

  • Replace only the storage in the cluster.

There are 2 parts to modify if only replace storage:

  • Replace the Storage01 using partner’s storage.

  • Replace the storage in ScaleoutFS and GeneralFS.

Network Overview

Test Scope

Test Target

This test suite will test the server endpoint of MS-FSRVP, MS-SMB2, MS-SWN, MS-RSVD, MS-DFSC, and test suite acts as client role.

Test Protocols

This test suite includes test cases of following File Sharing protocols:

  1. MS-FSRVP

  2. MS-SMB2

  3. MS-SWN

  4. MS-RSVD

  5. MS-DFSC

  6. MS-HVRS

Restrictions

  1. Named pipes and printer files are not tested.

  2. ServerStatistics is not tested.

Dependencies

Transport

MS-FSRVP scenario VSSOperateShadowCopySet in test suite utilizes MS-RPCE SDK which uses SMB and SMB2 as transport. When test FSRVP server (i.e. test suite act as synthetic client), the underlying MS-RPCE SDK code on synthetic client side will first select SMB2 as transport to communicate with server, if the server side doesn’t implement/support SMB2 as transport, the client side will use SMB as transport to communicate with server.

Test Suite Design

Test scenarios are categorized as below table and will be described in following sections.

CategoryTest CasesComments
SMB2 BVT101SMB2 common scenarios.
SMB2 Feature Test2664This test is divided by features. It contains both Model-Based test cases and traditional cases. The traditional cases are used to cover the statements which are not suitable to cover by Model-Based test cases. About Model-Based Testing, please see Spec Explorer
SMB2 Feature Combination12Extended test with more complex message sequence for new features in SMB 3.0 dialect and later.
FSRVP Test14Test for MS-FSRVP
Server Failover Test48Test server failover for MS-SMB2, MS-SWN and MS-FSRVP
RSVD Test29Test for MS-RSVD
DFSC Test41Test for MS-DFSC
HVRS Test8Test for MS-HVRS

SMB2 BVT

This is used to test SMB2 common user scenarios.

SMB2Basic_ChangeNotify_NoFileListDirectoryInGrantedAccess

Scenario
DescriptionVerify server must send an CHANGE_NOTIFY response with STATUS_ACCESS_DENIED status code if CHANGE_NOTIFY request is for a directory which GrantedAccess does not include FILE_LIST_DIRECTORY.
Message Sequence1. Start a client to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE (without FILE_LIST_DIRECTORY in GrantedAccess).
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_NoFileListDirectoryInGrantedAccess
DescriptionTest whether server sends an CHANGE_NOTIFY response with STATUS_ACCESS_DENIED status code if CHANGE_NOTIFY request is for a directory which GrantedAccess does not include FILE_LIST_DIRECTORY.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory without FILE_LIST_DIRECTORY in GrantedAccess)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter)
Expect STATUS_ACCESS_DENIED in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_CancelRegisteredChangeNotify

Scenario
DescriptionVerify that CANCEL request cancels CHANGE_NOTIFY request when there’s no CHANGE_NOTIFY response from server
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE
2. Client starts to register CHANGE_NOTIFY on directory.
3. Client starts to cancel the registered CHANGE_NOTIFY on directory.
4. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_CancelRegisteredChangeNotify
DescriptionThis test case is designed to verify that CANCEL request cancels CHANGE_NOTIFY request when there's no CHANGE_NOTIFY response from server.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_WRITE for CompletionFilter)
CANCEL
Expect STATUS_CANCELLED in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_QueryAndSet_FileInfo

Scenario
DescriptionQuery and set the info for a file
Message Sequence1. Starts a client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT.
2. Client sends CREATE request with desired access set to CENERIC_READ and CENERIC_WRITE to create a file.
3. Client sends QUERY_INFO request to query file attributes.
4. Convert file basic information
5. Client sends SetFileAttributes request to set LastAccessTime for the file
6. Client sends QUERY request to query file attributes.
7. Convert lastAccessTime in QUERY_INFO response after SET_INFO.
8. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF"
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_QueryAndSet_FileInfo
DescriptionQuery and set the info for a file
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with desired access GENERIC_WRITE and GENERIC_READ)
Parse FileBasicInformation from CREATE response
QUERY_INFO (with SMB2_0_INFO_FILE for InfoType and FileBasicInformation for FileInfoClass)
SET_INFO (with SMB2_0_INFO_FILE for InfoType and FileBasicInformation.LastAccessTime)
QUERY_INFO (with SMB2_0_INFO_FILE for InfoType and FileBasicInformation for FileInfoClass) to verify if set info works
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_LockAndUnLock

Scenario
DescriptionThis test case is designed to test whether server can handle WRITE of locking content correctly.
Message SequenceFrom client1 open a file and lock a specific range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
WRITE
From client2 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From client1 unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client2 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_LockAndUnLock
DescriptionVerify locking range could not be written and after unlock the range could be written
Prerequisites
Test Execution StepsFrom client1 open a file and lock a specific range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
WRITE
From client2 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From client1 unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client2 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

MultiCredit

Scenario
DescriptionSend request which consume more than 1 credit
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File and request multiple credit at the same time)
Send request which consumes more than 1 credit
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_MultiCredit_OneRequestWithMultiCredit
DescriptionThis test case is designed to test whether server can handle one request which consumes more than one credit.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File and request multiple credit at the same time)
WRITE request which consumes more than 1 credits
READ request which consumes more than 1 credits
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

Negotiation

Scenario
DescriptionSMB 3 protocol negotiation, this is non-cluster involved scenario
Message SequenceSMB_COM_NEGOTIATE (Optional)
NEGOTIATE
Cluster Involved ScenarioNO
Test Case
Test IDBVT_Negotiate_Compatible_Wildcard
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb2 dialect wildcard.
Prerequisites
Test Execution Steps1. Client sends SMB_COM_NEGOTIATE containing SMB2.??? Dialect and SMB2.002
2. Server returns SMB2 NEGOTIATE response with SMB2.FF dialect
3. Client sends SMB2 NEGOTIATE request containing SMB2.002, SMB2.1, SMB3 dialects
4. Server returns SMB2 NEGOTIATE response with SMB3 dialect
Cleanup
Test IDBVT_Negotiate_Compatible_2002
DescriptionEnsure server could handle compatible negotiate
Prerequisites
Test Execution Steps1. Client sends SMB_COM_NEGOTIATE containing SMB2.002
2. Server returns SMB2 NEGOTIATE response with SMB2.002 dialect
Cleanup
Test IDBVT_Negotiate_SMB2002
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 2.002 dialect.
Prerequisites
Test Execution Steps1. Client sends SMB2 NEGOTIATE containing SMB2.002
2. Server returns SMB2 NEGOTIATE response with SMB2.002 dialect
Cleanup
Test IDBVT_Negotiate_SMB21
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 2.1 dialect.
Prerequisites
Test Execution Steps1. Client sends SMB2 NEGOTIATE containing SMB2.002 and SMB2.1
2. Server returns SMB2 NEGOTIATE response with the max common dialect client and server support
Cleanup
Test IDBVT_Negotiate_SMB30
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.0 dialect.
Prerequisites
Test Execution Steps1. Client sends SMB2 NEGOTIATE containing SMB2.002, SMB2.1 and SMB3.0
2. Server returns SMB2 NEGOTIATE response with the max common dialect client and server support
Cleanup
Test IDBVT_Negotiate_SMB302
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.02 dialect.
Prerequisites
Test Execution Steps1. Client sends SMB2 NEGOTIATE containing SMB2.002, SMB2.1, SMB3.0 and SMB3.02
2. Server returns SMB2 NEGOTIATE response with the max common dialect client and server support
Cleanup
Test IDBVT_Negotiate_SigningEnabled
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Signing Enabled.
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request containing SMB2.002, SMB2.1, SMB3 dialects with signing enabled
2. Server returns NEGOTIATE response with SMB3 dialect
Cleanup
Test IDBVT_Negotiate_SMB311
DescriptionThis test case is designed to test whether server (including the server doesn't implement dialect 3.11) can handle NEGOTIATE with Smb 3.11 dialect and Negotiate Contexts.
Prerequisites
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context.
2. Server returns correct SMB2 NEGOTIATE response according to their supported dialect.
Cleanup
Test IDBVT_Negotiate_SMB311_Preauthentication
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context only.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context.
2. Server returns SMB2 NEGOTIATE response with dialect 3.11 and the correct SMB2_PREAUTH_INTEGRITY_CAPABILITIES context.
Cleanup
Test IDBVT_Negotiate_SMB311_Preauthentication_Encryption_CCM
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-128-CCM preferred.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-128-CCM preferred.
2. Server returns SMB2 NEGOTIATE response with dialect 3.11 and the correct Ciphers in SMB2_ENCRYPTION_CAPABILITIES context.
Cleanup
Test IDBVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_CCM
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-256-CCM preferred.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-256-CCM preferred.
2. Server returns SMB2 NEGOTIATE response with dialect 3.11 and the correct Ciphers in SMB2_ENCRYPTION_CAPABILITIES context.
Cleanup
Test IDBVT_Negotiate_SMB311_Preauthentication_Encryption_GCM
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-128-GCM preferred.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-128-GCM preferred.
2. Server returns SMB2 NEGOTIATE response with dialect 3.11 and the correct Ciphers in SMB2_ENCRYPTION_CAPABILITIES context.
Cleanup
Test IDBVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_GCM
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-256-GCM preferred.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_ENCRYPTION_CAPABILITIES context with AES-256-GCM preferred.
2. Server returns SMB2 NEGOTIATE response with dialect 3.11 and the correct Ciphers in SMB2_ENCRYPTION_CAPABILITIES context.
Cleanup
Test IDBVT_Negotiate_SMB311_CompressionEnabled
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with supported compression algorithms in SMB2_COMPRESSION_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_COMPRESSION_CAPABILITIES context with all supported compression algorithms.
2. Server returns SMB2 NEGOTIATE response with the expected SMB2_COMPRESSION_CAPABILITIES, if it supports the compression feature, as below:
a. If server is Windows, CompressionAlgorithms is set to the first common compression algorithm and the first common pattern scanning algorithm supported by the client and server.
b. If server is non-Windows, CompressionAlgorithms is set to all the algorithms in the CompressionAlgorithms field of Negotiate request, in the order they are received.
Cleanup
Test IDBVT_Negotiate_SMB311_Compression_IsChainedCompressionSupported
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED set in Flags field of SMB2_COMPRESSION_CAPABILITIES context when chained compression is supported.
PrerequisitesThe server implements dialect 3.11, compression and chained compression feature.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_COMPRESSION_CAPABILITIES context with all supported compression algorithms and SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED set in Flags field.
2. Server returns SMB2 NEGOTIATE response with the expected SMB2_COMPRESSION_CAPABILITIES, if it supports the compression feature, as below:
a. If server is Windows, CompressionAlgorithms is set to the first common compression algorithm and the first common pattern scanning algorithm supported by the client and server.
b. If server is non-Windows, CompressionAlgorithms is set to all the algorithms in the CompressionAlgorithms field of Negotiate request, in the order they are received.
c. SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED set in Flags field.
Cleanup
Test IDBVT_Negotiate_SMB311_RdmaTransformCapabilities_IsSupported
DescriptionThis test case is designed to test whether server that supports RDMA transform can handle NEGOTIATE with SMB2_RDMA_TRANSFORM_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11
Minimum required windows version is Windows 10 v20H2 and later and Windows Server v20H2 and later.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_RDMA_TRANSFORM_CAPABILITIES context with all supported transform Ids.
2. Server returns SMB2 NEGOTIATE response with the supported rdma transform IDs in the SMB2_RDMA_TRANSFORM_CAPABILITIES context if rdma transform feature is supported
Cleanup
Test IDNegotiate_SMB311_RdmaTransformCapabilities_EmptyTransformIds
DescriptionThis test case is designed to test whether server that supports RDMA transform can handle NEGOTIATE with empty SMB2_RDMA_TRANSFORM_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11
Minimum required windows version is Windows 10 v20H2 and later and Windows Server v20H2 and later.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_RDMA_TRANSFORM_CAPABILITIES context with empty list of transform ids.
2. Server returns SMB2 NEGOTIATE response with STATUS_INVALID_PARAMETER and fails the request.
Cleanup
Test IDNegotiate_SMB311_RdmaTransformCapabilities_InvalidDataLength
DescriptionThis test case is designed to test whether server that supports RDMA transform can handle NEGOTIATE with invalid data length for SMB2_RDMA_TRANSFORM_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11
Minimum required windows version is Windows 10 v20H2 and later and Windows Server v20H2 and later.
Test Execution Steps1. Client sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and SMB2_RDMA_TRANSFORM_CAPABILITIES with an invalid data length.
2. Server returns SMB2 NEGOTIATE response with STATUS_INVALID_PARAMETER
Cleanup

MultipleChannel

Scenario
DescriptionBind session to multiple connections
Message SequenceCreate main channel
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE
WRITE
Create alterative channel
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_MultipleChannel_NicRedundantOnBoth
DescriptionThis test case is designed to test the basic functionality of Multiple Channel, assuming that both client and server have two NICs.
Prerequisites
Test Execution StepsSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_2 to SUT NIC_2
NEGOTIATE
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Verify WRITE and READ data should be identical
Cleanup

CopyOffLoad

Scenario
DescriptionOffload the copy operation to intelligent storage devices
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
IOCtl with FSCTL_OFFLOAD_READ
IOCtl with FSCTL_OFFLOAD_WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_CopyOffload
DescriptionThis test case is designed to test whether server can handle offload copy correctly when copy content between two files.
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request
2. Server sends NEGOTIATE response
3. Client sends SESSION_SETUP request
4. Server sends SESSION_SETUP response
5. According to the status code of last step, client may send more SESSION_SETUP request as needed
6. Client sends TREE_CONNECT request
7. Server sends TREE_CONNECT response
8. Client sends CREATE request to create a test file as source of offload copy.
9. Server sends CREATE response
10. Client sends WRITE request to prepare content test file.
11. Server sends WRITE response.
12. Client sends FLUSH request to make sure the content is written to backend storage.
13. Server sends FLUSH response.
14. Client sends IOCTL request with FSCTL_OFFLOAD_READ to ask server to generate the token of the content for offload copy.
15. Server sends IOCTL response
16. Client sends CREATE request to create another file as destination of offload copy.
17. Server sends CREATE response.
18. Client sends IOCTL request with FSCTL_OFFLOAD_WRITE to ask server to copy the content from source to destination.
19. Server sends IOCTL response
20. Client sends READ request
21. Server sends READ response
22. Compare the read content is identical to written content.
23. Client sends CLOSE request
24. Server sends CLOSE response
25. Client sends TREE_DISCONNECT request
26. Server sends TREE_DISCONNECT response
27. Client sends LOGOFF request
28. Server sends LOGOFF response
Cleanup

FileLevelTrim

Scenario
DescriptionTrim a range of a file, then read that range again
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
CREATE
IOCTL (with FSCTL_FILE_LEVEL_TRIM)
CREATE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_FileLevelTrim
DescriptionThis test case is designed to test basic functionality of FSCTL_FILE_LEVEL_TRIM.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
CREATE
IOCTL (with FSCTL_FILE_LEVEL_TRIM)
CREATE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

IntegrityInfo

Scenario
DescriptionUnderlying ReFS format is required
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
IOCTL (with FSCTL_GET_INTEGRITY_INFORMATION)
IOCTL (with FSCTL_SET_INTEGRITY_INFORMATION)
IOCTL (with FSCTL_GET_INTEGRITY_INFORMATION)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SetGetIntegrityInfo
DescriptionThis test case is designed to test whether server can handle IOCTL FSCTL_GET_INTEGRITY_INFORMATION and FSCTL_SET_INTEGRITY_INFORMATION.
Prerequisites
Test Execution Steps1. Client creates a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE
2. Client sends IOCTL request with FSCTL_GET_INTEGRITY_INFORMATION.
3. Client sends IOCTL request with FSCTL_SET_INTEGRITY_INFORMATION after changed the value of the following fields in FSCTL_SET_INTEGRIY_INFO_INPUT: ChecksumAlgorithm, Flags, and Reserved.
4. Client sends IOCTL request with FSCTL_GET_INTEGRITY_INFORMATION.
5. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cleanup

DirectoryLeasing

Basic
Scenario
DescriptionObtain lease for directory (with lease request v2)
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2)
LEASE_BREAK
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_DirectoryLeasing_ReadWriteHandleCaching
DescriptionThis test case is designed to test whether server can handle READ
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request
2. Server sends NEGOTIATE response
3. Client sends SESSION_SETUP request
4. Server sends SESSION_SETUP response
5. According to the status code of last step, client may send more SESSION_SETUP request as needed
6. Client sends TREE_CONNECT request
7. Server sends TREE_CONNECT response
8. Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
9. Server sends CREATE response
10. Server sends LEASE_BREAK notification
11. Client sends LEASE_BREAK acknowledgement
12. Server sends LEASE_BREAK response
13. Client sends CLOSE request
14. Server sends CLOSE response
15. Client sends TREE_DISCONNECT request
16. Server sends TREE_DISCONNECT response
17. Client sends LOGOFF request
18. Server sends LOGOFF response
Cleanup
DirectoryLeasing_LeaseBreakOnMultiClients
Scenario
DescriptionThis tests lease break notification when multiple clients request caching lease
Message SequenceFrom client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From client2 to access same directory to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From client3 to access same directory to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with DELETE)
From client1 and client2
Receive LEASE_BREAK
Send LEASE_BREAK_ACK
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_DirectoryLeasing_LeaseBreakOnMultiClients
DescriptionTest whether server can handle lease break notification when multiple clients request caching lease.
Prerequisites
Test Execution StepsFrom client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From client2 to access same directory to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From client3 to access same directory to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with DELETE)
From client1 and client2
Receive LEASE_BREAK
Send LEASE_BREAK_ACK
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

Encryption

Scenario
DescriptionSend and receive commands with encryption enabled
Message SequenceNEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (expect SMB2_SHAREFLAG_ENCRYPT_DATA)
CREATE
WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_Encryption_GlobalEncryptionEnabled
DescriptionEnsure server could handle encrypted requests correctly while global encryption is enabled
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request with SMB2_GLOBAL_CAP_ENCRYPTION
2. Server sends NEGOTIATE response with SMB2_GLOBAL_CAP_ENCRYPTION
3. Client sends SESSION_SETUP request
4. Server sends SESSION_SETUP response
5. According to the status code of last step, client may send more SESSION_SETUP request as needed
6. Client sends encrypted TREE_CONNECT request
7. Server sends TREE_CONNECT response with SMB2_SHAREFLAG_ENCRYPT_DATA
8. Client sends encrypted CREATE request
9. Server sends encrypted CREATE response
10. Client sends encrypted WRITE request
11. Server sends encrypted WRITE response
12. Client sends encrypted READ request to read the content written in previous message.
13. Server sends encrypted READ response
14. Client check whether the decrypted content is consistent with the original one.
15. Client sends encrypted CLOSE request
16. Server sends encrypted CLOSE response
17. Client sends encrypted TREE_DISCONNECT request
18. Server sends encrypted TREE_DISCONNECT response
19. Client sends LOGOFF request
20. Server sends LOGOFF response
Cleanup
Test IDBVT_Encryption_PerShareEncryptionEnabled
DescriptionEnsure server could handle encrypted requests correctly while client requests to connect to encrypted share.
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request with SMB2_GLOBAL_CAP_ENCRYPTION
2. Server sends NEGOTIATE response with SMB2_GLOBAL_CAP_ENCRYPTION
3. Client sends SESSION_SETUP request
4. Server sends SESSION_SETUP response
5. According to the status code of last step, client may send more SESSION_SETUP request as needed
6. Client sends TREE_CONNECT request to connect an encrypted share
7. Server sends TREE_CONNECT response with SMB2_SHAREFLAG_ENCRYPT_DATA
8. Client sends encrypted CREATE request
9. Server sends encrypted CREATE response
10. Client sends encrypted WRITE request
11. Server sends encrypted WRITE response
12. Client sends encrypted READ request to read the content written in previous message
13. Server sends encrypted READ response
14. Client check whether the decrypted content is consistent with the original one
15. Client sends encrypted CLOSE request
16. Server sends encrypted CLOSE response
17. Client sends encrypted TREE_DISCONNECT request
18. Server sends encrypted TREE_DISCONNECT response
19. Client sends LOGOFF request
20. Server sends LOGOFF response
Cleanup
Test IDBVT_Encryption_SMB311
DescriptionThis case is to ensure server could handle encrypted requests correctly with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context.
PrerequisitesThe server implement dialect 3.11.
Test Execution Steps1. Client sends NEGOTIATE request with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context. AES-128-GCM and AES-128-CCM are both sent as the cipher algorithms. Server should reply NEGOTIATE response with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and one of the cipher algorithm.
2. Client sends SESSION_SETUP request and gets response.
3. Client sends encrypted TREE_CONNECT, Create, Write, Read, Close, TREE_DISCONNECT and Logoff request and gets successful responses.
Cleanup
Test IDBVT_Encryption_SMB311_CCM
DescriptionThis case is to ensure server could handle encrypted requests correctly with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-128-CCM as encryption algorithm.
PrerequisitesThe server implement dialect 3.11.
Test Execution Steps1. Client sends NEGOTIATE request with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context. AES-128-CCM is sent as the preferred cipher algorithm. Server should reply NEGOTIATE response with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-128-CCM as cipher algorithm.
2. Client sends SESSION_SETUP request and gets response.
3. Client sends encrypted TREE_CONNECT, Create, Write, Read, Close, TREE_DISCONNECT and Logoff request and gets successful responses.
Cleanup
Test IDBVT_Encryption_SMB311_AES_256_CCM
DescriptionThis case is to ensure server could handle encrypted requests correctly with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-256-CCM as encryption algorithm.
PrerequisitesThe server implement dialect 3.11.
Test Execution Steps1. Client sends NEGOTIATE request with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context. AES-256-CCM is sent as the preferred cipher algorithm. Server should reply NEGOTIATE response with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-256-CCM as cipher algorithm.
2. Client sends SESSION_SETUP request and gets response.
3. Client sends encrypted TREE_CONNECT, Create, Write, Read, Close, TREE_DISCONNECT and Logoff request and gets successful responses.
Cleanup
Test IDBVT_Encryption_SMB311_GCM
DescriptionThis case is to ensure server could handle encrypted requests correctly with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-128-GCM as encryption algorithm.
PrerequisitesThe server implement dialect 3.11.
Test Execution Steps1. Client sends NEGOTIATE request with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context. AES-128-GCM is sent as the preferred cipher algorithm. Server should reply NEGOTIATE response with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-128-GCM as cipher algorithm.
2. Client sends SESSION_SETUP request and gets response.
3. Client sends encrypted TREE_CONNECT, Create, Write, Read, Close, TREE_DISCONNECT and Logoff request, and gets successful responses.
Cleanup
Test IDBVT_Encryption_SMB311_AES_256_GCM
DescriptionThis case is to ensure server could handle encrypted requests correctly with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-256-GCM as encryption algorithm.
PrerequisitesThe server implement dialect 3.11.
Test Execution Steps1. Client sends NEGOTIATE request with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context. AES-256-GCM is sent as the preferred cipher algorithm. Server should reply NEGOTIATE response with dialect 3.11, SMB2_ENCRYPTION_CAPABILITIES context and AES-256-GCM as cipher algorithm.
2. Client sends SESSION_SETUP request and gets response.
3. Client sends encrypted TREE_CONNECT, Create, Write, Read, Close, TREE_DISCONNECT and Logoff request, and gets successful responses.
Cleanup

AppInstanceId

Scenario
DescriptionClient cluster failover
Message SequenceBased on NIC1, create Client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With AppID)
WRITE
Switch to NIC2 and create Client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With the same AppID)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_AppInstanceId
DescriptionCheck when client fails over to a new client, the previous opened file can be reopened with the same AppInstanceId.
Prerequisites
Test Execution StepsVia NIC1
1. Start the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT
2. The first client sends CREATE request for exclusive open with SMB2_CREATE_APP_INSTANCE_ID create context.
3. The first client sends WRITE request.
Via NIC2
4. Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT
5. The second client sends CREATE request for exclusive open with the same SMB2_CREATE_APP_INSTANCE_ID of the first client.
6. The second client sends READ request.
Via NIC1
7. The first client sends another WRITE request.
Via NIC2
8. Tear down the second client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup

AppInstanceVersion

Scenario
DescriptionClient cluster failover v2
Message SequenceClient1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With AppInstanceID and AppInstanceVersion)
Client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With the same AppInstanceID and same or different AppInstanceVersion)
Client1:
Write and check the result
Cluster Involved ScenarioNO
Test Case
Test IDBVT_AppInstanceVersion_SMB311_GreaterVersion
DescriptionCheck when client fails over to a new client, the previous opened file can be reopened with a greater AppInstanceVersion.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Start the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
2. The first client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 0.
3. Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT.
4. The second client sends CREATE request with AppInstanceVersionHigh = 2, AppInstanceVersionLow = 1 and succeeds.
5. Client1 sends another WRITE request.
6. The first client sends another WRITE request and failed since the open is closed.
7. Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup
Test IDBVT_AppInstanceVersion_SMB311_SameVersion
DescriptionCheck when client fails over to a new client, the previous opened file can NOT be reopened with the same AppInstanceVersion.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Start the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
2. The first client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 0.
3. Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT.
4. The second client sends CREATE request with AppInstanceVersionHigh = 2, AppInstanceVersionLow = 0 and succeeds.
5. Client1 sends another WRITE request and failed since the open is closed.
6. Client1 sends another CREATE request with same AppInstanceVersion as Client2 and gets STATUS_FILE_FORCED_CLOSED.
7. Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup
Test IDBVT_AppInstanceVersion_SMB311_LowerAppInstanceVersionHigh
DescriptionCheck when client fails over to a new client, the previous opened file can NOT be reopened with lower AppInstanceVersion.AppInstanceVersionHigh.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Start the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
2. The first client sends CREATE request with AppInstanceVersionHigh = 2, AppInstanceVersionLow = 0.
3. Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT.
4. The second client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 0 and gets failure.
5. Client1 sends another WRITE request and succeeds since the open is not closed.
6. Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup
Test IDBVT_AppInstanceVersion_SMB311_LowerAppInstanceVersionLow
DescriptionCheck when client fails over to a new client, the previous opened file can NOT be reopened with lower AppInstanceVersion.AppInstanceVersionLow.
PrerequisitesThe server implements dialect 3.11.
Test Execution Steps1. Start the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
2. The first client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 2.
3. Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT.
4. The second client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 1 and gets failure.
5. Client1 sends another WRITE request and succeeds since the open is not closed.
6. Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup

DurableHandle

Scenario
DescriptionDurableHandle
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With DurableHandleRequest)
WRITE
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With DurableHandleReconnect)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_DurableHandleV1_Reconnect_WithBatchOplock
DescriptionThis test case is designed to test whether server can create a durable open v1 with batch oplock correctly.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 create context and BatchOpLock
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and BatchOpLock
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_DurableHandleV1_Reconnect_WithLeaseV1
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create context
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_DurableHandleV2_Reconnect_WithBatchOplock
DescriptionTest reconnect with DurableHandleV2 and BatchOplock.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV2 create context and BatchOpLock
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and BatchOpLock
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_DurableHandleV2_Reconnect_WithLeaseV1
DescriptionTest reconnect with DurableHandleV2 and LeaseV1 context.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV2 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV2 and LeaseV1 create context
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_PersistentHandle_Reconnect
DescriptionTest reconnect with persistent handle
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with PersistentHandle create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with PersistentHandle
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

Oplock

Scenario
DescriptionThis scenario is to test whether server can handle Oplock break correctly.
Message SequenceBased on NIC1, create Client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With BatchOplock)
WRITE
Switch to NIC2 and create Client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
Switch to NIC1 and Client1:
OplockBreakNotification
OpLockBreakAcknowlegement
Cluster Involved ScenarioNO
Test Case
Test IDBVT_OpLockBreak
DescriptionThis test case is designed to test whether sever can handle OplockBreak correctly.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with BatchOpLock
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request on the same file
Via NIC1
Server sends OPLOCK_BREAK_NOTIFICATION response
Client sends OPLOCK_BREAK_ACKNOWLEDGEMENT request
Server sends OPLOCK_BREAK_RESPONSE response
Via NIC2
Server sends CREATE response
Via NIC1
Tear down the client by sending CLOSE, TREE_DISCONNECT and LOG_OFF.
Via NIC2
Tear down the client by sending CLOSE, TREE-CONNECT and LOG_OFF.
Cleanup
Test IDBVT_OpLockBreak_Lease
DescriptionThis test case is designed to test whether sever can handle OplockBreak correctly for lease level.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with BatchOpLock
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request on the same file
Via NIC1
Server sends OPLOCK_BREAK_NOTIFICATION response
Client sends OPLOCK_BREAK_ACKNOWLEDGEMENT request
Server sends OPLOCK_BREAK_RESPONSE response
Via NIC2
Server sends CREATE response
Via NIC1
Tear down the client by sending CLOSE, TREE_DISCONNECT and LOG_OFF.
Via NIC2
Tear down the client by sending CLOSE, TREE-CONNECT and LOG_OFF.
Cleanup

FileLeasing

Scenario
DescriptionThis scenario is to test whether server can handle lease correctly.
Message SequenceBased on NIC1, create Client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With Lease context)
WRITE
Switch to NIC2 and create Client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
Switch to NIC1 and Client1:
LeaseBreakNotification
LeaseBreakAcknowlegement
Cluster Involved ScenarioNO
Test Case
Test IDBVT_Leasing_FileLeasingV1
DescriptionThis test case is designed to test whether server can handle LeaseV1 context correctly on a file.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with LeaseV1
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request on the same file
Via NIC1
Server sends LEASE_BREAK_NOTIFICATION response
Client sends Lease_BREAK_ACKNOWLEDGEMENT request, breaking Lease to RH
Server sends Lease_BREAK_RESPONSE response
Via NIC2
Server sends CREATE response
Client sends Write request
Via NIC1
Server sends LEASE_BREAK_NOTIFICATION response
Client sends Lease_BREAK_ACKNOWLEDGEMENT request, breaking Lease to None
Server sends Lease_BREAK_RESPONSE response
Via NIC2
Server sends WRITE response
Via NIC1
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Via NIC2
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_Leasing_FileLeasingV2
DescriptionThis test case is designed to test whether server can handle LeaseV2 context correctly on a file.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with LeaseV2
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request on the same file
Via NIC1
Server sends LEASE_BREAK_NOTIFICATION response
Client sends Lease_BREAK_ACKNOWLEDGEMENT request, breaking Lease to RH
Server sends Lease_BREAK_RESPONSE response
Via NIC2
Server sends CREATE response
Client sends Write request
Via NIC1
Server sends LEASE_BREAK_NOTIFICATION response
Client sends Lease_BREAK_ACKNOWLEDGEMENT request, breaking Lease to None
Server sends Lease_BREAK_RESPONSE response
Via NIC2
Server sends WRITE response
Via NIC1
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Via NIC2
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_Leasing_FileLeasingV1_SameLeaseKey
DescriptionThis test case is designed to test whether server can handle LeaseV1 context with the same lease key.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with LeaseV1
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request with LeaseV1 including the same lease key on the same file
Via NIC1
Client sends WRITE request
Server sends WRITE response
Via NIC2
Client sends WRITE request
Server sends WRITE response
Via NIC1
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Via NIC2
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDBVT_Leasing_FileLeasingV2_SameLeaseKey
DescriptionThis test case is designed to test whether server can handle LeaseV2 context with the same lease key.
Prerequisites
Test Execution StepsVia NIC1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with LeaseV2
Server sends CREATE response
Via NIC2
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request with LeaseV2 including the same lease key on the same file
Via NIC1
Client sends WRITE request
Server sends WRITE response
Via NIC2
Client sends WRITE request
Server sends WRITE response
Via NIC1
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Via NIC2
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

Replay

Test Case
Test IDBVT_Replay_WriteWithInvalidChannelSequence
DescriptionThis test case is designed to test whether server can handle the Replay request with invalid channel sequence correctly.
Prerequisites
Test Execution StepsVia NIC1
Start a client from main channel by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
Via NIC2
Start a client from alternative channel by sending NEGOTIATE request.
The alternative client sends SESSION_SETUP request binding by the previous session created by the main channel client.
Via NIC1
The main channel client sends WRITE request to write content to file
Via NIC1
The main channel client sends WRITE request to write content to file.
Tear down the main channel client by sending DISCONNECT request.
Via NIC2
Set the channel sequence of the alternative channel client to an invalid value.
The alternative client sends WRITE request to write content to the file created by the main channel client.
Tear down the alternative channel client by sending TREE_DISCONNECT and LOG_OFF requests.
Cleanup
Test IDBVT_Replay_ReplayCreate
DescriptionThis test case is designed to test whether server can handle Replay operation correctly.
Prerequisites
Test Execution StepsVia NIC1
Start a client from main channel, and send NEGOTIATE and SESSION_SETUP requests via NIC2
Start another client from alternative channel, and send NEGOTIATE and SESSION_SETUP requests.
Via NIC1
The main channel client sends TREE_CONNECT request.
The main channel client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 create context.
Tear down the main channel client by sending DISCONNECT request
Via NIC2
Tear the alternative channel client by sending TREE_DISCONNECT and LOG_OFF requests.
Cleanup
Replay IsReplayEligible
Test IDReplay_PersistentHandle_Write_ReplayEligibleCleared
DescriptionVerify that after a successful replay of SMB2 WRITE on a persistent handle over SMB 3.x, Open.IsReplayEligible is set to FALSE (MS-SMB2 section 3.3.5.13).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends WRITE request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of WRITE.
The client sends a subsequent WRITE request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_Read_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 READ on a persistent handle over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.12).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends READ request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of READ.
The client sends a subsequent READ request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_Flush_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 FLUSH on a persistent handle over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.11).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends FLUSH request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of FLUSH.
The client sends a subsequent FLUSH request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_IoCtl_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 IOCTL on a persistent handle over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.15).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends IOCTL request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of IOCTL.
The client sends a subsequent IOCTL request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_SetInfo_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 SET_INFO on a persistent handle over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.21).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends SET_INFO request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of SET_INFO.
The client sends a subsequent SET_INFO request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_Lock_ReplayEligibleCleared
DescriptionVerify that SMB2 LOCK on a persistent handle over SMB 3.x clears Open.IsReplayEligible and the lock sequence idempotency mechanism works correctly (MS-SMB2 section 3.3.5.14).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends LOCK request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of LOCK.
The client sends a subsequent LOCK request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully using the lock sequence idempotency mechanism.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_QueryDirectory_ReplayEligibleCleared
DescriptionVerify that SMB2 QUERY_DIRECTORY on a persistent handle over SMB 3.x clears Open.IsReplayEligible and subsequent queries work correctly (MS-SMB2 section 3.3.5.18).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set to open a directory.
The client sends QUERY_DIRECTORY request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of QUERY_DIRECTORY.
The client sends a subsequent QUERY_DIRECTORY request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_QueryInfo_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 QUERY_INFO on a persistent handle over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.20).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends QUERY_INFO request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of QUERY_INFO.
The client sends a subsequent QUERY_INFO request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_PersistentHandle_ChangeNotify_ReplayEligibleCleared
DescriptionVerify that SMB2 CHANGE_NOTIFY on a persistent handle over SMB 3.x clears Open.IsReplayEligible and subsequent watches work correctly (MS-SMB2 section 3.3.5.19).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set to open a directory.
The client sends CHANGE_NOTIFY request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of CHANGE_NOTIFY.
The client sends a subsequent CHANGE_NOTIFY request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_Write_ReplayEligibleCleared
DescriptionVerify that after a successful replay of SMB2 WRITE on a non-persistent DurableHandleV2 over SMB 3.x, Open.IsReplayEligible is set to FALSE (MS-SMB2 section 3.3.5.13).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends WRITE request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of WRITE.
The client sends a subsequent WRITE request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_Read_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 READ on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.12).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends READ request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of READ.
The client sends a subsequent READ request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_Flush_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 FLUSH on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.11).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends FLUSH request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of FLUSH.
The client sends a subsequent FLUSH request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_IoCtl_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 IOCTL on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.15).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends IOCTL request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of IOCTL.
The client sends a subsequent IOCTL request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_SetInfo_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 SET_INFO on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.21).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends SET_INFO request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of SET_INFO.
The client sends a subsequent SET_INFO request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_Lock_ReplayEligibleCleared
DescriptionVerify that SMB2 LOCK on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible and the lock sequence idempotency mechanism works correctly (MS-SMB2 section 3.3.5.14).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends LOCK request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of LOCK.
The client sends a subsequent LOCK request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully using the lock sequence idempotency mechanism.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_QueryDirectory_ReplayEligibleCleared
DescriptionVerify that SMB2 QUERY_DIRECTORY on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible and subsequent queries work correctly (MS-SMB2 section 3.3.5.18).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set to open a directory.
The client sends QUERY_DIRECTORY request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of QUERY_DIRECTORY.
The client sends a subsequent QUERY_DIRECTORY request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_QueryInfo_ReplayEligibleCleared
DescriptionVerify that replay of SMB2 QUERY_INFO on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible (MS-SMB2 section 3.3.5.20).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set.
The client sends QUERY_INFO request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of QUERY_INFO.
The client sends a subsequent QUERY_INFO request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup
Test IDReplay_NonPersistentHandle_ChangeNotify_ReplayEligibleCleared
DescriptionVerify that SMB2 CHANGE_NOTIFY on a non-persistent DurableHandleV2 over SMB 3.x clears Open.IsReplayEligible and subsequent watches work correctly (MS-SMB2 section 3.3.5.19).
Prerequisites
Test Execution StepsStart a client by sending the following requests: 1. NEGOTIATE (SMB 3.x dialect); 2. SESSION_SETUP; 3. TREE_CONNECT to a non-CA share.
The client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (non-persistent) create context and SMB2_FLAGS_REPLAY_OPERATION flag set to open a directory.
The client sends CHANGE_NOTIFY request with SMB2_FLAGS_REPLAY_OPERATION flag set.
Verify that Open.IsReplayEligible is set to FALSE after the replay of CHANGE_NOTIFY.
The client sends a subsequent CHANGE_NOTIFY request without SMB2_FLAGS_REPLAY_OPERATION flag.
Verify the server processes the subsequent request successfully.
Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF.
Cleanup

ResilientHandle

Test Case
Test IDBVT_ResilientHandle_Reconnect
DescriptionTest whether server can request a durable open when receiving FSCTL_LMR_REQUEST_RESILLIENNCY successfully.
Prerequisites
Test Execution StepsStart the first client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT
The first client sends an IOCTL FSCTL_LMR_REQUEST_RESILLIENCY request.
Tear down the first client by sending DISCONNECT request.
Start a second client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT
The second client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_RECONNECT create context to open the same file created by the first client.
Tear down the second client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cleanup
Test IDBVT_ResilientHandle_Reconnect_Lease
DescriptionTest whether server can request a durable open when receiving FSCTL_LMR_REQUEST_RESILLIENNCY successfully for lease level.
Prerequisites
Test Execution StepsStart the first client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT
The first client sends an IOCTL FSCTL_LMR_REQUEST_RESILLIENCY request.
Tear down the first client by sending DISCONNECT request.
Start a second client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT
The second client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_RECONNECT create context to open the same file created by the first client.
Tear down the second client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cleanup
Test IDBVT_ResilientHandle_LockSequence
DescriptionThis test case is designed to test whether server can handle Lock request with specified LockSequence.
Prerequisites
Test Execution StepsStart the first client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE. The first client sends an IOCTL FSCTL_LMR_REQUEST_RESILLIENCY request
The first client sends WRITE request.
The first client sends Flush request.
The first client sends LOCK request with LockSequence set to (BucketNumber<< 4) + BucketSequence"
Start the second client to reconnect to the file created by the first client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4.CREATE (with SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context).
The second client sends LOCK request with the same LockSequence with the first client.
Tear down the second client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cleanup
Test IDBVT_ResilientHandle_LockSequence_Lease
DescriptionThis test case is designed to test whether server can handle Lock request with specified LockSequence for lease level.
Prerequisites
Test Execution StepsStart the first client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE. The first client sends an IOCTL FSCTL_LMR_REQUEST_RESILLIENCY request
The first client sends WRITE request.
The first client sends Flush request.
The first client sends LOCK request with LockSequence set to (BucketNumber<< 4) + BucketSequence"
Start the second client to reconnect to the file created by the first client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4.CREATE (with SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context).
The second client sends LOCK request with the same LockSequence with the first client.
Tear down the second client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cleanup

Signing

Test Case
Test IDBVT_Signing
DescriptionThis test case is designed to test whether server can handle NEGOTIATE and SESSION_SETUP requests with NEGOTIATE_SIGNING_REQUIRED set.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request with NEGOTIATE_SIGNING_REQUIRED flag set
Server sends NEGOTIATE response
Client sends SESSION_SETUP request NEGOTIATE_SIGNING_REQUIRED flag set
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Cleanup
----------------------------------------------------------------------------------------------------------------------------------------
Test IDSigning_VerifySignatureWhenEncrypted
DescriptionThis test case is designed to test whether server set the Signature field to zero in Encrypted message.
Prerequisites
Test Execution Steps1. Client sends NEGOTIATE request with SMB2_GLOBAL_CAP_ENCRYPTION
2. Server sends NEGOTIATE response with SMB2_GLOBAL_CAP_ENCRYPTION
3. Client sends SESSION_SETUP request
4. Server sends SESSION_SETUP response
5. According to the status code of last step, client may send more SESSION_SETUP request as needed
6. Client sends TREE_CONNECT request to connect an encrypted share
7. Server sends TREE_CONNECT response with SMB2_SHAREFLAG_ENCRYPT_DATA
8. Client sends encrypted CREATE request
9. Server sends encrypted CREATE response
10. Client sends encrypted CLOSE request
11. Server sends encrypted CLOSE response
12. Client sends encrypted TREE_DISCONNECT request
13. Server sends encrypted TREE_DISCONNECT response
14. Client sends LOGOFF request
15. Server sends LOGOFF response
Cleanup

|--------------------------|--------------------------------------------------------------------------------------------------------------| | Test ID | Signing_VerifyAesGmacSigning | | Description | This test case is designed to test whether outgoing and incoming messages are correctly signed and verified using aes-gmac signing algorithm. | | Prerequisites | | | Test Execution Steps | 1. Client sends NEGOTIATE request with SMB2_PREAUTH_INTEGRITY_CAPABILITIES and SMB2_SIGNING_CAPABILITIES | | | 2. Server sends NEGOTIATE response with SMB2_PREAUTH_INTEGRITY_CAPABILITIES and SMB2_SIGNING_CAPABILITIES | | | 3. Client sends SESSION_SETUP request | | | 4. Server sends SESSION_SETUP response | | | 5. According to response header from above step, server responds with a signed flag | | | 6. Client sends TREE_CONNECT request to connect to a share | | | 7. Server sends TREE_CONNECT response with a signing flag | | | 12. Client sends TREE_DISCONNECT request | | | 13. Server sends TREE_DISCONNECT response | | | 14. Client sends LOGOFF request | | | 15. Server sends LOGOFF response | | Cleanup ||

TreeMgmt

Test Case
Test IDBVT_TreeMgmt_TreeConnectAndDisconnect
DescriptionThis test case is designed to test whether server can handle TREE_CONNECT and TREE_DISCONNECT requests correctly.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request with NEGOTIATE_SIGNING_REQUIRED flag set
Server sends NEGOTIATE response
Client sends SESSION_SETUP request NEGOTIATE_SIGNING_REQUIRED flag set
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Cleanup
Test IDBVT_TreeMgmt_SMB311_Disconnect_NoSignedNoEncryptedTreeConnect
DescriptionThis test case is designed to test whether server can disconnect the connection when Connection.Dialect is 3.1.1 and the TreeConnect request is not signed or not encrypted.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends NEGOTIATE request without NEGOTIATE_SIGNING_REQUIRED and GLOBAL_CAP_ENCRYPTION set and gets response.
Client sends SESSION_SETUP request without NEGOTIATE_SIGNING_REQUIRED flag set and gets response.
Client sends TREE_CONNECT request which is not signed or not encrypted and expects server disconnects the connection.
Cleanup
Test IDTreeMgmt_SMB311_TREE_CONNECT_EXTENSION_PRESENT
DescriptionOnce a client has successfully connected to a infrastructure share it must set the SMB2_SHAREFLAG_EXTENSION_PRESENT flag and use SMB2 TREE_CONNECT Request Extension for tree connect requests.
This test case is designed to test server can handle a TreeConnect request with flag SMB2_SHAREFLAG_EXTENSION_PRESENT successfully.
PrerequisitesThe server implements dialect 3.11 and the server supports infrastructure share (for windows)
Test Execution StepsStart a client by sending the following requests: NEGOTIATE (dialect 3.11); SESSION_SETUP (with domain credential).
Client sends TREE_CONNECT request with flag SMB2_SHAREFLAG_EXTENSION_PRESENT and SMB2_REMOTED_IDENTITY_TREE_CONNECT context (with another domain account passed in the context) and expects STATUS_SUCCESS.
Client sends CREATE request and expects STATUS_SUCCESS.
Tear down the client.
Cleanup
Test IDTreeMgmt_SMB311_COMPRESS_DATA
DescriptionThis test case is designed to test server can handle a TreeConnect request with flag SMB2_SHAREFLAG_COMPRESS_DATA successfully. It is required that the server has a share with SMB compression enabled
PrerequisitesThe server implements dialect 3.11 and the share has SMB Compression enabled
Test Execution StepsStart a client by sending the following requests: NEGOTIATE (dialect 3.11); SESSION_SETUP (with domain credential).
Client sends TREE_CONNECT request and expects server response with share flag SHAREFLAG_COMPRESS_DATA enabled.
Client sends CREATE request and expects share flag SHAREFLAG_COMPRESS_DATA enabled.
Tear down the client.
Cleanup

SessionMgmt

Test Case
Test IDBVT_SessionMgmt_NewSession
DescriptionThis test case is designed to test whether server can handle a new session.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request with sessionid set zero
Server sends SESSION_SETUP response
Cleanup
Test IDBVT_SessionMgmt_ReconnectSessionSetup
DescriptionThis test case is designed to test whether server can handle authentication after disconnection
Prerequisites
Test Execution StepsClient1 sends NEGOTIATE request
Server sends NEGOTIATE response
Client1 sends SESSION_SETUP request with sessionid set zero
Server sends SESSION_SETUP response
Client1 disconnect.
Client2 sends NEGOTIATE request
Server sends NEGOTIATE response
Client2 sends SESSION_SETUP request with SESSION_ID set to the value in the previous SESSION_SETUP response.
Client2 disconnect.
Cleanup
Test IDBVT_SessionMgmt_Reauthentication
DescriptionThis test case is designed to test whether server can handle reauthentication successfully.
Test Execution StepsClient sends NEGOTIATE request.
Client sends SESSION_SETUP request with SESSION_ID set to ZERO.
Client sends SESSION-SETUP request with SESSION_ID set to the value in the previous SESSION_SETUP response.
Check server response.
Cleanup

CreateClose

Test Case
Test IDBVT_CreateClose_CreateAndCloseFile
DescriptionThis case is designed to test whether server can handle Create and Delete operations on file correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_NON_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_OPEN)
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDBVT_CreateClose_CreateAndCloseDirectory
DescriptionThis case is designed to test whether server can handle Create and Delete operations on directory correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_OPEN)
CLOSE
TREE_DISCONNECT
LOGOFF

Compound

Test Case
Test IDBVT_Compound_RelatedRequests
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
COMPOUND related request (CREATE, WRITE, and CLOSE to a same file)
Verify COMPOUND response
TREEDISCONNECT
LOGOFF
Test IDBVT_Compound_UnrelatedRequests
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
COMPOUND unrelated request (two CREATE requests to two different files)
Verify responses to the COMPOUND request
TREEDISCONNECT
LOGOFF

ValidateNegotiateInfo

Scenario
DescriptionRequest validation of a previous SMB2 NEGOTIATE
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL: FSCTL_VALIDATE_NEGOTIATE_INFO
Expect success or disconnection
TREE_DISCONNECT (optional)
LOGOFF (optional)
Cluster Involved ScenarioNO
Test Case
Test IDBVT_ValidateNegotiateInfo
DescriptionTest whether server can handle IOCTL FSCTL_VALIDATE_NEGOTIATE_INFO.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with valid FSCTL_VALIDATE_NEGOTIATE_INFO)
Expected success in IOCTL response
TREE_DISCONNECT
LOGOFF
Cleanup

EnumerateSnapShots

Scenario
DescriptionRequest enumerate snapshots (previous versions) of a file
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL: FSCTL_SRV_ENUMERATE_SNAPSHOTS
Expect success or disconnection
TREE_DISCONNECT (optional)
LOGOFF (optional)
Cluster Involved ScenarioNO
Test Case
Test IDBVT_EnumerateSnapShots
DescriptionTest whether server can handle IOCTL FSCTL_SRV_ENUMERATE_SNAPSHOTS.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with valid FSCTL_SRV_ENUMERATE_SNAPSHOTS)
Expected success in IOCTL response and verify the SRV_SNAPSHOT_ARRAY in the response
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeFileName

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_FILE_NAME is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_FILE_NAME and flag WATCH_TREE.
3. Client1 starts to create a file under directory by sending CREATE request.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 renames the file by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeFileName
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_FILE_NAME is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_FILE_NAME for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileRenameInformation)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeDirName

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_DIR_NAME is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_DIR_NAME and flag WATCH_TREE.
3. Client1 starts to create a directory under directory by sending CREATE request.
4. Start a client2 to open a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 renames the directory by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeDirName
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_DIR_NAME is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_DIR_NAME for CompletionFilter and WATCH_TREE for flag)
CREATE (Directory)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open Directory)
SET_INFO (FileRenameInformation)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeAttributes

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_ATTRIBUTES is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_ATTRIBUTES and flag WATCH_TREE.
3. Client1 starts to create a file under directory by sending CREATE request.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 sets file attribute for the file to FILE_ATTRIBUTE_HIDDEN by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeAttributes
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_ATTRIBUTES is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_ATTRIBUTES for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileBasicInformation with FileAttribute FILE_ATTRIBUTE_HIDDEN)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeSize

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_SIZE is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to create a file under directory by sending CREATE request and write data to it by sending WRITE request.
3. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_SIZE and flag WATCH_TREE.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 sets new EoF position for the file by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeSize
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_SIZE is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CREATE (File)
WRITE (File)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_SIZE for CompletionFilter and WATCH_TREE for flag)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileEndOfFileInformation by a new EoF position)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeLastAccess

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and flag WATCH_TREE.
3. Client1 starts to create a file under directory by sending CREATE request.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 sets LastAccessTime for the file by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeLastAccess
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileBasicInformation with new LastAccessTime)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeLastWrite

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_LAST_WRITE is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_WRITE and flag WATCH_TREE.
3. Client1 starts to create a file under directory by sending CREATE request.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 sets LastWriteTime for the file by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeLastWrite
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_LAST_WRITE is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_WRITE for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileBasicInformation with new LastWriteTime)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeCreation

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_CREATION is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_CREATION and flag WATCH_TREE.
3. Client1 starts to create a file under directory by sending CREATE request.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 sets CreationTime for the file by sending SET_INFO request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeCreation
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_CREATION is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_CREATION for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
SET_INFO (FileBasicInformation with new CreationTime)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeEa

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_EA is handled correctly.
Message Sequence1. Start a client to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_EA and flag WATCH_TREE.
3. Client starts to create a file under directory by sending CREATE request.
4. Client sets extended attribute information for the file by sending SET_INFO request.
5. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeEa
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_EA is handled correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_EA for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
SET_INFO (FileFullEAInfo)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeSecurity

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_SECURITY is handled correctly.
Message Sequence1. Start a client to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_SECURITY and flag WATCH_TREE.
3. Client starts to create a file under directory by sending CREATE request.
4. Client sets SACL_SECURITY_INFORMATION for the file by sending SET_INFO request.
5. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeSecurity
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_SECURITY is handled correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_SECURITY for CompletionFilter and WATCH_TREE for flag)
CREATE (File)
SET_INFO (SACL_SECURITY_INFORMATION)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeStreamName

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_STREAM_NAME is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to create a file under directory by sending CREATE request.
3. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_NAME and flag WATCH_TREE.
4. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
5. Client2 starts to create a data stream of a file under directory by sending CREATE request and write data to it by sending WRITE request.
6. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
7. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeStreamName
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_NAME is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CREATE (File)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_STREAM_NAME for CompletionFilter and WATCH_TREE for flag)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
CREATE (Data Stream)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeStreamSize

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_STREAM_SIZE is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to create a file under directory by sending CREATE request.
3. Client1 starts to create a data stream of a file under directory by sending CREATE request and write data to it by sending WRITE request.
4. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_SIZE and flag WATCH_TREE.
5. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
6. Client2 starts to open a data stream of a file under directory by sending CREATE request and write data to it by sending WRITE request.
7. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
8. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeStreamName
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_SIZE is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CREATE (File)
CREATE (Data Stream)
WRITE (Data Stream)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_STREAM_SIZE for CompletionFilter and WATCH_TREE for flag)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
CREATE (Open Data Stream)
WRITE (Data Stream)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ChangeStreamWrite

Scenario
DescriptionVerify ChangeNotify for CompletionFilter FILE_NOTIFY_CHANGE_STREAM_WRITE is handled correctly.
Message Sequence1. Start a client1 to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client1 starts to create a file under directory by sending CREATE request.
3. Client1 starts to create a data stream of a file under directory by sending CREATE request and write data to it by sending WRITE request.
4. Client1 starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_WRITE and flag WATCH_TREE.
5. Start a client2 to open a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
6. Client2 starts to open a data stream of a file under directory by sending CREATE request and write data to it by sending WRITE request.
7. Tear down the client2 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
8. Tear down the client1 by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ChangeStreamWrite
DescriptionTest whether ChangeNotify with CompletionFilter FILE_NOTIFY_CHANGE_STREAM_WRITE is handled correctly.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CREATE (File)
CREATE (Data Stream)
WRITE (Data Stream)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_STREAM_WRITE for CompletionFilter and WATCH_TREE for flag)
Create Client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Open File)
CREATE (Open Data Stream)
WRITE (Data Stream)
Expect STATUS_SUCCESS in CHANGE_NOTIFY response
Close Client2
CLOSE
TREE_DISCONNECT
LOGOFF
Close Client1
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_ServerReceiveSmb2Close

Scenario
DescriptionVerify server must send an ChangeNotify response with STATUS_NOTIFY_CLEANUP status code for all pending ChangeNotify requests associated with the FileId that is closed.
Message Sequence1. Start a client to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS.
3. Client starts to close a directory by sending a CLOSE request.
4. Tear down the client1 by sending the following requests: 1. TREE_DISCONNECT; 2. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_ServerReceiveSmb2Close
DescriptionTest whether server sends an ChangeNotify response with STATUS_NOTIFY_CLEANUP status code for all pending ChangeNotify requests associated with the FileId that is closed.
Prerequisites
Test Execution StepsCreate Client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter)
CLOSE
Expect STATUS_NOTIFY_CLEANUP in CHANGE_NOTIFY response
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_NonDirectoryFile

Scenario
DescriptionVerify server must send an ChangeNotify response with STATUS_INVALID_PARAMETER status code if CHANGE_NOTIFY request is for a non-directory file.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a non-directory file with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_NonDirectoryFile
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code if CHANGE_NOTIFY request is for a non-directory file.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb2002

Scenario
DescriptionVerify the MaxTransactSize in ChangeNotify request in SMB 2.0.2.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and maxOutputBufferLength MaxTransactSize + 1.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb2002
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code on invalid maxOutputBufferLength in ChangeNotify request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and MaxTransactSize + 1 for maxOutputBufferLength)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb21

Scenario
DescriptionVerify the MaxTransactSize in ChangeNotify request in SMB 2.1.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and maxOutputBufferLength MaxTransactSize + 1.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb21
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code on invalid maxOutputBufferLength in ChangeNotify request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and MaxTransactSize + 1 for maxOutputBufferLength)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb30

Scenario
DescriptionVerify the MaxTransactSize in ChangeNotify request in SMB 3.0.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and maxOutputBufferLength MaxTransactSize + 1.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb30
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code on invalid maxOutputBufferLength in ChangeNotify request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and MaxTransactSize + 1 for maxOutputBufferLength)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb302

Scenario
DescriptionVerify the MaxTransactSize in ChangeNotify request in SMB 3.0.2.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and maxOutputBufferLength MaxTransactSize + 1.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb302
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code on invalid maxOutputBufferLength in ChangeNotify request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and MaxTransactSize + 1 for maxOutputBufferLength)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb311

Scenario
DescriptionVerify the MaxTransactSize in ChangeNotify request in SMB 3.1.1.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to register CHANGE_NOTIFY on a directory with CompletionFilter FILE_NOTIFY_CHANGE_LAST_ACCESS and maxOutputBufferLength MaxTransactSize + 1.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_ChangeNotify_MaxTransactSizeCheck_Smb311
DescriptionTest whether server sends an ChangeNotify response with STATUS_INVALID_PARAMETER status code on invalid maxOutputBufferLength in ChangeNotify request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
CHANGE_NOTIFY (FILE_NOTIFY_CHANGE_LAST_ACCESS for CompletionFilter and MaxTransactSize + 1 for maxOutputBufferLength)
Expect STATUS_INVALID_PARAMETER in CHANGE_NOTIFY response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

HVRS\OffloadReadWrite

Scenario
DescriptionVerify the FSCTL_OFFLOAD_READ and FSCTL_OFFLOAD_WRITE
Message Sequence1. Start a client to create and write to a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE; 5. WRITE; 6. FLUSH.
2. Client sends IOCTL request with FSCTL_OFFLOAD_READ.
3. Client create another file as the destination of offload copy.
4. Client sends IOCTL request with FSCTL_OFFLOAD_WRITE.
5. Read the content in destination of offload copy.
6. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_OffloadReadWrite
DescriptionTest whether the server supports the FSCTL_OFFLOAD_READ and FSCTL_OFFLOAD_WRITE.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
WRITE
FLUSH
IOCtl with FSCTL_OFFLOAD_READ
CREATE (File)
IOCtl with FSCTL_OFFLOAD_WRITE
READ
TREE_DISCONNECT
LOGOFF
Cleanup

HVRS\SetZeroData

Scenario
DescriptionVerify the FSCTL_SET_ZERO_DATA
Message Sequence1. Start a client to create and write to a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE; 5. WRITE; 6. FLUSH.
2. Client sends IOCTL request with FSCTL_SET_ZERO_DATA.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SetZeroData
DescriptionTest whether the server supports the FSCTL_SET_ZERO_DATA.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
WRITE
FLUSH
IOCtl with FSCTL_SET_ZERO_DATA
Cleanup

HVRS\FileLevelTrim

Scenario
DescriptionVerify the FFSCTL_FILE_LEVEL_TRIM
Message Sequence1. Start a client to create and write to a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE; 5. WRITE.
2. Client sends FSCTL_FILE_LEVEL_TRIM.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_FileLevelTrim
DescriptionTest whether the server supports the FSCTL_FILE_LEVEL_TRIM.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
WRITE
CLOSE
CREATE (File)
IOCtl with FSCTL_FILE_LEVEL_TRIM (with key field zero)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDFileLevelTrim_Negative_NonZeroKeyInRequest
DescriptionTest the server response when non-zero value is set to the Key field of FSCTL_FILE_LEVEL_TRIM request.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
WRITE
CLOSE
CREATE (File)
IOCtl with FSCTL_FILE_LEVEL_TRIM (with key field a non-zero value)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

HVRS\DuplicateExtentsToFile

Scenario
DescriptionVerify the FSCTL_DUPLICATE_EXTENTS_TO_FILE
Message Sequence1. Start a client to create and write to a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE; 5. WRITE; 6. FLUSH.
2. Client sends FSCTL_DUPLICATE_EXTENTS_TO_FILE.
Cluster Involved ScenarioNo
Test Case
Test IDBVT_DuplicateExtentsToFile
DescriptionTest whether the server supports the FSCTL_DUPLICATE_EXTENTS_TO_FILE.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
WRITE
FLUSH
IOCtl with FSCTL_DUPLICATE_EXTENTS_TO_FILE
Cleanup

HVRS\SMBDialect

Scenario
DescriptionTest whether the server supports the SMB 3.0 or higher dialect
Message Sequence1. NEGOTIATE.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMBDialect
DescriptionTest whether the server supports the SMB 3.0 or higher dialect.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
Cleanup

HVRS\PersistentHandles

Scenario
DescriptionTest whether the server supports persistent handles
Message Sequence1. NEGOTIATE.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_PersistentHandles
DescriptionTest whether the server supports persistent handles.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
Cleanup

HVRS\Resiliency

Scenario
DescriptionTest whether the server supports the FSCTL_LMR_REQUEST_RESILIENCY
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends FSCTL_LMR_REQUEST_RESILIENCY.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_Resiliency
DescriptionTest whether the server supports the FSCTL_LMR_REQUEST_RESILIENCY.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
IOCtl with FSCTL_LMR_REQUEST_RESILIENCY
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

QueryDir_Reopen_OnDir

Scenario
DescriptionVerify QUERY_DIRECTORY with flag SMB2_REOPEN to a directory is handled correctly
Message Sequence1. Start a client to create a directory by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends QUERY_DIRECTORY request with flag SMB2_REOPEN to query directory information on a directory.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_QueryDir_Reopen_OnDir
DescriptionVerify QUERY_DIRECTORY with flag SMB2_REOPEN to a directory is handled correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory)
QUERY_DIRECTORY(flags: SMB2_REOPEN, target: directory)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

QueryDir_Reopen_OnFile

Scenario
DescriptionVerify QUERY_DIRECTORY with flag SMB2_REOPEN to a file is handled correctly
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends QUERY_DIRECTORY request with flag SMB2_REOPEN to query directory information on a file.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_QueryDir_Reopen_OnFile
DescriptionVerify QUERY_DIRECTORY with flag SMB2_REOPEN to a file is handled correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
QUERY_DIRECTORY(flags: SMB2_REOPEN, target: File)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

Query_Quota_Info

Scenario
DescriptionVerify the behavior of querying quota information with FILE_GET_QUOTA_INFO in SidBuffer.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client queries quota information by sending QUERY_INFO request.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_Query_Quota_Info
DescriptionVerify the behavior of querying quota information with FILE_GET_QUOTA_INFO in SidBuffer.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
QUERY_INFO(SMB2_0_INFO_QUOTA)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_Query_FileAllInformation

Scenario
DescriptionVerify whether server can handle QUERY requests to a file for FileAllInformation correctly.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client queries FileAllInformation by sending QUERY_INFO request.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_Query_FileAllInformation
DescriptionVerify whether server can handle QUERY requests to a file for FileAllInformation correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
QUERY_INFO(SMB2_0_INFO_FILE)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_Query_FileNormalizedNameInformation_DataFile

Scenario
DescriptionTest whether server can handle QUERY requests to a data file for FileNormalizedNameInformation correctly.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client queries FileNormalizedNameInformation by sending QUERY_INFO request.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_Query_FileNormalizedNameInformation_DataFile
DescriptionVerify whether server can handle QUERY requests to a file for FileNormalizedNameInformation correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
QUERY_INFO(SMB2_0_INFO_FILE)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2Basic_Query_FileNormalizedNameInformation_DirectoryFile

Scenario
DescriptionTest whether server can handle QUERY requests to a directory file for FileNormalizedNameInformation correctly.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client queries FileNormalizedNameInformation by sending QUERY_INFO request.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_Query_FileNormalizedNameInformation_DirectoryFile
DescriptionVerify whether server can handle QUERY requests to a file for FileNormalizedNameInformation correctly.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
QUERY_INFO(SMB2_0_INFO_FILE)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

Compression

Scenario
DescriptionVerify whether server can decompress WRITE request and compress read response correctly.
Message Sequence1. Start a client to create a file by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending compressed WRITE request.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed correctly and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Compression_LZNT1
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZNT1.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZNT1; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZNT1.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZNT1 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_LZ77
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZ77.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZ77; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZ77.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZ77 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_LZ77Huffman
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZ77 Huffman.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZ77 Huffman; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZ77 Huffman.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZ77 Huffman and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_Chained_PatternV1
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress READ response correctly using chained compression and PatternV1.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to PatternV1 and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write compressible data to server by sending WRITE request chained and compressed with PatternV1.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ response is chained and compressed with PatternV1 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_LZNT1_Encrypted
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZNT1 when encryption is enabled.
PrerequisitesThe server implements dialect 3.11, encryption and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with global encryption enabled and compression algorithms set to LZNT1; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZNT1.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZNT1 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_LZ77_Encrypted
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZ77 when encryption is enabled.
PrerequisitesThe server implements dialect 3.11, encryption and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with global encryption enabled and compression algorithms set to LZ77; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZ77.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZ77 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_LZ77Huffman_Encrypted
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress read response correctly using LZ77 Huffman when encryption is enabled.
PrerequisitesThe server implements dialect 3.11, encryption and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with global encryption enabled and compression algorithms set to LZ77 Huffman; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZ77 Huffman.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with LZ77 Huffman and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_Chained_PatternV1_Encrypted
DescriptionThis test case is designed to test whether server can decompress WRITE request and compress READ response correctly using chained compression and PatternV1 when encryption is enabled.
PrerequisitesThe server implements dialect 3.11, encryption and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with global encryption enabled, compression algorithms set to PatternV1 and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write compressible data to server by sending WRITE request chained and compressed with PatternV1.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ response is chained and compressed with PatternV1 and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_Unchained
DescriptionThis test case is designed to test whether server can compress WRITE request and READ response using unchained compression.
PrerequisitesThe server implements dialect 3.11 and unchained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with unchained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write unchained compressible data to server by sending WRITE request compressed with supported server compression.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ response is unchained and compressed with supported SUT compression and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDBVT_SMB2Compression_Unchained_LargeFile
DescriptionThis test case is designed to test whether server can compress WRITE request and READ response using unchained compression for large file.
PrerequisitesThe server implements dialect 3.11 and unchained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with unchained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte unchained compressible data to server by sending WRITE request compressed with supported server compression multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies the READ response is unchained and compressed with supported SUT compression and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup

NetworkInterfaceInfo

Scenario
DescriptionVerify whether server can return available network interfaces.
Message Sequence1. Start a client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT
2. Client sends IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO.
4. Verifies the IOCTL response has appropriate NETWORK_INTERFACE_INFO structure
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_NetworkInterfaceInfo_QuerySuccessful
DescriptionTest that quering network interface returns NETWORK_INTERFACE_INFO structure.
PrerequisitesThe server implements dialect 3.11 and FSCTL_QUERY_NETWORK_INTERFACE_INFO.
Test Execution Steps1. Start a client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT;
2. Client sends IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO.
3. Verifies the IOCTL response contains NETWORK_INTERFACE_INFO_Response.
4. Tear down the client by sending the following requests: TREE_DISCONNECT; LOG_OFF.
Cleanup

SMB2Basic_QuicTransport_OpenNamedPipe

Scenario
DescriptionVerify open named pipe over QUIC is handled correctly.
Message Sequence1. Start a client to create a named pipe by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client starts to create a named pipe by sending CREATE request.
3. Tear down the client by sending the following requests: 1. CLOSE; 2. TREE_DISCONNECT; 3. LOG_OFF
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SMB2Basic_QuicTransport_OpenNamedPipe
DescriptionTest if the connection is over QUIC, server sends correct response when a named pipe is opened.
PrerequisitesThe server implements dialect 3.11 and underlying transport is QUIC
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (NamedPipe)
if AllowNamedPipeAccessOverQUIC is TRUE expect STATUS_SUCCESS else expect STATUS_ACCESS_DENIED in CREATE response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

SMB2 Feature Test

Test scenarios are prioritized and designed based on customer interests and SMB3 new features.

AppInstanceId

Allow an application to failover on a new client and open a file that was previously opened using an application instance identifier.

Model
Coverage

AppInstanceId Model covers all statements of the following sections:

  • 3.3.5.9.13 Handling the SMB2_CREATE_APP_INSTANCE_ID Create Context

  • 2.2.13.2.13 SMB2_CREATE_APP_INSTANCE_ID

Assumptions/Restrictions

N/A

Scenario Design
Scenario NameAppInstanceId
DescriptionBasic scenario:
Create an open first with/without AppInstanceId, then send create request again to see if the open can be closed or not.
MachineReadConfig;
PrepareOpen;
OpenRequest;
OpenResponse;
Traditional Case

Scenario see Scenario

Test IDNegative_AppInstanceId_DifferentAppInstanceIdAfterFailover
DescriptionOpen a file with a different AppInstanceId after failover so that server treat the open differently
Prerequisites
Test Execution StepsBased on NIC1, create Client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With AppInstanaceID)
WRITE
Disable NIC1
Switch to NIC2 and create Client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With a different AppInstanceID)
Expect error in CREATE response
TREE_DISCONNECT
LOGOFF
CleanupEnable NIC1
Test IDAppInstanceId_Negative_DifferentAppInstanceIdInReopen
DescriptionThis test case is designed to check that if a client fails over to a new client, whether the previously opened file can be reopened with different AppInstanceId.
Prerequisites
Test Execution StepsClient1 sends the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT
Server responses successfully.
Client1 sends CREATE request with the contexts of SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 and SMB2_CREATE_APP_INSTANCE_ID.
Server responses successfully.
Client2 sends the following requests:
NEGOTIATE; SESSION_SETUP; TREE_CONNECT
Server responses successfully.
Client2 sends CREATE request to the same file with client1, and with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 and different AppInstanceId.
Client1 sends WRITE request to write content.
Server responses successfully.
Tear down client1.
Tear down client2.
CleanupEnable NIC1
Test IDAppInstanceId_Smb311
DescriptionThe case is designed to test if the server implements dialect 3.11, and when client fails over to a new client, the previous open can be closed by the new client with the same AppInstanceId. AppInstanceId should work without DH2Q create context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient1 sends NEGOTIATE request with dialect 3.11 and gets NEGOTIATE response also with dialect 3.11.
Client1 sends the following requests: SESSION_SETUP; TREE_CONNECT.
Server responses successfully.
Client1 sends CREATE request with the context SMB2_CREATE_APP_INSTANCE_ID, without DH2Q create context.
Server responses successfully.
Client2 sends the following requests:
NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
Server responses successfully.
Client2 sends CREATE request to the same file with client1, and same AppInstanceId, and without DH2Q create context. Client2 should create the open successfully.
The first client sends another WRITE request and gets failure because the open is closed.
Tear down client1.
Tear down client2.
Cleanup
Test IDAppInstanceId_Smb302
DescriptionThe case is designed to test if the server implements dialect 3.02, and when client fails over to a new client, check if the Open is closed.
PrerequisitesThe server implements dialect 3.02.
Test Execution StepsClient1 sends NEGOTIATE request with dialect 3.02 and gets NEGOTIATE response also with dialect 3.02.
Client1 sends the following requests: SESSION_SETUP; TREE_CONNECT.
Server responds successfully.
Client1 sends CREATE request with the context SMB2_CREATE_APP_INSTANCE_ID, without DH2Q create context.
Server responds successfully.
Client2 sends the following requests:
NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
Server responds successfully.
Client2 sends CREATE request to the same file with client1, and same AppInstanceId, and without DH2Q create context.
Client2 create fails with SHARING_VIOLATION for Windows Server 2012 and Windows Server 2012 R2, but opens successfully for all others.
Client sends another WRITE request.
Client1 gets SUCCESS for Windows Server 2012 and Windows Server 2012 R2, but fails with FILE_CLOSED for all others.
Tear down client1.
Tear down client2.
Cleanup

AppInstanceVersion

Scenario

See section Scenario.

Test Case
Test IDNegative_AppInstanceVersion_SMB311_NoVersion
DescriptionCheck when client fails over to a new client, the previous opened file can NOT be reopened with no AppInstanceVersion.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsStart the first client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT.
The first client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 0.
Start the second client by sending the following requests: NEGOTIATE; SESSIONSETUP; TREE_CONNECT.
The second client sends CREATE request without AppInstanceVersion and gets failure.
Client1 sends another WRITE request and succeeds since the open is not closed.
Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup
Test IDAppInstanceVersion_SMB311_SMB302
DescriptionCheck if server can fail the create request if the second Client sends a create request with dialect302 and AppInstanceID create context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsStart the first client by sending the following requests: NEGOTIATE with dialect 3.11; SESSION_SETUP; TREE_CONNECT.
The first client sends CREATE request with AppInstanceVersionHigh = 1, AppInstanceVersionLow = 0.
Start the second client by sending the following requests: NEGOTIATE with dialect 3.02; SESSIONSETUP; TREE_CONNECT.
The second client sends CREATE request with a valid AppInstanceId, but no AppInstanceVersion, and gets failure.
Client1 sends another WRITE request and succeeds since the open is not closed.
Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup
Test IDAppInstanceVersion_SMB302_SMB311
DescriptionCheck when the first client negotiates dialect 3.02, the second client negotiates dialect 3.11, the create request with SMB2_CREATE_APP_INSTANCE_VERSION create context sent by the second client should succeed.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsStart the first client by sending the following requests: NEGOTIATE with dialect 3.02; SESSION_SETUP; TREE_CONNECT.
The first client sends CREATE request with an AppInstanceId context.
Start the second client by sending the following requests: NEGOTIATE with dialect 3.11; SESSIONSETUP; TREE_CONNECT.
The second client sends CREATE request with a valid AppInstanceId and AppInstanceVersion and succeeds.
Client1 sends another WRITE request and gets failure since the open is closed.
Tear down the two clients by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF; DISCONNECT
Cleanup

CreateClose

Client uses create operation to request either creation or access to a file, and uses close to close a file that was opened previously with a successful create.

The feature has 34 model-based test cases and several traditional test cases.

Model
Coverage

CreateClose Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

  • 3.3.5.9 Receiving an SMB2 CREATE Request

  • 3.3.5.10 Receiving an SMB2 CLOSE Request

  • 2.2.13 SMB2 CREATE Request

  • 2.2.14 SMB2 CREATE Response

  • 2.2.15 SMB2 CLOSE Request

  • 2.2.16 SMB2 CLOSE Response

Assumptions/Restrictions
  • This model doesn’t test all the flag combination of fields FileAttributes/ShareAccess/CreateDisposition/CreateOptions of CREATE Request. It picks the ones mentioned in “section 3.3.5.9 Receiving an SMB2 CREATE Request”.

  • This model doesn’t test create contexts. The create contexts are tested in individual Feature Tests.

Scenario Design
Scenario NameCreateClose
DescriptionBasic scenario to test how the server handles CREATE Request and CLOSE Request.
MachineReadConfig;
SetupConnection; //Negotiate, Session Setup, Tree Connect
CreateRequest;
CreateResponse;
(
  CloseRequest;
  CloseResponse;
)*;
Traditional Case
Test IDCreateClose_SymbolicLinkInMiddle
DescriptionThis case is designed to test whether server can handle Create operation with symbolic link in middle of file path.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE, file name contains symbolic link in the middle.)
Expect server failed with STATUS_STOPPED_ON_SYMLINK.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_SymbolicLinkAtLast
DescriptionThis case is designed to test whether server can handle Create operation with symbolic link at last of file path.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE, file name contains symbolic link in the last of file path.)
Expect server failed with STATUS_STOPPED_ON_SYMLINK.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_InvalidSymbolicLink
DescriptionThis case is designed to test whether server can handle Create operation with other invalid symbolic link.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE, file name contains symbolic link in the middle.)
Expect server failed with STATUS_STOPPED_ON_SYMLINK.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_DeleteFile_DesiredAccessNotIncludeDeleteOrGenericAll
DescriptionThis case is designed to test whether server can handle delete file request when desired access does not include DELETE or GENERIC_ALL.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE, file name contains symbolic link in the middle.)
Expect server failed with specific error code according to server's implementation.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_CreateAndCloseFileWithDotDir
DescriptionThis case is designed to test whether server can handle Create and Delete operations on file with dot directory name correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_CREATE, file name contains dot directory name)
Expect server responds successfully.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_CreateAndCloseDirWithDotDir
DescriptionThis case is designed to test whether server can handle Create and Delete operations on directory with dot directory name correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_CREATE, file name contains dot directory name)
Expect server responds successfully.
CLOSE
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_CreateAndCloseFileWithDoubleDotDir
DescriptionThis case is designed to test whether server can handle Create operations on file with double dot directory name correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_CREATE, file name contains double dot directory name)
Expect server failed with STATUS_INVALID_PARAMETER according to server's implementation.
TREE_DISCONNECT
LOGOFF
Test IDCreateClose_CreateAndCloseDirWithDoubleDotDir
DescriptionThis case is designed to test whether server can handle Create operations on directory with double dot directory name correctly.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE; CreateDisposition: FILE_CREATE)
CLOSE
TREE_DISCONNECT
LOGOFF
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (CreateOption: FILE_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE; CreateDisposition: FILE_CREATE, file name contains double dot directory name)
Expect server failed with STATUS_INVALID_PARAMETER according to server's implementation.
TREE_DISCONNECT
LOGOFF
Test IDInvalidCreateRequestStructureSize
DescriptionTest the server response when it receives an invalid structure size of CREATE request.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE with invalid structure size.
Expect server sends error response STATUS_INVALID_PARAMETER.
CLOSE
TREE_DISCONNECT
LOGOFF

CreditMgmt

CreditMgmt model verify that server handles the request correctly when client sends READ (for response payload verification)/WRITE (for request payload verification) requests with different MessageId, CreditCharge, CreditRequest and payload length.

This feature contains 49 model-based test cases.

Model
Coverage

CreditMgmt model covers the statements in following sections with exceptions mentioned in Assumptions/Restrictions section

  • 3.3.1.1 Algorithm for Handling Available Message Sequence Numbers by the Server

  • 3.3.1.2 Algorithm for the Granting of Credits

  • 3.3.4.1.2 Granting Credits to the Client

  • 3.3.5.2.3 Verifying the Sequence Number

  • 3.3.5.2.5 Verifying the Credit Charge and the Payload Size

Assumptions/Restrictions
  • The model assumes the situation that the underlying connection supports multi-credit request (i.e. no NetBIOS transport used)

  • The model does not cover credit verification for async/compounded/cancel requests

Scenario Design
Scenario NameCreditMgmt
DescriptionThis scenario covers basic message sequence with various MessageId, CreditCharge, CreditRequest and payload length to test server behavior of credit verification.
MachineReadConfig;
SetupConnection; //Negotiate,SessionSetup,TreeConnect,Create
(
  CreditOperationRequest;
  CreditOperationResponse?;ExpectDisconnect?;
);

DirectoryLeasing

Basic
Scenario

See Scenario

Test Case
Test IDDirectoryLeasing_ReadCaching
DescriptionEnsure server could handle read directory leasing correctly
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
Server sends CREATE response
Write to the directory with another client
Server sends LEASE_BREAK notification
Client sends LEASE_BREAK acknowledgement
Server sends LEASE_BREAK response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDirectoryLeasing_ReadWriteCaching
DescriptionEnsure server could handle READ_WRITE directory leasing correctly
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
Server sends CREATE response
Read the directory content with another client
Server sends LEASE_BREAK notification
Client sends LEASE_BREAK acknowledgement
Server sends LEASE_BREAK response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDirectoryLeasing_ReadHandleCaching
DescriptionEnsure server could handle READ_HANDLE directory leasing correctly
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
Server sends CREATE response
Delete the directory with another client
Server sends LEASE_BREAK notification
Client sends LEASE_BREAK acknowledgement
Server sends LEASE_BREAK response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDNegative_DirectoryLeasing_SMB21
DescriptionNegative test case to test SMB3 directory leasing feature using SMB2.1 dialect.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request with dialect SMB2.002 and SMB2.1.
Server sends NEGOTIATE response with dialect SMB2.1
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
Server sends CREATE response
Write to the directory with another client
Server sends LEASE_BREAK notification
Client sends LEASE_BREAK acknowledgement
Server sends LEASE_BREAK response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDNegative_DirectoryLeasing_SMB2002
DescriptionNegative test case to test SMB3 directory leasing feature using SMB2.002 dialect.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request with only SMB2.002 dialect.
Server sends NEGOTIATE response with dialect SMB2.002
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for a directory with SMB2_CREATE_REQUEST_LEASE_V2, LeaseState setting to SMB2_LEASE_READ_CACHING
Server sends CREATE response
Write to the directory with another client
Server sends LEASE_BREAK notification
Client sends LEASE_BREAK acknowledgement
Server sends LEASE_BREAK response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDirectoryLeasing_InvalidClientGuidInLeaseBreakAck
DescriptionThe LEASE_BREAK_ACK for open which is already closed
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From SUT adapter to access same directory to trigger leasing break
From client1
Receive LEASE_BREAK
CLOSE
Send LEASE_BREAK_ACK
Expect error in response
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_InvalidLeaseStateInLeaseBreakAck
DescriptionThe info in LEASE_BREAK_ACK contains invalid LeaseState
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From SUT adapter to access same directory to trigger leasing break
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK (with invalid LeaseState)
Expect error in response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_Invalid LeaseKeyInLeaseBreakAck
DescriptionThe info in LEASE_BREAK_ACK contains invalid LeaseKey
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
From SUT adapter to access same directory to trigger leasing break
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK (with invalid LeaseKey)
Expect error in response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
DirectoryLeasing_BreakByAccurateOperation
RequestLeaseStateFromClient1BreakOperationByClient2
RChildRenamed
RChildDeleted
RChildModified
RHConflictOpen
RHParentRenamed
Scenario
DescriptionTrigger the lease break by specific operations
Message SequenceTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2)
From client2 to trigger lease break by specific operation
From client1
Receive LEASE_BREAK if expect one
Send LEASE_BREAK_ACK if there's LEASE_BREAK
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDDirectoryLeasing_BreakReadCachingByChildRenamed
DescriptionTest whether server can handle READ lease break notification triggered by renaming child item on a directory.
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
Create a file in the directory
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_READ_CACHING)
From client2 to trigger lease break by renaming the child item
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File in the directory with DELETE access mask)
SetInfo with FileRenameInformation to rename the file
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_BreakReadCachingByChildDeleted
DescriptionTest whether server can handle READ lease break notification triggered by deleting child item on a directory.
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
Create a file in the directory
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_READ_CACHING)
From client2 to trigger lease break by deleting the child item
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File in the directory, with DELETE access mask and FILE_DELETE_ON_CLOSE create option)
CLOSE to commit the delete
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_BreakReadCachingByChildAdded
DescriptionTest whether server can handle READ lease break notification triggered by adding child item on a directory.
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
Create a file in the directory
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_READ_CACHING)
From client2 to trigger lease break by adding the child item
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File in the directory, with ADD access mask create option)
CLOSE to commit the add
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_BreakReadCachingByChildModified
DescriptionTest whether server can handle READ lease break notification triggered by modifying child item on a directory.
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
Create a file in the directory
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_READ_CACHING)
From client2 to trigger lease break by modifying the child item
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File in the directory, with WRITE access mask)
WRITE content to the file
CLOSE to commit the write
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_BreakHandleCachingByConflictOpen
DescriptionTest whether server can handle HANDLE lease break notification triggered by a conflict open.
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_HANDLE_CACHING
From client2 to trigger lease break by sharing_violate access
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File in the directory, with WRITE access mask)
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_BreakHandleCachingByParentRenamed
DescriptionTest whether server can handle HANDLE lease break notification triggered by renaming parent directory.
Prerequisites
Test Execution StepsTest preparation
Create a parent directory on a share
Create a test directory in the parent directory
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (on the test directory, with SMB2_CREATE_REQUEST_LEASE_V2 with LeaseState SMB2_LEASE_READ_CACHING
From client2 to trigger lease break by renaming the parent directory
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (on the parent directory, with DELETE access mask and FILE_DELETE_ON_CLOSE create option)
SetInfo ( with FileRenameInformation to rename the file)
From client1
Receive LEASE_BREAK
Send LEASE_BREAK_ACK if server requires
CLOSE
TREE_DISCONNECT
LOGOFF
From client2
TREE_DISCONNECT
LOGOFF
Cleanup
DirectoryLeasing_WriteCachingCleared
Scenario
DescriptionVerify WRITE caching is cleared when server grants lease
Message SequenceTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2)
Verify no WRITE caching is granted by server
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDDirectoryLeasing_RWGrantedAsR
DescriptionVerify only SMB2_LEASE_READ_CACHING granted when client request SMB2_LEASE_READ_CACHING
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and LeaseState SMB2_LEASE_READ_CACHING
Verify server only granted SMB2_LEASE_READ_CACHING in response
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDDirectoryLeasing_RWHGrantedAsRH
DescriptionVerify only SMB2_ SMB2_LEASE_READ_CACHING
Prerequisites
Test Execution StepsTest preparation
Create a directory on a share
From client1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with SMB2_CREATE_REQUEST_LEASE_V2 and LeaseState SMB2_LEASE_READ_CACHING
Verify server only granted SMB2_LEASE_READ_CACHING
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

Encryption

Model

Encryption Model is to test whether the server can handle encryption functionality correctly according to client request and server configuration.

The feature has 90 Model-Based test cases and 5 traditional test case.

Coverage

Encryption Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

3.1.4.3 Encrypting the Message

3.2.5.1.3 Verifying the Signature

3.2.5.3.1 Handling a New Authentication

3.2.5.5 Receiving an SMB2 TREE_CONNECT Response

Assumptions/Restrictions

This model doesn’t test the specific algorithm mentioned in section 2.2.41, which will be covered with traditional test cases.

This model doesn’t test TRANSFORM_HEADER message type, which will be covered with traditional test cases

Scenario Design

This model has one scenario:

Scenario NameEncryption
DescriptionIt's a basic scenario to test how the server handles encryption request under different situation.
MachineReadConfig;
SetupConnection; //Negotiate
(
  SessionSetupRequest;
  SessionSetupResponse;
  TreeConnectRequest;
  (TreeConnectResponse
  (
    FileOperationVerifyEncryptionRequest; //Write, Read
    (FileOperationVerifyEncryptionResponse
//If the server which does not support encryption receive encrypted message, it will disconnect the connection
  )?;
);
Traditional case

For traditional encryption BVT test cases, refer to section Encryption.

For other traditional encryption test cases, refer to section FileServerFailover_Encryption.

Handle

Model
Coverage

Handle Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

  • 3.3.5.6 Receiving an SMB2 LOGOFF Request

  • 3.3.5.9 Receiving an SMB2 CREATE Request.

  • 3.3.5.9.6 Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST Create Context

  • 3.3.5.9.7 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context

  • 3.3.5.9.10 Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Create Context

  • 3.3.5.9.12 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context

Assumptions/Restrictions
  • All lease state used in this model is SMB2_LEASE_HANDLE_CACHING | SMB2_LEASE_READ_CACHING

  • The model does not cover the scenario that the file name in ReconnectOpenRequest is different from PrepareOpen.

  • Open in this model is an open to a non-directory file.

  • The model does not cover the scenario that the dialect negotiated in ReconnectOpenRequest is different from PrepareOpen.

Scenario Design

This model has 10 scenarios:

Scenario NameRequestDurableHandleV1BatchOplock
DescriptionBasic scenario to test create durable handle v1 with batch oplock
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb21, ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  {OplockLeaseType.BatchOplock, OplockLeaseType.NoOplockOrLease},
  _, // durableV1RequestContext
  DurableV2RequestContext.DurableV2RequestContextNotExist,
  _, // durableV1ReconnectContext
  DurableV2ReconnectContext.DurableV2ReconnectContextNotExist);
OpenResponse;
Scenario NameRequestDurableHandleV1LeaseV1
DescriptionBasic scenario to test create durable handle v1 with lease v1
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb21, ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  {OplockLeaseType.LeaseV1, OplockLeaseType.NoOplockOrLease},
  _, // durableV1RequestContext
  DurableV2RequestContext.DurableV2RequestContextNotExist,
  _, // durableV1ReconnectContext
  DurableV2ReconnectContext.DurableV2ReconnectContextNotExist);
OpenResponse;
Scenario NameRequestDurableHandleV2BatchOplock
DescriptionBasic scenario to test create durable handle v2 with batch oplock
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  {OplockLeaseType.BatchOplock, OplockLeaseType.NoOplockOrLease},
  DurableV1RequestContext.DurableV1RequestContextNotExist,
  {DurableV2RequestContext.DurableV2RequestContextExistWithoutPersistent, DurableV2RequestContext.DurableV2RequestContextNotExist},
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist});
OpenResponse;
Scenario NameRequestDurableHandleV2LeaseV1
DescriptionBasic scenario to test create durable handle v2 with lease v1
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  {OplockLeaseType.LeaseV1, OplockLeaseType.NoOplockOrLease},
  DurableV1RequestContext.DurableV1RequestContextNotExist,
  {DurableV2RequestContext.DurableV2RequestContextExistWithoutPersistent, DurableV2RequestContext.DurableV2RequestContextNotExist},
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist});
OpenResponse;
Scenario NameRequestDurableHandleV2LeaseV2
DescriptionBasic scenario to test create durable handle v2 with lease v2
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  {OplockLeaseType.LeaseV1, OplockLeaseType.NoOplockOrLease},
  DurableV1RequestContext.DurableV1RequestContextNotExist,
  {DurableV2RequestContext.DurableV2RequestContextExistWithoutPersistent, DurableV2RequestContext.DurableV2RequestContextNotExist},
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist});
OpenResponse;
Scenario NameRequestPersistentHandle
DescriptionBasic scenario to test create persistent handle
MachineReadConfig;
OpenRequest(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  _, // persistentBit
  _, // connectToCAShare
  OplockLeaseType.NoOplockOrLease,
  DurableV1RequestContext.DurableV1RequestContextNotExist,
  {DurableV2RequestContext.DurableV2RequestContextExistWithPersistent, DurableV2RequestContext.DurableV2RequestContextNotExist},
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist});
OpenResponse;
Scenario NameDurableHandleV1PreparedWithBatchOplockReconnect
DescriptionTest reconnect durable handle
The durablev1 open is created with batch lock
Client does Logoff/Disconnect/Nothing.
Client reconnects the open.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb21, ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, // clientMaxDialect
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  ModelHandleType.DurableHandleV1,
  OplockLeaseType.BatchOplock);
(LogOff
ReconnectOpenRequest(
  _, // durableV1ReconnectContext
  DurableV2ReconnectContext.DurableV2ReconnectContextNotExist,
  {OplockLeaseType.BatchOplock, OplockLeaseType.NoOplockOrLease},
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Scenario NameDurableHandleV1PreparedWithLeaseV1Reconnect
DescriptionTest reconnect durable handle
The durablev1 open is created with lease v1
Client does Logoff/Disconnect/Nothing.
Client reconnects the open.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb21, ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  ModelHandleType.DurableHandleV1,
  OplockLeaseType.LeaseV1);
(LogOff
ReconnectOpenRequest(
  _, // durableV1ReconnectContext
  DurableV2ReconnectContext.DurableV2ReconnectContextNotExist,
  {OplockLeaseType.LeaseV1, OplockLeaseType.NoOplockOrLease},
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Scenario NameDurableHandleV2PreparedWithBatchOplockReconnect
DescriptionTest reconnect durable handle
The durablev2 open is created with batch oplock
Client does Logoff/Disconnect/Nothing.
Client reconnects the open.
The cases are only applied for Dialect 3.0 or later.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  ModelHandleType.DurableHandleV2,
  OplockLeaseType.BatchOplock);
(LogOff
ReconnectOpenRequest(
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist},
  {OplockLeaseType.BatchOplock, OplockLeaseType.NoOplockOrLease},
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Scenario NameDurableHandleV2PreparedWithLeaseV1Reconnect
DescriptionTest reconnect durable handle
The durablev2 open is created with lease v1
Client does Logoff/Disconnect/Nothing.
Client reconnects the open.
The cases are only applied for Dialect 3.0 or later.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  ModelHandleType.DurableHandleV2,
  OplockLeaseType.LeaseV1);
(LogOff
ReconnectOpenRequest(
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist},
  {OplockLeaseType.LeaseV1, OplockLeaseType.NoOplockOrLease},
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Scenario NameDurableHandleV2PreparedWithLeaseV2Reconnect
DescriptionTest reconnect durable handle
The durablev2 open is created with lease v2
Client does Logoff/Disconnect/Nothing.
Client reconnects the open.
The cases are only applied for Dialect 3.0 or later.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
  PersistentBitType.PersistentBitNotSet,
  CAShareType.NonCAShare,
  ModelHandleType.DurableHandleV2,
  OplockLeaseType.LeaseV2);
(LogOff
ReconnectOpenRequest(
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  {DurableV2ReconnectContext.DurableV2ReconnectContextExistWithoutPersistent, DurableV2ReconnectContext.DurableV2ReconnectContextNotExist},
  {OplockLeaseType.LeaseV2, OplockLeaseType.NoOplockOrLease},
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Scenario NamePersistentHandleReconnect
DescriptionTest reconnect persistent handle
The persistent open is created.
Client does Logoff/Disconnect.
Client reconnects to the open.
The cases are only applied for Dialect 3.0 or later.
MachineReadConfig;
PrepareOpen(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
  _, // persistentBit
  CAShareType.CAShare, // connectToCAShare
  ModelHandleType.PersistentHandle,
  OplockLeaseType.NoOplockOrLease);
(LogOff
ReconnectOpenRequest(
  DurableV1ReconnectContext.DurableV1ReconnectContextNotExist,
  _, // durableV2ReconnectContext
  OplockLeaseType.NoOplockOrLease,
  _, // leaseKeyDifferentialType
  _, // clientIdType
  _);// createGuidType
OpenResponse;
Traditional case

The traditional test case is used to cover the below statement in section 3.3.5.9.7:

If the user represented by SessionSecurityContext is not the same user denoted by Open.DurableOwner, the server MUST fail the request with STATUS_ACCESS_DENIED. 

If the server disconnect the connection, the reconnect will be successful.

Test IDDurableHandleV2_Reconnect_WithDifferentDurableOwner
DescriptionTest reconnect with different durable owner will fail with STATUS_ACCESS_DENIED
Message SequenceOpen a file and request durable handle v2 then write content to file
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_REQUEST_V2)
WRITE
Disconnect/Reconnect the network to simulate network failure
Reconnect previous durable handle v2 and read content from file
NEGOTIATE
SESSION_SETUP (Reconnect using different account credential)
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_RECONNECT_V2)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test IDDurableHandleV2_Reconnect_WithLeaseV1_WithDifferentFileName
DescriptionTest reconnect with DurableHandleV2 and LeaseV1 context, but the file name is different will fail with STATUS_INVALID_PARAMETER.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV2 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV2 and LeaseV1 create context but to with a different filename
Server sends STATUS_INVALID_PARAMETER response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithoutLogoffOrDisconnect_WithoutPreviousSessionIdSet
DescriptionTest reconnect with DurableHandleV1, without log off or disconnect but without previous session id.
Message SequenceOpen a file and request durable handle v1 then write content to file
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_REQUEST_V1)
WRITE
Reconnect previous durable handle v2 and read content from file
NEGOTIATE
SESSION_SETUP (Reconnect not using SessionId in above step as PreviousSessionId)
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_RECONNECT_V1)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test IDDurableHandleV1_Reconnect_AfterServerDisconnect
DescriptionTest reconnect with durable handle V1 with server disconnect
Message SequenceOpen a file and request durable handle v2 then write content to file
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_REQUEST_V1)
WRITE
Send Negotiate after create to make server disconnect the connection
Reconnect previous durable handle v1
NEGOTIATE
SESSION_SETUP (Reconnect using SessionId in above step as PreviousSessionId)
TREE_CONNECT
CREATE (with CREATE_DURABLE_HANDLE_RECONNECT_V1)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test IDDurableHandleV2_NoPersistenceGrantedOnNonCAShare
DescriptionTest no persistent handle is granted by the server when the share doesn't have CA capability
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request to connect share without CA capability
Server sends TREE_CONNECT response (no SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY flag set in Capability)
Client sends CREATE request with CREATE_DURABLE_HANDLE_REQUEST_V2 create context
Server sends CREATE response (server should not grant persistent handle in response)
Cleanup
Test IDDurableHandleV2_Reconnect_WithoutPersistence
DescriptionTest durable handle V2 without persistence could be reconnected
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with CREATE_DURABLE_HANDLE_REQUEST_V2 create context
Client sends WRITE request
Server sends WRITE response
Disconnect the client to simulate network failure
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request (with CREATE_DURABLE_HANDLE_RECONNECT_V2)
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV2_WithLeaseV2_WithoutHandleCaching
DescriptionTest no durable handle is granted if requesting with DurableHandleV2 and LeaseV2 context, but SMB2_LEASE_HANDLE_CACHING bit is not set in LeaseState.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV2 and LeaseV2 create context but without SMB2_LEASE_HANDLE_CACHING
Server sends CREATE response
Verify that DurableHandle is not granted
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithLeaseV1_WithDifferentFileName
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context, but the file name is different.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create context
Server sends CREATE response
Verify that the server fail request with STATUS_INVALID_PARAMETER
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_WithLeaseV1_WithoutHandleCaching
DescriptionTest no durable handle is granted if requesting with DurableHandleV1 and LeaseV1 context, but SMB2_LEASE_HANDLE_CACHING bit is not set in LeaseState.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context but without SMB2_LEASE_HANDLE_CACHING
Server sends CREATE response
Verify that DurableHandle is not granted
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDPersistentHandle_ReOpenFromDiffClient
DescriptionVerify that whether opening a file will fail if a previous client already had the persistent handle to this file.
Prerequisites
Test Execution StepsSMB2 Negotiate with SUT
SMB2 Session Setup
SMB2 Tree Connect to Share
SMB2 Create with CREATE_DURABLE_HANDLE_REQUEST_V2 context (Persistent Flag is set)
Disconnect
SMB2 Negotiate with SUT using new Client Guid
SMB2 Session Setup
SMB2 Tree Connect to the same Share
SMB2 Create with same file name
Verify the Create Response with Status STATUS_FILE_NOT_AVAILABLE
Test IDDurableHandleV2_WithLeaseV1AndV2_WithDifferentLeaseKey
DescriptionTest reconnect with DurableHandleV2, LeaseV1 and LeaseV2 context, but with different LeaseKey
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with CREATE_DURABLE_HANDLE_REQUEST_V2 create context
Client sends WRITE request
Server sends WRITE response
Disconnect the client to simulate network failure
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with same file name and different LeaseKey (with CREATE_DURABLE_HANDLE_RECONNECT_V2)
Server sends CREATE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_IncludeCreateDurableHandle
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context and include create durable request.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create context and include create durable request.
Server sends CREATE response with status STATUS_SUCCESS
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_IncludeRequestV2
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context including SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create context including Smb2CreateDurableHandleRequestV2
Server sends CREATE response
Verify that the server fail request with STATUS_INVALID_PARAMETER
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_IncludeReconnectV2
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context including SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create context including SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2
Server sends CREATE response
Verify that the server fail request with STATUS_INVALID_PARAMETER
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithoutFileIdPersistent
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context without FileId.Persistent.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 create without FileId.Persistent
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithDifferentLeaseKey
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context but with a different LeaseKey
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1 but different lease key
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_LeaseIsNull
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context when Open.Lease is Null
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_SessionIsNotNull
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context when Open.Session is not NULL
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client does not disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 and LeaseV1
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithoutRequestLease
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context without SMB2_CREATE_REQUEST_LEASE
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client does not disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 without SMB2_CREATE_REQUEST_LEASE
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithDifferentClientGuid
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context and different client guid.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client does not disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleReconnectV1 with different client GUID
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithoutDurableHandle
DescriptionTest reconnect with LeaseV1 context without DurableHandleV1
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with LeaseV1 create context excluding DurableHandleV1
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client does not disconnect
Create another client and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with LeaseV1 excluding DurableHandleReconnectV1
Server sends CREATE response
Verify that the server fail request with STATUS_OBJECT_NAME_NOT_FOUND
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDDurableHandleV1_Reconnect_WithDifferentDurableOwner
DescriptionTest reconnect with DurableHandleV1 and LeaseV1 context and different client credential account.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Client does not disconnect
Create another client with different credential account and the following requests are sent via this client
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends CREATE request for exclusive open with DurableHandleV1 and LeaseV1
Server sends CREATE response
Verify that the server fail request with STATUS_ACCESS_DENIED
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

Leasing

Leasing means the client can cache specified data in local. There are three different capabilities within a lease: READ, WRITE and HANDLE.

  • READ caching permits the SMB2 client to cache data read from the object.

  • WRITE caching permits the SMB2 client to cache writes and byte-range locks on an object.

  • HANDLE caching permits one or more SMB2 clients to delay closing handles it holds open, or to defer sending opens.

The feature has 379 Model-Based test cases and 2 traditional test case.

For traditional BVT test cases, please refer to section DirectoryLeasing and FileLeasing

Model
Coverage

This model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

  • 2.2.13.2.8 SMB2_CREATE_REQUEST_LEASE

  • 2.2.13.2.10 SMB2_CREATE_REQUEST_LEASE_V2

  • 2.2.23.2 Lease Break Notification

  • 2.2.24.2 Lease Break Acknowledgment

  • 2.2.25.2 Lease Break Response

  • 3.3.1.4 Algorithm for Leasing in an Object Store

  • 3.3.4.7 Object Store Indicates a Lease Break

  • 3.3.5.9 Receiving an SMB2 CREATE Request

  • 3.3.5.9.8 Handling the SMB2_CREATE_REQUEST_LEASE Create Context

  • 3.3.5.9.11 Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context

  • 3.3.5.22.2 Processing a Lease Acknowledgment

Assumptions/Restrictions
  1. This model only covers the lease on a file and does not cover the lease on a directory.

  2. This model does not cover the statements in section “3.3.6.1 Oplock Break Acknowledgment Timer Event”.

Scenario Design

This model has 4 scenarios.

  • BreakReadLeaseV1
DescriptionIt's a scenario to test how the server handles read leasing for LeaseV1
MachineReadConfig;
SetupConnection;
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV1, LeaseKeyType.ValidLeaseKey, 1,
  _, _);
CreateResponse;
(
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  // 1 R -> None
  OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
  FileOperationToBreakLeaseResponse;
)?;
  • BreakReadLeaseV2
DescriptionIt's a scenario to test how the server handles read leasing for LeaseV2.
MachineReadConfig;
SetupConnection({ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, _);
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV2, LeaseKeyType.ValidLeaseKey, 1,
  _, _);
CreateResponse;
(
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  // 1 R -> None
  OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
  FileOperationToBreakLeaseResponse;
)?;
  • BreakReadWriteLeaseV1
DescriptionIt's a scenario to test how the server handles Read&Write leasing for LeaseV1
MachineReadConfig;
SetupConnection;
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV1, LeaseKeyType.ValidLeaseKey, 5,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, OperatorType.SameClientId, _, out _);
 FileOperationToBreakLeaseResponse;
 (
  (
   FileOperationToBreakLeaseRequest(FileOperation.OPEN_OVERWRITE, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 1 RW -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   ((
    // 2 RW -> R
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 1);
    LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
    LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
    FileOperationToBreakLeaseResponse;
    FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    // 2.1 R -> None
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
    FileOperationToBreakLeaseResponse;
   ) | (
    // 3 RW -> None
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
    LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
    LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
    FileOperationToBreakLeaseResponse;
   ))
  )
 );
)?;
  • BreakReadWriteLeaseV2
DescriptionIt's a scenario to test how the server handles Read&Write leasing for LeaseV2
MachineReadConfig;
SetupConnection({ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, _);
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV2, LeaseKeyType.ValidLeaseKey, 5,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, OperatorType.SameClientId, _, out _);
 FileOperationToBreakLeaseResponse;
 (
  (
   FileOperationToBreakLeaseRequest(FileOperation.OPEN_OVERWRITE, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 1 RW -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   ((
    // 2 RW -> R
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 1);
    LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
    LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
    FileOperationToBreakLeaseResponse;
    FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    // 2.1 R -> None
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
    FileOperationToBreakLeaseResponse;
   ) | (
    // 3 RW -> None
    OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
    LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
    LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
    FileOperationToBreakLeaseResponse;
   ))
  )
 );
)?;
  • BreakReadHandleLeasingV1
DescriptionIt's a scenario to test how the server handles Read&Handle leasing for LeaseV1
MachineReadConfig;
SetupConnection;
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV1, LeaseKeyType.ValidLeaseKey, 3,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, OperatorType.SameClientId, _, out _);
 FileOperationToBreakLeaseResponse;
 ((
  FileOperationToBreakLeaseRequest(FileOperation.DELETED, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 1 RH -> R, and no other operation after delete
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 2 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ) | (
  // 3 RH -> RH, and no other operation after delete
  FileOperationToBreakLeaseRequest(FileOperation.DELETED, OperatorType.SameClientId, _, out _);
  FileOperationToBreakLeaseResponse;
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 4 RH -> R
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 4.1 R -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 5 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.PARENT_DIR_RENAMED}, _, _, out _);
  ((
   // 6 RH -> R
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 6.1 R -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 7 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ));
)?;
  • BreakReadHandleLeasingV2
DescriptionIt's a scenario to test how the server handles Read&Handle leasing for LeaseV2
MachineReadConfig;
SetupConnection({ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, _);
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV2, LeaseKeyType.ValidLeaseKey, 3,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, OperatorType.SameClientId, _, out _);
 FileOperationToBreakLeaseResponse;
 ((
  FileOperationToBreakLeaseRequest(FileOperation.DELETED, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 1 RH -> R, and no other operation after delete
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 2 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ) | (
  // 3 RH -> RH, and no other operation after delete
  FileOperationToBreakLeaseRequest(FileOperation.DELETED, OperatorType.SameClientId, _, out _);
  FileOperationToBreakLeaseResponse;
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 4 RH -> R
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 4.1 R -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 5 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.PARENT_DIR_RENAMED}, _, _, out _);
  ((
   // 6 RH -> R
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
   FileOperationToBreakLeaseResponse;
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
   // 6.1 R -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
   FileOperationToBreakLeaseResponse;
  ) | (
   // 7 RH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 ));
)?;
  • BreakReadWriteHandleLeasingV1
DescriptionIt's a scenario to test how the server handles Read&Write&Handle leasing for LeaseV1.
MachineReadConfig;
SetupConnection;
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV1, LeaseKeyType.ValidLeaseKey, 7,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 (
  (
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _)
   |
   FileOperationToBreakLeaseRequest(FileOperation.PARENT_DIR_RENAMED, _, _, out _)
  );
  ((
   // 1 RWH -> RW
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 5);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 5);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 5);
   FileOperationToBreakLeaseResponse;
   (
    (
     FileOperationToBreakLeaseRequest(FileOperation.OPEN_OVERWRITE, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 1.1 RW -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     ((
      // 1.2 RW -> R
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 1);
      LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
      LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
      FileOperationToBreakLeaseResponse;
      FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
      // 1.2.1 R -> None
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
      FileOperationToBreakLeaseResponse;
     ) | (
      // 1.3 RW -> None
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
      LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
      LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
      FileOperationToBreakLeaseResponse;
     ))
    )
   );
  ) | (
   // 2 RWH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ));
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 3 RWH -> RH
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 3);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 3);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 3);
   FileOperationToBreakLeaseResponse;
   ((
    FileOperationToBreakLeaseRequest(FileOperation.DELETED, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    ((
     // 3.1 RH -> R, and no other operation after delete
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.2 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ) | (
    // 3.3 RH -> RH, and no other operation after delete
    FileOperationToBreakLeaseRequest(FileOperation.DELETED, OperatorType.SameClientId, _, out _);
    FileOperationToBreakLeaseResponse;
   ) | (
    FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    ((
     // 3.4 RH -> R
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 3.4.1 R -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.5 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ) | (
    FileOperationToBreakLeaseRequest({FileOperation.PARENT_DIR_RENAMED}, _, _, out _);
    ((
     // 3.6 RH -> R
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 3.6.1 R -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.7 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ));
  ) | (
   // 4 RWH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 )
)?;
  • BreakReadWriteHandleLeasingV2
DescriptionIt's a scenario to test how the server handles Read&Write&Handle leasing for LeaseV2.
MachineReadConfig;
SetupConnection({ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, _);
CreateRequest(ConnectTargetType.ConnectToNonDirectory, LeaseContextType.LeaseV2, LeaseKeyType.ValidLeaseKey, 7,
 LeaseFlagsValues.SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET, ParentLeaseKeyType.ValidParentLeaseKey);
CreateResponse;
(
 (
  (
   FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _)
   ||
   FileOperationToBreakLeaseRequest(FileOperation.PARENT_DIR_RENAMED, _, _, out _)
  );
  ((
   // 1 RWH -> RW
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 5);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 5);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 5);
   FileOperationToBreakLeaseResponse;
   (
    (
     FileOperationToBreakLeaseRequest(FileOperation.OPEN_OVERWRITE, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 1.1 RW -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     ((
      // 1.2 RW -> R
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 1);
      LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
      LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
      FileOperationToBreakLeaseResponse;
      FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
      // 1.2.1 R -> None
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
      FileOperationToBreakLeaseResponse;
     ) | (
      // 1.3 RW -> None
      OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 5, 0);
      LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
      LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
      FileOperationToBreakLeaseResponse;
     ))
    )
   );
  ) | (
   // 2 RWH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ));
 ) | (
  FileOperationToBreakLeaseRequest({FileOperation.OPEN_WITHOUT_OVERWRITE}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
  ((
   // 3 RWH -> RH
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 3);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 3);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 3);
   FileOperationToBreakLeaseResponse;
   ((
    FileOperationToBreakLeaseRequest(FileOperation.DELETED, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    ((
     // 3.1 RH -> R, and no other operation after delete
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.2 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ) | (
    // 3.3 RH -> RH, and no other operation after delete
    FileOperationToBreakLeaseRequest(FileOperation.DELETED, OperatorType.SameClientId, _, out _);
    FileOperationToBreakLeaseResponse;
   ) | (
    FileOperationToBreakLeaseRequest({FileOperation.OPEN_SHARING_VIOLATION, FileOperation.OPEN_SHARING_VIOLATION_WITH_OVERWRITE, FileOperation.RENAMEED}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
    ((
     // 3.4 RH -> R
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 3.4.1 R -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.5 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ) | (
    FileOperationToBreakLeaseRequest({FileOperation.PARENT_DIR_RENAMED}, _, _, out _);
    ((
     // 3.6 RH -> R
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 1);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 1);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 1);
     FileOperationToBreakLeaseResponse;
     FileOperationToBreakLeaseRequest({FileOperation.OPEN_OVERWRITE, FileOperation.WRITE_DATA, FileOperation.SIZE_CHANGED, FileOperation.RANGE_LOCK}, {OperatorType.SameClientGuidDifferentLeaseKey, OperatorType.SecondClient}, _, out _);
     // 3.6.1 R -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.None, 1, 0);
     FileOperationToBreakLeaseResponse;
    ) | (
     // 3.7 RH -> None
     OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 3, 0);
     LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
     LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
     FileOperationToBreakLeaseResponse;
    ))
   ));
  ) | (
   // 4 RWH -> None
   OnLeaseBreakNotification(_, LEASE_BREAK_Notification_Packet_Flags_Values.SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED, 7, 0);
   LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType.ValidLeaseKey, 0);
   LeaseBreakResponse(ModelSmb2Status.STATUS_SUCCESS, 0);
   FileOperationToBreakLeaseResponse;
  ))
 )
)?;

Negotiate

Negotiate means the client can exchange the capabilities with the server.

The feature has 94 Model-Based test cases and 24 traditional test cases.

For traditional test cases, please refer to section Negotiation

Model
Coverage

This Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

  • 2.2.3 SMB2 NEGOTIATE Request

  • 2.2.4 SMB2 NEGOTIATE Response

  • 3.3.5.2.2 Verifying the Connection State

  • 3.3.5.2.3 Verifying the Sequence Number

  • 3.3.5.3 Receiving an SMB_COM_NEGOTIATE

  • 3.3.5.3.1 SMB 2.1 or SMB 3.0 Support

  • 3.3.5.3.2 SMB 2.002 Support

  • 3.3.5.4 Receiving an SMB2 NEGOTIATE Request

Assumptions/Restrictions
  1. This model does not test all flags combination of fields in section 2.2.3 and 2.2.4.

  2. This model focuses on different dialects and different sequences.

Scenario Design

This model has 1 scenario.

DescriptionIt's a basic scenario to test how the server handles Negotiate Request and ComNegotiate Request with different dialects and different sequences.
MachineReadConfig;
SetupConnection;
(
  (ComNegotiateRequest
  (NegotiateResponse
)+;
Traditional Case

Scenario see section Scenario.

Test IDNegotiate_SMB311_WithAllContexts
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and with all the three Negotiate Contexts.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, and with all the three Negotiate Contexts.
Verify server returns STATUS_SUCCESS, check the selected dialect, capabilities and negotiate contexts according to server's configuration.
Cleanup
Test IDNegotiate_SMB311_WithoutAnyContexts
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and without any Negotiate Contexts.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, and without any Negotiate Contexts.
Verify server fails the negotiate request with STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_WithEncryptionContextWithoutIntegrityContext
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect, with SMB2_ENCRYPTION_CAPABILITIES Context and without SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsSend Negotiate request with dialect SMB 3.11, with SMB2_ENCRYPTION_CAPABILITIES context, without SMB2_PREAUTH_INTEGRITY_CAPABILITIES context.
Verify server fails the negotiate request with STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_WithCompressionContextWithoutIntegrityContext
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect, with SMB2_COMPRESSION_CAPABILITIES Context and without SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsSend Negotiate request with dialect SMB 3.11, with SMB2_COMPRESSION_CAPABILITIES Context and without SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
Verify server fails the negotiate request with STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_WithEncryptionAndCompressionContextsWithoutIntegrityContext
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect, with SMB2_ENCRYPTION_CAPABILITIES and SMB2_COMPRESSION_CAPABILITIES Contexts and without SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsSend Negotiate request with dialect SMB 3.11, with SMB2_ENCRYPTION_CAPABILITIES and SMB2_COMPRESSION_CAPABILITIES Contexts and without SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
Verify server fails the negotiate request with STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_InvalidHashAlgorithm
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and with an invalid HashAlgorithm in SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and set HashAlgorithm to an invalid value: 0xFFFF.
Verify server fails the negotiate request with STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP.
Cleanup
Test IDNegotiate_SMB311_InvalidCipher
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect and with an invalid Cihper in SMB2_ENCRYPTION_CAPABILITIES Context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_ENCRYPTION_CAPABILITIES context and set Cipher to an invalid value: 0xFFFF.
Verify that server sets Connection.CipherId to 0 from the response.
Cleanup
Test IDNegotiate_SMB311_SigningCapability
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with Smb 3.11 dialect, with SMB2_SIGNING_CAPABILITIES context and with SMB2_PREAUTH_INTEGRITY_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_SIGNING_CAPABILITIES context and SMB2_PREAUTH_INTEGRITY_CAPABILITIES context and set SigningAlgorithmId to value: 0x0000.
Verify that server sets Connection.SigningAlgorithmCount to 1 from the response.
Cleanup
Test IDNegotiate_SMB311_Compression_CompressionAlgorithmNotSupported
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with unsupported compression algorithms in SMB2_COMPRESSION_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set CompressionAlgorithms to a unsupported value: 0x0004.
Verify that server returns a Negotiate response, setting SMB2_COMPRESSION_CAPABILITIES negotiate response context with CompressionAlgorithmCount set to 1 and CompressionAlgorithms set to "NONE".
Cleanup
Test IDNegotiate_SMB311_Compression_InvalidSmbDialect
DescriptionThis test case is designed to test whether server ignores SMB2_COMPRESSION_CAPABILITIES context when negotiate with SMB dialect less than 3.1.1.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialects less than SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set CompressionAlgorithms to all supported compression algorithms.
Verify that server returns a Negotiate response without SMB2_COMPRESSION_CAPABILITIES.
Cleanup
Test IDNegotiate_SMB311_Compression_CompressionContextInvalidDataLength
DescriptionThis test case is designed to test whether server handle SMB2_COMPRESSION_CAPABILITIES context with invalid DataLength field when negotiate.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set DataLength to 4 which is less than the size of SMB2_COMPRESSION_CAPABILITIES.
Verify that server returns a Negotiate response with Status set to STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_Compression_CompressionAlgorithmEmpty
DescriptionThis test case is designed to test whether server handle SMB2_COMPRESSION_CAPABILITIES context with invalid CompressionAlgorithmCount field when negotiate.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set CompressionAlgorithmCount field to zero.
Verify that server returns a Negotiate response with Status set to STATUS_INVALID_PARAMETER.
Cleanup
Test IDNegotiate_SMB311_ContextID_NetName
DescriptionThis test case is designed to test whether server can ignore SMB2_NETNAME_NEGOTIATE_CONTEXT_ID context when negotiate.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_PREAUTH_INTEGRITY_CAPABILITIES context, SMB2_ENCRYPTION_CAPABILITIES context and SMB2_NETNAME_NEGOTIATE_CONTEXT_ID context.
Verify that server returns a Negotiate response with Status set to STATUS_SUCCESS and ignore the SMB2_NETNAME_NEGOTIATE_CONTEXT_ID.
Cleanup
Test IDNegotiate_SMB311_Compression_FlagChainedNotSet
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED not set in Flags field of SMB2_COMPRESSION_CAPABILITIES context.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set Flags field to SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE.
Verify that server returns a Negotiate response with Status set to STATUS_SUCCESS as below,
a. If server is Windows, CompressionAlgorithms is set to the first common algorithm and the first common pattern scanning algorithm supported by the client and server.
b. If server is non-Windows, CompressionAlgorithms is set to all the algorithms in the CompressionAlgorithms field of Negotiate request, in the order they are received.
c. SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED is not set in Flags field.
Cleanup
Test IDNegotiate_SMB311_Compression_ChainedCompressionNotSupported
DescriptionThis test case is designed to test whether server can handle NEGOTIATE with SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED set in Flags field of SMB2_COMPRESSION_CAPABILITIES context when chained compression is not supported.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution StepsClient sends Negotiate request with dialect SMB 3.11, SMB2_COMPRESSION_CAPABILITIES context and set Flags field to SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED.
Verify that server returns a Negotiate response with Status set to STATUS_SUCCESS as below,
a. If server is Windows, CompressionAlgorithms is set to the first common algorithm and the first common pattern scanning algorithm supported by the client and server.
b. If server is non-Windows, CompressionAlgorithms is set to all the algorithms in the CompressionAlgorithms field of Negotiate request, in the order they are received.
c. SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED is not set in Flags field.
Cleanup
Test IDNegotiate_SMB311_IsTransportCapabilitiesSupported
DescriptionThis test case verifies whether the server can handle a NEGOTIATE request with the SMB2_TRANSPORT_CAPABILITIES context.
PrerequisitesThe server must support dialect 3.11 and be running Server 2025 or later.
Test Execution Steps1. The client sends a NEGOTIATE request with dialect SMB 3.11, without including the SMB2_TRANSPORT_CAPABILITIES context.
Verify that the server responds with a NEGOTIATE response that does not include the SMB2_TRANSPORT_CAPABILITIES context.
2. The client sends another NEGOTIATE request with dialect SMB 3.11, this time including the SMB2_TRANSPORT_CAPABILITIES context.
Verify that the server responds with a NEGOTIATE response that includes the SMB2_TRANSPORT_CAPABILITIES context.
CleanupNo specific cleanup steps are required.

Oplock

Oplock model verifies that server handles Oplock request and acknowledgement correctly when client requests different Oplock levels on various types of shares with a follow-up request break previous Oplock.

The feature contains 336 model-based test cases in 4 scenarios.

Model
Coverage

Oplock model covers the statements in following sections with exceptions mentioned in Assumptions/Restrictions section

  • 3.3.4.6 Object Store Indicates an Oplock Break

  • 3.3.5.9 Receiving an SMB2 CREATE Request (“Oplock Acquisition:”) (By default, covered by CreateClose Model)

  • 3.3.5.22.1 Processing an Oplock Acknowledgment

Assumption/Restriction
  • The model does not cover Oplock requested on a directory which is not supported.
Scenario Design
Scenario NameOplockOnShareWithoutForceLevel2OrSOFS
DescriptionScenario for Share.ForceLevel2Oplock is FALSE and Share.Type does not includes STYPE_CLUSTER_SOFS
MachineReadConfig;
SetupConnection(_, ModelShareFlag.NO_SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK, ModelShareType.NO_STYPE_CLUSTER_SOFS); //Negotiate,SessionSetup,TreeConnect
RequestOplockAndOperateFileRequest(_, _, out _, out _);//Request Oplock and do another operation on same file to attempt to trigger Oplock break
OplockBreakNotification?; // If no notification arrival, ack on non-breaking oplock will be tested
OplockBreakAcknowledgementRequest;
OplockBreakResponse;
Scenario NameOplockOnShareWithoutForceLevel2WithSOFS
DescriptionScenario for Share.ForceLevel2Oplock is FALSE and Share.Type includes STYPE_CLUSTER_SOFS
MachineReadConfig;
SetupConnection(_, ModelShareFlag.NO_SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK, ModelShareType.STYPE_CLUSTER_SOFS); //Negotiate,SessionSetup,TreeConnect
RequestOplockAndOperateFileRequest(_, _, out _, out _);//Request Oplock and do another operation on same file to attempt to trigger Oplock break
OplockBreakNotification?; // If no notification arrival, ack on non-breaking oplock will be tested
OplockBreakAcknowledgementRequest;
OplockBreakResponse;
Scenario NameOplockOnShareWithForceLevel2WithoutSOFS
DescriptionScenario for Share.ForceLevel2Oplock is TRUE and Share.Type does not includes STYPE_CLUSTER_SOFS
MachineReadConfig;
SetupConnection(_, ModelShareFlag.SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK, ModelShareType.NO_STYPE_CLUSTER_SOFS); //Negotiate,SessionSetup,TreeConnect
RequestOplockAndOperateFileRequest(_, _, out _, out _);//Request Oplock and do another operation on same file to attempt to trigger Oplock break
OplockBreakNotification?; // If no notification arrival, ack on non-breaking oplock will be tested
OplockBreakAcknowledgementRequest;
OplockBreakResponse;
Scenario NameOplockOnShareWithForceLevel2AndSOFS
DescriptionScenario for Share.ForceLevel2Oplock is TRUE and Share.Type includes STYPE_CLUSTER_SOFS
MachineReadConfig;
SetupConnection(_, ModelShareFlag.SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK, ModelShareType.STYPE_CLUSTER_SOFS); //Negotiate,SessionSetup,TreeConnect
RequestOplockAndOperateFileRequest(_, _, out _, out _); //Request Oplock and do another operation on same file to attempt to trigger Oplock break
OplockBreakNotification?; // If no notification arrival, ack on non-breaking oplock will be tested
OplockBreakAcknowledgementRequest;
OplockBreakResponse;

Replay

Replay means the client can resend the request to the server and receive the same response.

The feature has 555 Model-Based test cases and 2 traditional test case.

For traditional test cases, please refer to section Replay

Model
Coverage

This model covers part of statements of the following sections which are related with replay:

  • 2.2.1.1 SMB2 Packet Header - ASYNC

  • 2.2.1.2 SMB2 Packet Header - SYNC

  • 2.2.13.2.3 SMB2_CREATE_DURABLE_HANDLE_REQUEST

  • 2.2.13.2.8 SMB2_CREATE_REQUEST_LEASE

  • 2.2.13.2.10 SMB2_CREATE_REQUEST_LEASE_V2

  • 2.2.13.2.11 SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2

  • 2.2.14.2.3 SMB2_CREATE_DURABLE_HANDLE_RESPONSE

  • 2.2.14.2.10 SMB2_CREATE_RESPONSE_LEASE

  • 2.2.14.2.11 SMB2_CREATE_RESPONSE_LEASE_V2

  • 2.2.14.2.12 SMB2_CREATE_DURABLE_HANDLE_RESPONSE_V2

  • 2.2.31.3 NETWORK_RESILIENCY_REQUEST Request

  • 2.2.32 SMB2 IOCTL Response

  • 2.2.39 SMB2 SET_INFO Request

  • 2.2.40 SMB2 SET_INFO Response

  • 3.3.5.9.6 Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST Create Context

  • 3.3.5.9.8 Handling the SMB2_CREATE_REQUEST_LEASE Create Context

  • 3.3.5.9.11 Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context

  • 3.3.5.15.9 Handling a Resiliency Request

  • 3.3.5.21.1 Handling SMB2_0_INFO_FILE

  • 3.3.7.1 Handling Loss of a Connection

This model covers all statements (except which are mentioned in “Assumptions/Restrictions” of the following sections:

  • 3.3.4.1 Sending Any Outgoing Message

  • 3.3.5.2.10 Verifying the Channel Sequence Number

  • 3.3.5.9.10 Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Create Context

Assumptions/Restrictions
  1. This model focuses on the flag SMB2_FLAGS_REPLAY_OPERATION and ChannelSequence in the SMB2 header.

  2. This model focuses on how to handle the Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Create Context.

  3. This model also involves multi channels and leasing but only cover those behaviors related with replay operations.

  4. This model select READ as negative operation. Both the flag SMB2_FLAGS_REPLAY_OPERATION and ChannelSequence should not impact the response.

  5. This model selects NETWORK_RESILIENCY_REQUEST Request to test IOCtl operation.

Scenario Design

This model has 6 scenarios.

  • ReplayCreateWithoutHandle
DescriptionIt's a scenario to test how the server handles a create request with/without replay flag and valid/invalid channel sequence when no handle is created.
MachineReadConfig;
CreateRequest(
  {ModelDialectRevision.Smb30, ModelDialectRevision.Smb302},
   _, // ReplayModelShareType
   _, // ReplayModelClientSupportPersistent
   ReplayModelSwitchChannelType.MainChannel,
   _, // ReplayModelChannelSequenceType
   _, // ReplayModelSetReplayFlag
   _, // ReplayModelDurableHandle
   _, // ReplayModelRequestedOplockLevel
   _, // ReplayModelLeaseState
  ReplayModelFileName.DefaultFileName,
  ReplayModelCreateGuid.DefaultCreateGuid,
  ReplayModelFileAttributes.DefaultFileAttributes,
  ReplayModelCreateDisposition.DefaultCreateDisposition,
  ReplayModelLeaseKey.DefaultLeaseKey);
CreateResponse;
  • ReplayCreateNormalHandle
DescriptionIt's a scenario to test how the server handles a create request with/without replay flag and valid/invalid channel sequence when a normal handle is created.
MachineReadConfig;
PrepareCreate(
  _,
  ReplayModelClientSupportPersistent.ClientNotSupportPersistent,
  ReplayModelDurableHandle.NormalHandle,
  ReplayModelShareType.NonCAShare,
  ReplayModelRequestedOplockLevel.OplockLevelNone,
  ReplayModelLeaseState.LeaseStateIsNone);
CreateRequest;
CreateResponse;
  • ReplayCreateDurableHandleV1
DescriptionIt's a scenario to test how the server handles a create request with/without replay flag and valid/invalid channel sequence when a durableV1 handle is created.
MachineReadConfig;
PrepareCreate(
  _,
  ReplayModelClientSupportPersistent.ClientNotSupportPersistent,
  ReplayModelDurableHandle.DurableHandleV1,
  ReplayModelShareType.NonCAShare,
  ReplayModelRequestedOplockLevel.OplockLevelBatch,
  {ReplayModelLeaseState.LeaseStateIsNone});
CreateRequest;
CreateResponse;
  • ReplayCreateDurableHandleV2
DescriptionIt's a scenario to test how the server handles a create request with/without replay flag and valid/invalid channel sequence when a durableV2 handle (Non persistent) is created.
MachineReadConfig;
PrepareCreate(
  _,
  ReplayModelClientSupportPersistent.ClientNotSupportPersistent,
  ReplayModelDurableHandle.DurableHandleV2,
  ReplayModelShareType.NonCAShare,
  {ReplayModelRequestedOplockLevel.OplockLevelLeaseV1, ReplayModelRequestedOplockLevel.OplockLevelLeaseV2},
  {ReplayModelLeaseState.LeaseStateIncludeH});
CreateRequest;
CreateResponse;
  • ReplayCreateDurableHandleV2Persistent
DescriptionIt's a scenario to test how the server handles a create request with/without replay flag and valid/invalid channel sequence when a persistent handle is created.
MachineReadConfig;
PrepareCreate(
  _,
  ReplayModelClientSupportPersistent.ClientSupportPersistent,
  ReplayModelDurableHandle.DurableHandleV2Persistent,
  ReplayModelShareType.CAShare,
  {ReplayModelRequestedOplockLevel.OplockLevelLeaseV1, ReplayModelRequestedOplockLevel.OplockLevelLeaseV2},
  {ReplayModelLeaseState.LeaseStateIncludeH});
CreateRequest;
CreateResponse;
  • ReplayFileOperation
DescriptionIt's a scenario to test how the server handles a READ/WRITE/IOCTL/SET_INFO request with/without replay flag and valid/invalid channel sequence.
MachineReadConfig;
PrepareFileOperation({ModelDialectRevision.Smb30, ModelDialectRevision.Smb302}, requestCommand)?;
FileOperationRequest(_, _, requestCommand, _, _, _);
FileOperationResponse;

ResilientHandle

ResilientHandle provides the capability to preserve the open even if there is intermittent losses in the network connectivity.

Model
Coverage

ResilientHandle Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of section 3.3.5.15.9 in [MS-SMB2]. And also ResilientHandle Model covers the statements related to Resilient Handle when Log Off or Loss Connection.

Assumptions/Restrictions
  • This model does not cover the logic related to Lock/Unlock, which will be cover in Lock/Unlock Model.

  • This model does not cover the logic related to Durable Handle, which is covered in Handle Model.

  • This model does not cover the logic related to Resilient Scavenger Timer, which is covered in traditional test case.

  • This model does not cover logic related to feature combination of Resilient Handle and Lease/OpLock Break, which will be covered in future Model for feature combination.

  • This model does not cover logic related to feature combination of Persistent Handle and Resilient Handle, which will be covered in traditional test case.

  • Do not cover common logic related to Receiving IoCtl Request, which will be in scope of IoCtrl Model.

Scenario Design
Scenario IDResilientHandleBasic
DescriptionBasic scenario to test how the server handles Resiliency Request and Resilient Handle when Log Off and Loss Connection.
MachineReadConfig;
// Negotiate, SessionSetup, TreeConnect, Create with no durable handle request
PrepareOpen(_, DurableHandle.NoDurableHandle);
IoCtlResiliencyRequest; IoCtlResiliencyResponse;
( LogOff;
// Re-Establish a Resilient Open according to the section 3.2.4.4 in [MS-SMB2]
ReEstablishResilientOpenRequest;
ReEstablishResilientOpenResponse;
Scenario IDResilientHandleDurable
DescriptionTest how the server handles Resiliency Request on durable handle and Resilient Handle when Log Off and Loss Connection.
MachineReadConfig;
// Negotiate, SessionSetup, TreeConnect, Create with durable handle request V1
PrepareOpen(_, DurableHandle.DurableHandle);
IoCtlResiliencyRequest; IoCtlResiliencyResponse;
( LogOff;
// Re-Establish a Resilient Open according to the section 3.2.4.4 in [MS-SMB2]
ReEstablishResilientOpenRequest;
ReEstablishResilientOpenResponse;
Traditional Case
Resilient Open Scavenger Timer

####### Scenario

DescriptionResilient Open Scavenger Timer
Message SequenceOpen File
Send Resiliency Request with specific Timeout value
Disconnect
Wait for period time
Verify the OPEN is terminated or not.
Cluster Involved ScenarioNO

####### Test Case

Test IDResilientOpenScavengerTimer_ReconnectAfterTimeout
DescriptionVerify that the Open will be terminated after Resilient Open Scavenger Timer is expired.
Prerequisites
Test Execution StepsSMB2 Negotiate with SUT
SMB2 Session Setup
SMB2 Tree Connect to Share
SMB2 Create with no create context
SMB2 Resiliency Request with Timeout = 150 seconds
Disconnect
Wait for (150 + 10) seconds
Re-Establish Resilient Open as section 3.2.4.4 [MS-SMB2]
Verify the returned status is STATUS_OBJECT_NAME_NOT_FOUND.
Test IDResilientOpenScavengerTimer_ReconnectBeforeTimeout
DescriptionVerify that the Open will be preserved before Resilient Open Scavenger Timer is expired.
Prerequisites
Test Execution StepsSMB2 Negotiate with SUT
SMB2 Session Setup
SMB2 Tree Connect to Share
SMB2 Create with no create context
SMB2 Resiliency Request with Timeout = 150 seconds
Disconnect
Wait for (150 鈥?1) seconds
Re-Establish Resilient Open as section 3.2.4.4 [MS-SMB2]
Verify the returned status is STATUS_SUCCESS.

SessionMgmt

SessionMgmt includes setup a session and logoff.

The feature has 251 Model-Based test cases and 3 traditional test cases.

For traditional test cases, please refer to section SessionMgmt

Model
Coverage

SessionMgmt model covers all statements of the following sections:

  • 2.2.5 SMB2 SESSION_SETUP Request

  • 2.2.6 SMB2 SESSION_SETUP Response

  • 2.2.7 SMB2 LOGOFF Request

  • 2.2.8 SMB2 LOGOFF Request

  • 3.3.5.5 Receiving an SMB2 SESSION_SETUP Request

  • 3.3.5.6 Receiving an SMB2 LOGOFF Request

Assumptions/Restrictions

NA

Scenario Design

This model has five scenarios:

Scenario NameSessionMgmtNewSession
DescriptionIt's a basic scenario to test how the server handles SESSION_SETUP Request and LOGOFF Request. Reconnection and binding is excluded.
MachineReadConfig;
(
 SetupConnection(ModelConnectionId.MainConnection,_);
 (
  SessionSetupRequest(ModelConnectionId.MainConnection,,,ModelSigned.SignFlagNotSet,,,ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
 )+;
 (
  (
   LogOffRequest(ModelConnectionId.MainConnection,_);
   (LogOffResponse
  )
 )*;
)
Scenario NameSessionMgmtReconnectSession
DescriptionThis scenario is to test session reconnection.
MachineReadConfig;
(
  SetupConnection(ModelConnectionId.MainConnection,_);
  SessionSetupRequest(ModelConnectionId.MainConnection, ModelSessionId.ZeroSessionId, ModelSessionId.ZeroSessionId, ModelSigned.SignFlagNotSet, ModelFlags.NotBinding, ModelUser.DefaultUser, ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
  (
    TerminateConnection(ModelConnectionId.MainConnection);
  )?;
  SetupConnection(ModelConnectionId.AlternativeConnection,_);
  SessionSetupRequest(ModelConnectionId.AlternativeConnection, ModelSessionId.ZeroSessionId, {ModelSessionId.MainSessionId, ModelSessionId.ZeroSessionId, ModelSessionId.AlternativeSessionId},ModelSigned.SignFlagNotSet,ModelFlags.NotBinding,ModelUser.DefaultUser,ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
)
Scenario NameSessionMgmtBindSession
DescriptionThis scenario is to test session binding.
MachineReadConfig;
(
  SetupConnection(ModelConnectionId.MainConnection,_);
SessionSetupRequest(ModelConnectionId.MainConnection,ModelSessionId.ZeroSessionId,ModelSessionId.ZeroSessionId,ModelSigned.SignFlagNotSet,ModelFlags.NotBinding,ModelUser.DefaultUser,ModelAllowReauthentication.NotAllowReauthentication);
  SessionSetupResponse;
  SetupConnection(ModelConnectionId.AlternativeConnection,_);
  SessionSetupRequest(ModelConnectionId.AlternativeConnection,{ModelSessionId.MainSessionId, ModelSessionId.ZeroSessionId, ModelSessionId.AlternativeSessionId},ModelSessionId.ZeroSessionId,,ModelFlags.Binding,,ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
)
Scenario NameSessionMgmtBindSessionAfterLogOff
DescriptionThis scenario is to test session binding after logoff.
MachineReadConfig;
(
  SetupConnection(ModelConnectionId.MainConnection,_);
  SessionSetupResponse;
  (
    LogOffRequest(ModelConnectionId.MainConnection,ModelSessionId.MainSessionId);
    (LogOffResponse
  );
  SetupConnection(ModelConnectionId.AlternativeConnection,_);
  SessionSetupRequest(ModelConnectionId.AlternativeConnection,{ModelSessionId.MainSessionId, ModelSessionId.ZeroSessionId, ModelSessionId.AlternativeSessionId},ModelSessionId.ZeroSessionId,,ModelFlags.Binding,,ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
)
Scenario NameSessionMgmtBindSessionAfterDisconnection
DescriptionThis scenario is to test session binding after disconnection.
MachineReadConfig;
(
  SetupConnection(ModelConnectionId.MainConnection,_);
  SessionSetupResponse;
  (
    TerminateConnection(ModelConnectionId.MainConnection);
  );
  SetupConnection(ModelConnectionId.AlternativeConnection,_);
  SessionSetupRequest(ModelConnectionId.AlternativeConnection,{ModelSessionId.MainSessionId, ModelSessionId.ZeroSessionId, ModelSessionId.AlternativeSessionId},ModelSessionId.ZeroSessionId,,ModelFlags.Binding,,ModelAllowReauthentication.AllowReauthentication);
  SessionSetupResponse;
)
Traditional Case

Scenario see SessionMgmt

Test IDSessionMgmt_ReconnectWithDifferentDialect
DescriptionThis test case is designed to test whether server can handle reconnect with different dialect.
Message SequenceClient1 sends NEGOTIATE request
Server sends NEGOTIATE response
Client1 sends SESSION_SETUP request with sessionid set zero
Server sends SESSION_SETUP response
Client1 disconnect.
Client2 sends NEGOTIATE request, with different dialect from the one used by Client1.
Server sends NEGOTIATE response
Client2 sends SESSION_SETUP request with SESSION_ID set to the value in the previous SESSION_SETUP response.
Expect server sends response with STATUS_USER_SESSION_DELETED.
Client2 disconnect.
Cluster Involved ScenarioNO

MultipleChannel

Traditional Case

Scenario see Scenario

Test IDMultipleChannel_NicRedundantOnClient
DescriptionOperate file via multi-channel with 2 Nics on client.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_2 to SUT NIC_1
NEGOTIATE
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Verify WRITE and READ data should be identical
Cluster Involved ScenarioNO
Test IDMultipleChannel_NicRedundantOnServer
DescriptionOperate file via multi-channel with 2 Nics on server.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_1 to SUT NIC_2
NEGOTIATE
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Verify WRITE and READ data should be identical
Cluster Involved ScenarioNO
Test IDMultipleChannel_MultiChannelOnSameNic
DescriptionOperate file via multi-channel on same Nic.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Verify WRITE and READ data should be identical
Cluster Involved ScenarioNO
Test IDNegative_MultipleChannel_SMB21
DescriptionOperate file via multi-channel with SMB21 dialect, expect failure with error code STATUS_REQUEST_NOT_ACCEPTED.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE with dialect SMB2.1
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_1 to SUT NIC_2
NEGOTIATE with dialect SMB2.1
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Expect failure with error code STATUS_REQUEST_NOT_ACCEPTED
Cluster Involved ScenarioNO
Test IDNegative_MultipleChannel_SMB2002
DescriptionOperate file via multi-channel with SMB2002 dialect, expect failure with error code STATUS_REQUEST_NOT_ACCEPTED.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE with dialect SMB2.1
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_1 to SUT NIC_2
NEGOTIATE with dialect SMB2.002
SESSION_SETUP binding to the previous one
TREE_CONNECT
CREATE
READ
Expect failure with error code STATUS_REQUEST_NOT_ACCEPTED
Cluster Involved ScenarioNO
Test IDMultipleChannel_SecondChannelSessionSetupFailAtFirstTime
DescriptionThis case is to test whether server calculates PreauthIntegrityHashValue correctly if it returns failure for the first session setup.
Message SequenceSETUP_CONNECTION from client NIC_1 to SUT NIC_1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
SETUP_CONNECTION from client NIC_2 to SUT NIC_2
NEGOTIATE
SESSION_SETUP binding to the previous one but with an invalid token
SESSION_SETUP binding to the previous one and succeed
READ
Verify WRITE and READ data should be identical
Cluster Involved ScenarioNO

Signing

Signing Model is designed to test the server can handle signing according to client request and server configuration.

The feature has 95 Model-Based test cases, 1 traditional test case

For traditional test case, please refer to section Signing

Model
Coverage

Signing Model covers all statements (except which are mentioned in "Assumptions/Restrictions") of the following sections:

  • 2.2.3 SMB2 NEGOTIATE Request

  • 2.2.4 SMB2 NEGOTIATE Response

  • 2.2.5 SMB2 SESSION_SETUP Request

  • 3.1.4.1 Signing An Outgoing Message

  • 3.2.5.1.3 Verifying the Signature

  • 3.2.5.3.1 Handling a New Authentication

  • 3.2.5.3.2 Handling a Reauthentication

Assumptions/Restrictions

This model doesn’t test the algorithm of calculating the signature, for which will be covered with traditional test cases.

Scenario Design

This model has one scenario:

Scenario NameSigning
DescriptionIt’s a basic scenario to test how the server handles signing.
MachineReadConfig;
(
 NegotiateRequest;
 NegotiateResponse;
 (
  SessionSetupRequest;
  SessionSetupResponse;
  (
   TreeConnectRequest;
   TreeConnectResponse;
  )?;
 )?;
);

TreeMgmt

TreeMgmt test the server behavior of receiving TreeConnect and TreeDisconnect.

Model
Coverage

TreeMgmt Model covers all statements (except which are mentioned in “Assumptions/Restrictions”) of the following sections:

  • 3.3.5.7 Receiving an SMB2 TREE_CONNECT Request

  • 3.3.5.8 Receiving an SMB2 TREE_DISCONNECT Request

  • 2.2.9 SMB2 TREE_CONNECT Request

  • 2.2.10 SMB2 TREE_CONNECT Response

  • 2.2.11 SMB2 TREE_DISCONNECT Request

  • 2.2.12 SMB2 TREE_DISCONNECT Response

Assumptions/Restrictions
  • This model only contains single session with single tree connect.

  • Does not cover encryption related logic which has been covered in Encryption model.

  • Does not cover session related logic which has been covered in Session Management model.

  • Does not cover validation of Negotiate logic which has been covered in Validate Negotiate Info model.

  • Does not cover signing related logic which will be covered in Signing model.

  • Does not cover Share Flags SMB2_SHAREFLAG_DFS and SMB2_SHAREFLAG_DFS_ROOT and Capability SMB2_SHARE_CAP_DFS in TREE_CONNECT response, which is in the scope of DFS test suite.

  • Does not cover Capabilities SMB2_SHARE_CAP_SCALEOUT, SMB2_SHARE_CAP_CLUSTER and SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY in TREE_CONNECT response, which is in the scope of Cluster test suite.

  • Does not cover Share Flag SMB2_SHAREFLAG_ENABLE_HASH in TREE_CONNECT response, which is in the scope of BranchCache test suite.

  • Does not cover Share Flag SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK in TREE_CONNECT response, which is in the scope of Leasing model and OpLock model.

  • Does not cover Share Flag SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM in TREE_CONNECT response, which is in the scope of Set/Query Info model.

  • Does not cover Share Flags SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS and SMB2_SHAREFLAG_FORCE_SHARED_DELETE and MaximalAccess in TREE_CONNECT response, which is in the scope of Create/Close Model.

  • Does not cover Offline. It costs much effort to change the SUT control adapter for one not important feature.

  • Only cover ShareType.Disk. Currently Share Type "Pipe" and "Print" is not in the scope of FileSharing Test Suite Family.

  • Does not cover detail test of Share Path (example, server name is NetBIOS, FQDN or IP address) in TreeConnect request, which is in the scope of MS-SRVS.

Scenario Design
Scenario NameResilientHandleBasic
DescriptionTreeMgmt Model basic
MachineReadConfig;
// Negotiate, SessionSetup
SetupConnection;
(TreeConnectRequest; TreeConnectResponse;)?;
(TreeDisconnectRequest; TreeDisconnectResponse;)+;
Traditional Case
Test IDTreeMgmt_SMB311_CLUSTER_RECONNECT
DescriptionOnce a client has successfully connected to a clustered share it must set the CLUSTER_RECONNECT flag on all subsequent clustered tree connect requests to the same server.
This test case is designed to test server can handle a TreeConnect request with flag SMB2_SHAREFLAG_CLUSTER_RECONNECT successfully.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsStart a client by sending the following requests: NEGOTIATE (dialect 3.11); SESSION_SETUP.
Client sends TREE_CONNECT request with flag SMB2_SHAREFLAG_CLUSTER_RECONNECT and expects STATUS_SUCCESS.
Tear down the client.
Cleanup

ValidateNegotiateInfo

Client uses an SMB2 IOCTL Request FSCTL_VALIDATE_NEGOTIATE_INFO to request validation of a previous SMB2 NEGOTIATE.

Model
Coverage

ValidateNegotiateInfo Model covers all statements of the following sections:

  • 3.3.5.15.12 Handling a Validate Negotiate Info Request

  • 2.2.31.4 VALIDATE_NEGOTIATE_INFO Request

  • 2.2.32.6 VALIDATE_NEGOTIATE_INFO Response

Assumptions/Restrictions
  • This model doesn’t cover all the parameters’ combination of Negotiate request.
Scenario Design
Scenario NameValidateNegotiateInfo
DescriptionBasic scenario to test how the server handles ValidateNegotiateInfo Request
MachineReadConfig;
SetupConnection; // Negotiate, Session Setup, Tree Connect
ValidateNegotiateInfoRequest;
(ValidateNegotiateInfoResponse
Traditional Case

Scenario see section Scenario

Test IDValidateNegotiateInfo_Negative_InvalidGuid
DescriptionTest whether the server terminates the transport connection and free the Connection object, if the Guid received in the VALIDATE_NEGOTIATE_INFO request structure is not equal to the Connection.ClientGuid.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having Guid not equal to original ClientGuid)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidDialects_NoCommonDialect
DescriptionTest whether server terminates the transport connection and free the connection object if no dialect is matched when determine the greatest common dialect between the dialects it implements and the dialects array of VALIDATE_NEGOTIATE_INFO request.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE with dialect larger or equal to 3.0
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having Dialect set to an unknown value)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidDialects_CommonDialectNotExpected
DescriptionTest whether the server terminates the transport connection and free the Connection object, if the value is not equal to Connection.Dialect when determine the greatest common dialect between the dialects it implements and the Dialects array of the VALIDATE_NEGOTIATE_INFO request.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE with dialect larger or equal to 3.0
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having Dialects set to {smb 2.002, smb 2.1})
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidGuid
DescriptionTest whether the server terminates the transport connection and free the Connection object, if the Guid received in the VALIDATE_NEGOTIATE_INFO request structure is not equal to the Connection.ClientGuid.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having Guid field different from the ClientGuid in Negotiate)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidSecurityMode
DescriptionTest whether the server terminates the transport connection and free the Connection object, if the SecurityMode received in the VALIDATE_NEGOTIATE_INFO request structure is not equal to Connection.ClientSecurityMode.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having SecurityMode field different from the one in Negotiate)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidCapabilities
DescriptionTest whether the server terminates the transport connection and free the Connection object, if Connection.ClientCapabilities is not equal to the Capabilities received in the VALIDATE_NEGOTIATE_INFO request structure.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having ClientCapabilities field different from the one in Negotiate)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_InvalidMaxOutputResponse
DescriptionTest whether the server terminates the transport connection and free the Connection object, if MaxOutputResponse in the IOCTL request is less than the size of a VALIDATE_NEGOTIATE_INFO Response.
PrerequisitesThe server implements dialect 3.0.
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
IOCTL (with FSCTL_VALIDATE_NEGOTIATE_INFO having MaxOutputResponse field less than the size of a VALIDATE_NEGOTIATE_INFO Response)
Expected server disconnects the connection
Cleanup
Test IDValidateNegotiateInfo_Negative_SMB311
DescriptionTest whether the server can terminate the transport connection when receiving a VALIDATE_NEGOTIATE_INFO request if the negotiated dialect is 3.11.
PrerequisitesThe server implements dialect 3.11.
Test Execution StepsNEGOTIATE with dialect 3.11
SESSION_SETUP
TREE_CONNECT
IOCTL (with valid FSCTL_VALIDATE_NEGOTIATE_INFO)
Expected server disconnects the connection
Cleanup

FileLevelTrim

This feature is to call IOCTL request with FSCTL_FILE_LEVEL_TRIM to trim unused space of a file.

Model

Will not cover this feature in model.

Traditional Case

Scenario see Scenario

Test IDFileLevelTrim_Negative_NonZeroKeyInRequest
DescriptionTest the server response when non-zero value is set to the Key field of FSCTL_FILE_LEVEL_TRIM request.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
CREATE
IOCTL (with FSCTL_FILE_LEVEL_TRIM, Key field is set to a non-zero random value)
Expect to get error response with "STATUS_INVALID_PARAMETER"
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

CopyOfflaod

This feature is call IOCTL request with FSCTL_OFFLOAD_READ and FSCTL_OFFLOAD_WRITE to copy file content.

Model

Will not cover this feature in model.

Traditional Case

Scenario see section Scenario

Test IDCopyOffload_CopyContentWithinSameFile
DescriptionThis test case is designed to test whether server can handle offload copy correctly when copy content in the same file.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request to create a test file.
Server sends CREATE response
Client sends WRITE request to prepare content test file.
Server sends WRITE response.
Client sends FLUSH request to make sure the content is written to backend storage.
Server sends FLUSH response.
Client sends IOCTL request with FSCTL_OFFLOAD_READ to ask server to generate the token of the 1st half of file content in the file for offload copy.
Server sends IOCTL response
Client sends IOCTL request with FSCTL_OFFLOAD_WRITE to ask server to copy the content to 2nd half in the file.
Server sends IOCTL response
Client sends READ request to read content of 2nd half in the file.
Server sends READ response
Compare the read content is identical to the content of 1st half in the file.
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

OperateOneFileFromTwoNodes

Model
Coverage

This model is designed to test the conflicting scenario:

Two clients do file operations to the same file by connecting to two Nodes of the scaleout file server. The file operations may have conflict.

This model covers part of the below sections:

  • 2.2.26 SMB2 LOCK Request

  • 3.3.5.14 Receiving an SMB2 LOCK Request

  • 2.2.13 SMB2 CREATE Request

  • 2.2.19 SMB2 READ Request

  • 2.2.21 SMB2 WRITE Request

  • 2.2.15 SMB2 CLOSE Request

Assumptions/Restrictions

N/A

Scenario Design
Scenario NameConflict
Description1. Prepare a test file and initialize two clients.
2. The first client does some file operation from one node to the test file successfully.
3. The second client does some file operation from another node to the same test file.
4. Verify the response to step 3.
MachinePreparation;
ConflictRequest;
ConflictResponse;

MixedOplockLease

Model
Coverage

This model is designed to test the below scenario:

One client requests Oplock, and another client requests Lease.

The model will verify if there should be an oplock or lease break, and if the granted OplockLevel or LeaseState is correct. (Note: the verification is based on Windows behavior)

This model covers part of the below sections:

  • 3.3.4.7 Object Store Indicates a Lease Break

  • 3.3.4.6 Object Store Indicates an Oplock Break

Assumptions/Restrictions

N/A

Scenario Design
Scenario NameOplockLeaseScenario
Description1. Initialize two clients.
2. The first client requests Oplock
3. The second client requests Lease
4. Verify if there's an oplock break and if the granted LeaseState is correct.
MachinePreparation;
RequestOplock;
RequestLease;
Verification;
Scenario NameLeaseOplockScenario
Description1. Initialize two clients.
2. The first client requests Lease
3. The second client requests Oplock
4. Verify if there's a lease break and if the granted OplockLevel is correct.
MachinePreparation;
RequestLease;
RequestOplock;
Verification;
Traditional Case

No traditional cases for this feature.

Compression

Compression tests the server behavior of sending and receiving compressed SMB2 messages.

Model

Will not cover this feature in model.

Traditional Case

Scenario see Scenario.

Test IDSMB2Compression_CompressedWriteRequest
DescriptionThis test case is designed to test whether server can handle compressed WRITE request correctly using supported compression algorithms.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all comression algorithm supported by SUT as below:
a. Client write copmressible data to server by sending WRITE request compressed with the given compression algorithm.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified.
c. Verifies the READ reponse is compressed with supported algorithm and data read out are equal to the written one.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_CompressibleReadResponse
DescriptionThis test case is designed to test whether server can compress read request correctly if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is compressible.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending uncompressed WRITE request.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is compressed with supported algorithm and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_IncompressibleReadResponse
DescriptionThis test case is designed to test whether server will not compress read request if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is incompressible.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write incopmressible data to server by sending uncompressed WRITE request.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ reponse is not compressed with supported algorithm is the reponse is not shrinkable by compression and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtFront
DescriptionThis test case is designed to test whether server can handle chained and compressed WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at front.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write compressible data to server by sending WRITE request chained and compressed with the given compression algorithm. The PatternV1 compressible data appear at front.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified.
c. Verifies the data read out are equal to the written one.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtEnd
DescriptionThis test case is designed to test whether server can handle chained and compressed WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at end.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write compressible data to server by sending WRITE request chained and compressed with the given compression algorithm. The PatternV1 compressible data appear at end.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified.
c. Verifies the data read out are equal to the written one.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtFrontAndEnd
DescriptionThis test case is designed to test whether server can handle chained and compressed WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at both front and end.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write compressible data to server by sending WRITE request chained and compressed with the given compression algorithm. The PatternV1 compressible data appear at both front and end.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified.
c. Verifies the data read out are equal to the written one.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressibleReadResponse
DescriptionThis test case is designed to test whether server can chain and compress read request correctly if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is compressible.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write compressible data to server by sending uncompressed WRITE request.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ response is chained and compressed with supported algorithm and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_LZNT1_LargeFile
DescriptionThis test case is designed to test whether server can decompress large file WRITE request and compress read response correctly using LZNT1.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZNT1; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte copmressible data to server by sending WRITE request compressed with LZNT1 for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ reponse is compressed with LZNT1 and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_LZ77_LargeFile
DescriptionThis test case is designed to test whether server can decompress large file WRITE request and compress read response correctly using LZ77.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZ77; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte copmressible data to server by sending WRITE request compressed with LZ77 for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ reponse is compressed with LZ77 and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_LZ77Huffman_LargeFile
DescriptionThis test case is designed to test whether server can decompress large file WRITE request and compress read response correctly using LZ77 Huffman.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to LZ77 Huffman; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write copmressible data to server by sending WRITE request compressed with LZ77 Huffman for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ reponse is compressed with LZ77 Huffman and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_CompressedWriteRequest_LargeFile
DescriptionThis test case is designed to test whether server can handle compressed large file WRITE request correctly using supported compression algorithms.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all comression algorithm supported by SUT as below:
a. Client write 1 megabyte copmressible data to server by sending WRITE request compressed with the given compression algorithm for multiple times to generate a large file.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
c. Verifies each READ reponse is compressed with supported algorithm and data read out are equal to the written ones.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_CompressibleReadResponse_LargeFile
DescriptionThis test case is designed to test whether server can compress large file read request correctly if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is compressible.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte copmressible data to server by sending uncompressed WRITE request for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ reponse is compressed with supported algorithm and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_LargeFile
DescriptionThis test case is designed to test whether server can decompress large file WRITE request and compress READ response correctly using chained compression and PatternV1.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to PatternV1 and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte compressible data to server by sending WRITE request chained and compressed with PatternV1 for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ response is chained and compressed with supported algorithm and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtFront_LargeFile
DescriptionThis test case is designed to test whether server can handle chained and compressed large file WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at front.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write 1 megabyte compressible data to server by sending WRITE request chained and compressed with the given compression algorithm for multiple times to generate a large file. The PatternV1 compressible data appear at front.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
c. Verifies each READ response is chained and compressed with supported algorithm and data read out are equal to the written ones.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtEnd_LargeFile
DescriptionThis test case is designed to test whether server can handle chained and compressed large file WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at end.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write 1 megabyte compressible data to server by sending WRITE request chained and compressed with the given compression algorithm for multiple times to generate a large file. The PatternV1 compressible data appear at end.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
c. Verifies each READ response is chained and compressed with supported algorithm and data read out are equal to the written ones.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressedWriteRequest_PatternV1AtFrontAndEnd_LargeFile
DescriptionThis test case is designed to test whether server can handle chained and compressed large file WRITE request correctly using supported compression algorithms. The PatternV1 compressible data appear at both front and end.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client iterates through all compression algorithm supported by SUT as below:
a. Client write 1 megabyte compressible data to server by sending WRITE request chained and compressed with the given compression algorithm for multiple times to generate a large file. The PatternV1 compressible data appear at both front and end.
b. Client read the data just written by sending READ request without SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
c. Verifies each READ response is chained and compressed with supported algorithm and data read out are equal to the written ones.
3. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_CompressibleReadResponse_LargeFile
DescriptionThis test case is designed to test whether server can chain and compress large file read request correctly if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is compressible.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write 1 megabyte compressible data to server by sending uncompressed WRITE request for multiple times to generate a large file.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified for multiple times until the end of the file.
4. Verifies each READ response is chained and compressed with supported algorithm and data read out are equal to the written ones.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_IncompressibleReadResponse
DescriptionThis test case is designed to test whether server will not chain or compress read request if SMB2_READFLAG_REQUEST_COMPRESSED is specified in request and response is incompressible.
PrerequisitesThe server implements dialect 3.11 and chained compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client write incompressible data to server by sending uncompressed WRITE request.
3. Client read the data just written by sending READ request with SMB2_READFLAG_REQUEST_COMPRESSED specified.
4. Verifies the READ response is not chained or compressed with supported algorithm and data read out are equal to the written one.
5. Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF.
Cleanup
Test IDSMB2Compression_InvalidCompressedPacketLength
DescriptionThis test case is designed to test whether server will disconnect the connection if it received a compressed message with invalid length.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with invalid length, which is less than the size of SMB2 COMPRESSION_TRANSFORM_HEADER.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup
Test IDSMB2Compression_InvalidDecompressedProtocolId
DescriptionThis test case is designed to test whether server will disconnect the connection if the ProtocolId in the decompressed message is invalid.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with the ProtocolId in the decompressed message is invalid, which is of value 0xFFFFFFFF.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup
Test IDSMB2Compression_InvalidCompressionAlgorithm
DescriptionThis test case is designed to test whether server will disconnect the connection if the CompressionAlgorithm in the compressed message is invalid.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with invalid CompressionAlgorithm with value 0x0004, which should be unsupported by SUT.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup
Test IDSMB2Compression_Chained_InvalidCompressionAlgorithmInCompressionPayloadHeader
DescriptionThis test case is designed to test whether server will disconnect the connection if it received a compressed message with invalid CompressionAlgorithm in compression payload header.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with invalid CompressionAlgorithm in compression payload header.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup
Test IDSMB2Compression_Chained_InvalidLengthInCompressionPayloadHeader
DescriptionThis test case is designed to test whether server will disconnect the connection if it received a compressed message with invalid Length in compression payload header.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with invalid Length in compression payload header.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup
Test IDSMB2Compression_Chained_PatternV1_InvalidCompressionPatternPayloadV1Repetitions
DescriptionThis test case is designed to test whether server will disconnect the connection if it received a compressed message with invalid Repetitions in compression pattern payload V1.
PrerequisitesThe server implements dialect 3.11 and compression feature.
Test Execution Steps1. Start a client to create a file by sending the following requests: 1. NEGOTIATE with compression algorithms set to all supported ones and chained compression enabled; 2. SESSION_SETUP; 3. TREE_CONNECT; 4. CREATE.
2. Client sends a compressed message with invalid Repetitions in compression pattern payload V1.
3. Verifies the SMB2 connection is closed by SUT.
Cleanup

NETWORK_INTERFACE_INFO

This feature is to call IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO to retrieve list of network interfaces from server.

Model

Will not cover this feature in model.

Traditional Case

Scenario see section Scenario

Test IDNetworkInterfaceInfo_Query_ReturnsErrorStatus
DescriptionTest that quering network interface returns error code when it fails.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO using invalid treeId to ask server to send list of network interfaces.
Server sends IOCTL response
Verify that IOCTL response status is STATUS_NETWORK_NAME_DELETED.
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDNetworkInterfaceInfo_Query_ReturnsIPv4IPv6
DescriptionTest that network interface info has IPv4 and IPv6.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO to ask server to send list of network interfaces.
Server sends IOCTL response
Verify that NETWORK_INTERFACE_INFO_Response contains IPv4 and IPv6 family.
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDNetworkInterfaceInfo_ChangeConnection_BindCurrentSession
DescriptionTest that current session is binded to new connection when different server IP is connected by client.
Prerequisites
Test Execution StepsClient sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends IOCTL request with FSCTL_QUERY_NETWORK_INTERFACE_INFO to ask server to send list of network interfaces.
Server sends IOCTL response
Verify that NETWORK_INTERFACE_INFO_Response contains alternate IP address
Client sends CLOSE request
Server sends CLOSE response
Client sends NEGOTIATE request using alternate IP address
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
Verify that alternate channel SessionId matches main channel SessionId
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

SMB2 Feature Combination

Following scenarios extend “SMB2 Feature Test” by adding more complex message sequence in test.

MultipleChannelWithReplay

Scenario
DescriptionReplay the request via alternative channel when main channel connection lost
Message SequenceCreate main channel via connection1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
Create alterative channel via connection2
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
Send CREATE request via main channel
CREATE (with no share access so that same CREATE without SMB2_FLAGS_REPLAY_OPERATION flag would fail)
Disconnect connection1
Replay the CREATE request via alternative channel
CREATE (with SMB2_FLAGS_REPLAY_OPERATION flag in header)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IdMultipleChannel_CreateReplay
DescriptionReplay the request via alternative channel when main channel connection lost
Prerequisites
Test Execution StepsCreate main channel via connection1
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Create alterative channel via connection2
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request (SMB2_SESSION_FLAG_BINDING)
Server sends SESSION_SETUP response
Send CREATE request via main channel
Client sends CREATE request (with no share access so that same CREATE without SMB2_FLAGS_REPLAY_OPERATION flag would fail)
Server sends CREATE response
Disconnect connection1
Replay the CREATE request via alternative channel
Client sends same CREATE request (with SMB2_FLAGS_REPLAY_OPERATION flag in header)
Server sends CREATE response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

MultipleChannelWithEncryption

Scenario
DescriptionOperate file via multi-channel with/without encryption on one channel or both channels
Message SequenceCreate main channel
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
WRITE
Create alterative channel
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDMultipleChannel_EncryptionOnBothChannels
DescriptionOperate file via multi-channel with encryption on both channels.
Prerequisites
Test Execution StepsCreate main channel
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
WRITE
Create alterative channel
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDMultipleChannel_Negative_EncryptionOnMainChannel
DescriptionOperate file via multi-channel only with encryption on main channel.
Prerequisites
Test Execution StepsCreate main channel
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
WRITE
Create alterative channel
NEGOTIATE (without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDMultipleChannel_Negative_EncryptionOnAlternativeChannel
DescriptionOperate file via multi-channel only with encryption on alternative channel
Prerequisites
Test Execution StepsCreate main channel
NEGOTIATE (without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
WRITE
Create alterative channel
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

MultipleChannelWithLease

Scenario
DescriptionOperate file via multi-channel with file lease and the lease break is expected from main channel
Message SequenceCreate main channel via connection1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state)
WRITE
Create alterative channel via connection2
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
From 3rd client to access the same file to trigger lease break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with specific create flag)
From main channel via connection1
Expected to receive LEASE_BREAK
Send LEASE_BREAK_ACK
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDMultipleChannel_FileLease
DescriptionOperate file via multi-channel with file lease and the lease break is expected from main channel.
Prerequisites
Test Execution StepsCreate main channel via connection1
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File, with SMB2_CREATE_REQUEST_LEASE_V2 and lease state)
WRITE
Create alterative channel via connection2
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ
From 3rd client to access the same file to trigger lease break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with specific create flag)
From main channel via connection1
Expected to receive LEASE_BREAK
Send LEASE_BREAK_ACK
TREE_DISCONNECT
LOGOFF
Cleanup

MultipleChannelWithLock

Scenario
DescriptionOperate file via multi-channel with lock operation on same/different channel
Message SequenceCreate main channel
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
WRITE
Create alterative channel
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ (the locking range, expect success)
WRITE (the locking range, expect success)
From client3 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From main/alternative channel to unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client3 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDMultipleChannel_LockUnlockOnSameChannel
DescriptionOperate file via multi-channel with lock operation on same channel.
Prerequisites
Test Execution StepsCreate main channel
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
WRITE
Create alterative channel
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ (the locking range, expect success)
WRITE (the locking range, expect failed)
From client3 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From main channel unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client3 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDMultipleChannel_LockUnlockOnDiffChannel
DescriptionOperate file via multi-channel with lock operation on different channels.
Prerequisites
Test Execution StepsCreate main channel
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (IPC$)
IOCTL (FSCTL_QUERY_NETWORK_INTERFACE_INFO)
TREE_CONNECT
CREATE (File)
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
WRITE
Create alterative channel
NEGOTIATE
SESSION_SETUP (SMB2_SESSION_FLAG_BINDING)
READ (the locking range, expect success)
WRITE (the locking range, expect failed)
From client3 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From alternative channel unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client3 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

AppInstanceWithEncryption

Scenario
DescriptionOperate files with/without encryption before client failover or after failover
Message SequenceBased on NIC1, create client1:
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With AppInstanceId)
WRITE
Disable NIC1
Switch to NIC2 and create Client2:
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With the same AppInstanceId)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDAppInstanceId_Encryption
DescriptionOperate files with encrypted message before and after client failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages encrypted
CREATE (With AppID, exclusive open)
WRITE
Disable NIC1
Switch to NIC2 and create Client2:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages encrypted
CREATE (With the same AppID)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDAppInstanceId_Negative_NoEncryptionInInitialOpen_EncryptionInReOpen
DescriptionOperate files with encrypted message before client failover but with unencrypted message after failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages encrypted
CREATE (With AppID, exclusive open)
WRITE
Disable NIC1
Switch to NIC2 and create Client2:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages unencrypted
CREATE (With the same AppID)
Expect error STATUS_ACCESS_DENIED in response
TREE_DISCONNECT
Expect error STATUS_ACCESS_DENIED in response
LOGOFF
Cleanup
Test IDAppInstanceId_Negative_EncryptionInInitialOpen_NoEncryptionInReOpen
DescriptionOperate files with encrypted message before failover but with unencrypted message after failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages encrypted
CREATE (With AppID, exclusive open)
Expect error STATUS_ACCESS_DENIED in response
Disable NIC1
Switch to NIC2 and create Client2:
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT (EncryptedShare)
Send following messages encrypted
CREATE (With the same AppID)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

AppInstanceWithLease

Scenario
DescriptionOperate file/directory with lease before client failover and expect no lease state is maintained after client failover
Message SequenceBased on NIC1, create client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File/Directory, with AppInstanceId, SMB2_CREATE_REQUEST_LEASE_V2 and lease state request)
WRITE
Disable NIC1
Switch to NIC2 and create client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File/Directory, with the same AppInstanceId with no lease state)
READ
From client3 on NIC2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
Receive the CREATE response (no lease state kept on server after client failover)
CLOSE
TREE_DISCONNECT
LOGOFF
From client2 no lease break notification received
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDAppInstanceId_FileLeasing_NoLeaseInReOpen
DescriptionOperate file with lease before client failover and expect no lease state is maintained after client failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with AppInstanceId, SMB2_CREATE_REQUEST_LEASE_V2 and lease state request)
WRITE
Disable NIC1
Switch to NIC2 and create client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with the same AppInstanceId with no lease state)
READ
From client3 on NIC2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
Receive the CREATE response (no lease state kept on server after client failover)
CLOSE
TREE_DISCONNECT
LOGOFF
From client2 no lease break notification received
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDAppInstanceId_DirectoryLeasing_NoLeaseInReOpen
DescriptionOperate file with lease before client failover and expect no lease state is maintained after client failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with AppInstanceId, SMB2_CREATE_REQUEST_LEASE_V2 and lease state request)
Disable NIC1
Switch to NIC2 and create client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (Directory, with the same AppInstanceId with no lease state)
From client3 on NIC2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
Receive the CREATE response (no lease state kept on server after client failover)
CLOSE
TREE_DISCONNECT
LOGOFF
From client2 no lease break notification received
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

AppInstanceWithLock

Scenario
DescriptionOperate file with lock during client failover and expect no lock is maintained after failover
Message SequenceBased on NIC1, create client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with AppInstanceId)
WRITE
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
Disable NIC1
Switch to NIC2 and create client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with the same AppInstanceId)
READ (the locking range, expect success)
From client3 on NIC2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
READ (the locking range, expect success)
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDAppInstanceId_Lock_ExpectNoLockInReOpen
DescriptionOperate file with lock during client failover and expect no lock is maintained after failover
Prerequisites
Test Execution StepsBased on NIC1, create client1:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with AppInstanceId)
WRITE
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
Disable NIC1
Switch to NIC2 and create client2:
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with the same AppInstanceId)
READ (the locking range, expect success)
From client3 on NIC2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
READ (the locking range, expect success)
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

CompoundWithEncryption

Scenario
DescriptionSend encrypted and compounded requests to SUT and verify response
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
Encrypted COMPOUND request
Verify COMPOUND response
TREEDISCONNECT
LOGOFF
Cluster Involved ScenarioNO
Test Case
Test IDCompound_Encrypt_RelatedRequests
DescriptionSend encrypted and compounded related requests (Create, Write and Close a same file) to SUT and verify response.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
Encrypted COMPOUND related request (CREATE, WRITE, and CLOSE to a same file)
Verify COMPOUND response
TREEDISCONNECT
LOGOFF
Test IDCompound_Encrypt_UnrelatedRequests
DescriptionSend encrypted and compounded unrelated requests (two Creates request to different files) to SUT and verify response.
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
Encrypted COMPOUND unrelated request (two Create requests to two different files)
Verify COMPOUND response
TREEDISCONNECT
LOGOFF

Server Failover Test

ScenarioTest CasesSMB 3.0 New FeatureHyper-V Scenario Importance
SWNGetInterfaceList2YesOptional
SWNRegistration9YesOptional
SWNAsyncNotification8YesCritical
AsmmetricShare4No (SMB 3.02 new feature)Critical
FileServerFailover5YesCritical
FileServerFailover_Encryption3YesOptional
FileServerFailover_Lease2YesCritical
FileServerFailover_Lock1YesCritical
FileServerFailover_DurableHandleV21YesCritical

SWNGetInterfaceList

Scenario
DescriptionGet SWN interface list.
Call SequenceWitnessrGetInterfaceList
Cluster Involved ScenarioYES
Test Case
Test IDBVT_SWNGetInterfaceList_ClusterSingleNode
DescriptionEnsure that the cluster does not response the interface list correctly until there is an available node.
PrerequisitesOnly Node1 provides the service. Node2 is disabled.
Test Execution StepsBind to cluster server
Invoke WitnessrGetInterfaceList
Client expects timeout
Enable Node2
Invoke WitnessrGetInterfaceList
Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
InterfaceGroupName = Node2
State = AVAILABLE
Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
InterfaceGroupName = Node1
State = AVAILABLE
Flags & INTERFACE_WITNESS(0x00000004) == false
Unbind
CleanupDeleteShareMapping
Test IDBVT_SWNGetInterfaceList_ScaleOutSingleNode
DescriptionEnsure that single node does not response the interface list correctly until there is an available node.
PrerequisitesOnly Node1 provides the service. Node2 is disabled.
Test Execution StepsBind to Node1
Invoke WitnessrGetInterfaceList
Client expects timeout
Enable Node2
Invoke WitnessrGetInterfaceList
Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
InterfaceGroupName = Node2
State = AVAILABLE
Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
InterfaceGroupName = Node1
State = AVAILABLE
Flags & INTERFACE_WITNESS(0x00000004) == false
Unbind
Cleanup

SWNRegistration

Scenario
DescriptionRegister and unregister the client.
Call SequenceWitnessrRegister
WitnessUnRegister
Cluster Involved ScenarioYES
Test Case
Test IDSWNRegistration_InvalidNetName
DescriptionRegister with WitnessrRegister and invalid netname.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegister with invalid NetName
8. Client expect Status = ERROR_INVALID_PARAMETER, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistration_InvalidVersion
DescriptionRegister with WitnessrRegister and invalid version.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegister with invalid Version
8. Client expect Status = ERROR_INVALID_PARAMETER, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistration_InvalidIpAddress
DescriptionRegister with WitnessrRegister and invalid IpAddress.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegister with invalid IpAddress
8. Client expect Status = ERROR_INVALID_STATE, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistration_InvalidUnRegister
DescriptionRegister with WitnessrRegister and Unregister the client twice.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegister
8. Invoke WitnessrUnRegister twice
9. Client expect Status != ERROR_NOT_FOUND
10. Unbind
Cleanup
Test IDSWNRegistrationEx_InvalidNetName
DescriptionRegister with WitnessrRegisterEx and invalid NetName.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegisterEx with invalid NetName
8. Client expect Status = ERROR_INVALID_PARAMETER, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistrationEx_InvalidVersion
DescriptionRegister with WitnessrRegisterEx and invalid version.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegisterEx with invalid Version
8. Client expect Status = ERROR_INVALID_PARAMETER, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistrationEx_InvalidIpAddress
DescriptionRegister with WitnessrRegisterEx and invalid IpAddress.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegisterEx with invalid IpAddress
8. Client expect Status = ERROR_INVALID_STATE, Context is EMPTY.
9. Unbind
Cleanup
Test IDSWNRegistrationEx_InvalidUnRegister
DescriptionRegister with WitnessrRegisterEx and Unregister the client twice.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegisterEx
8. Invoke WitnessrUnRegister twice
9. Client expect Status != ERROR_NOT_FOUND
10. Unbind
Cleanup
Test IDSWNRegistrationEx_InvalidShareName
DescriptionRegister with WitnessrRegisterEx and invalid sharename.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegisterEx with invalid sharename
8. Client expect Status = ERROR_INVALID_STATE
9. Unbind
Cleanup

SWNAsyncNotification

Scenario
DescriptionGet the asynchronous notification.
Call SequenceWitnessrRegister
WitnessrAsyncNotify
WitnessUnRegister
Cluster Involved ScenarioYES
Test Case
Test IDBVT_WitnessrRegister_SWNAsyncNotification_ClientMove
DescriptionRegister with WitnessrRegister and Get CLIENT_MOVE_NOTIFICATION on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7. Invoke WitnessrRegister
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Create a file on ScaleOutFs (Node01) and write buffer through SMB2.
11. Call Move-SmbWitnessClient –ClientName X –DestinationName NODE02 on NODE01.
12. Client expects Status = ERROR_SUCCESS, **RESP_ASYNC_NOTIFY with MessageType( CLIENT_MOVE_NOTIFICATION 2) **
13. Invoke WitnessrUnRegister with valid context
14. Client expects Status = ERROR_SUCCESS
15. Unbind
16. Read buffer and close the file on ScaleOutFs (Node02) through SMB2.
Cleanup
Test IDBVT_WitnessrRegisterEx_SWNAsyncNotification_ClientMove
DescriptionRegister with WitnessrRegisterEx and Get CLIENT_MOVE_NOTIFICATION on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7. Invoke WitnessrRegisterEx
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Create a file on ScaleOutFs (Node01) and write buffer through SMB2.
11. Call Move-SmbWitnessClient –ClientName X –DestinationName NODE02 on NODE01.
12. Client expects Status = ERROR_SUCCESS, **RESP_ASYNC_NOTIFY with MessageType( CLIENT_MOVE_NOTIFICATION 2) **
13. Invoke WitnessrUnRegister with valid context
14. Client expects Status = ERROR_SUCCESS
15. Unbind
16. Read buffer and close the file on ScaleOutFs (Node02) through SMB2.
Cleanup
Test IDSWNAsyncNotification_InvalidRequest
DescriptionAssure that server responses correctly with invalid context.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server(GeneralFS)
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrAsyncNotify with invalid context
8. Client expect Status = ERROR_NOT_FOUND
9. Unbind
Cleanup
Test IDWitnessrRegisterEx_SWNAsyncNotification_Timeout
DescriptionGet Timeout notification on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7. Invoke WitnessrRegisterEx with KeepAliveTimout(10s)
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Client expects Status = ERROR_TIMEOUT
11. Invoke WitnessrUnRegister with valid context
12. Client expects Status = ERROR_SUCCESS
13. Unbind
Cleanup
Test IDBVT_WitnessrRegisterEx_SWNAsyncNotification_ShareMove
DescriptionGet SHARE_MOVE_NOTIFICATION on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName = Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7 Invoke WitnessrRegisterEx with ShareName(SMBClustered”)
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Call Move-ClusterSharedVolume -Name “SMBScaleOutDisk” on scaleout cluster.
11. Client expects Status = ERROR_SUCCESS, **RESP_ASYNC_NOTIFY with MessageType( SHARE_MOVE_NOTIFICATION 3) **
12. Invoke WitnessrUnRegister with valid context
13. Client expects Status = ERROR_SUCCESS
14. Unbind
Cleanup
Test IDBVT_WitnessrRegisterEx_SWNAsyncNotification_IPChange
DescriptionGet IP_CHANGE_NOTIFICATION on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName = Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7 Invoke WitnessrRegisterEx with Flags(WITNESS_REGISTER_IP_NOTIFICATION 0x00000001)
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Disable and enable network adapter for Node01.
11. Client expects Status = ERROR_SUCCESS, **RESP_ASYNC_NOTIFY with MessageType( IP_CHANGE_NOTIFICATION 4) **
12. Invoke WitnessrUnRegister with valid context
13. Client expects Status = ERROR_SUCCESS
14. Unbind
Cleanup

AsmmetricShare

In dialect 3.02, a new flag SMB2_SHARE_CAP_ASYMMETRIC 0x00000080 is introduced in TREE_CONNECT.Response.Capabilities. This flag indicates the share is an asymmetric share and the client needs to register SWN witness notification to the server. If the server finds that the client didn’t connect the optimum node, the owner node of the asymmetric share, the server will send an IP_CHANGE_NOTIFICATION to the client, and the client should reconnect to the optimum node.

Scenario
DescriptionTest the server behavior when client connect to asymmetric share.
Call SequenceConnect to asymmetric share
Register SWN witness notification to the server
Cluster Involved ScenarioYES
Test Case
Test IDAsymmetricShare_OnNonOptimumNode
DescriptionThis test case is designed to test asymmetric share when the client connects to the asymmetric share on the non-optimum node.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
WitnessrGetInterfaceList
WitnessrRegisterEx
WitnessrAsyncNotify
WitnessrUnRegister
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDAsymmetricShare_OnOptimumNode
DescriptionThis test case is designed to test asymmetric share when the client connects to the asymmetric share on the optimum node.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
WitnessrGetInterfaceList
WitnessrRegisterEx
WitnessrAsyncNotify
WitnessrUnRegister
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDAsymmetricShare_OnNonScaleOutShare
DescriptionThis test case is designed to test asymmetric share when the client connects to the non scaleout share.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
WitnessrGetInterfaceList
WitnessrRegisterEx
WitnessrAsyncNotify
WitnessrUnRegister
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDAsymmetricShare_OnSmb30
DescriptionThis test case is designed to test asymmetric share when the client connects to the non-optimum node with Smb30 dialect.
Prerequisites
Test Execution StepsNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
WitnessrGetInterfaceList
WitnessrRegisterEx
WitnessrAsyncNotify
WitnessrUnRegister
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE
WRITE
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

FileServerFailover

Scenario
DescriptionFile sharing cluster failover
Message SequenceNEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle request)
WRITE
Disable current node of the Cluster which owns the connection
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (With durable handle reconnect)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_FileServer
DescriptionThis test case is designed to test whether server can handle failover to another node of continuous available file servers.
Prerequisites
Test Execution StepsStart a client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT to GeneralFileServer.
Client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 with PERSISTENT flag set.
Client sends WRITE request to write content to the file.
Client sends FLUSH request.
Disable owner node for general file server or the node currently provides the access for scale-out file server.
Wait for available server.
Client sends NEGOTIATE request with the same clientguid of previous client.
Client sends SESSION_SETUP request with the same SESSION_ID of previous client.
Client retries TREE_CONNECT until succeed or timeout because network path may not be available immediately.
Client retries to send CREATE request with SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 context with PERSISTENT flag set until succeed or timeout.
Client sends READ request to read content.
Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF
CleanupEnable Node1
Test IDFileServerFailover_ScaleOutFileServer
DescriptionThis test case is designed to test whether server can handle failover to another node of continuous available scale out file servers.
Prerequisites
Test Execution StepsStart a client by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT to ScaleOutFileServer.
Client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 with PERSISTENT flag set.
Client sends WRITE request to write content to the file.
Client sends FLUSH request.
Disable owner node for general file server or the node currently provides the access for scale-out file server.
Wait for available server.
Client sends NEGOTIATE request with the same clientguid of previous client.
Client sends SESSION_SETUP request with the same SESSION_ID of previous client.
Client retries TREE_CONNECT until succeed or timeout because network path may not be available immediately.
Client retries to send CREATE request with SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 context with PERSISTENT flag set until succeed or timeout.
Client sends READ request to read content.
Tear down the client by sending the following requests: CLOSE; TREE_DISCONNECT; LOG_OFF
CleanupEnable Node1
Test IDFileServerFailover_ScaleOutFileServer_ReconnectWithoutFailover
DescriptionEnsure persistent handle could be re-connected via connection with another node without failover
Prerequisites
Test Execution StepsEstablish connection to node01
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with CREATE_DURABLE_HANDLE_REQUEST_V2 create context
Server sends CREATE response
Client sends WRITE request
Server sends WRITE response
Establish connection to node02
Repeat step 1 to 7
Client sends CREATE request with SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2
Server sends CREATE response
Client sends READ request
Server sends READ response
Client sends CLOSE request
Server sends CLOSE response
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup
Test IDSWNFileServerFailover_FileServer
DescriptionGet WitnessrAsyncNotify notification on cluster server.
Prerequisites
Test Execution Steps1. GetClusterResourceOwner
2. Bind to cluster server(GeneralFS)
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = ClusterResourceOwner
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to valid node
7. Invoke WitnessrRegister
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Create a file on cluster (GeneralFS) and write buffer through SMB2.
11. Disable ClusSvc on ClusterResourceOwner
12. Client expects Status = ERROR_SUCCESS, RESOURCE_CHANGE
- ChangeType = 0xFFFFFFFF
- ResourceName = ClusterResourceOwner
13. Invoke WitnessrAsyncNotify with valid context
14. Client expects Status = ERROR_SUCCESS, RESOURCE_CHANGE
- ChangeType = 0x00000001
- ResourceName = NewNode
15. Invoke WitnessrUnRegister with valid context
16. Client expects Status = ERROR_SUCCESS
17. Unbind
18. Read buffer and close the file on cluster (GeneralFS) through SMB2.
Cleanup
Test IDSWNFileServerFailover_ScaleOutFileServer
DescriptionGet WitnessrAsyncNotify notification on scaleout cluster server.
Prerequisites
Test Execution Steps1. Get the address(Node01) of ScaleOutFs
2. Bind to Node01
3. Invoke WitnessrGetInterfaceList
4. Client expects Status = ERROR_SUCCESS, InterfaceList contains interface with
- InterfaceGroupName != Node02
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == true
and contains interface with
- InterfaceGroupName = Node01
- State = AVAILABLE
- Flags & INTERFACE_WITNESS(0x00000004) == false
5. Unbind
6. Bind to NODE02
7. Invoke WitnessrRegister
8. Client expect Status = ERROR_SUCCESS, Context is not EMPTY.
9. Invoke WitnessrAsyncNotify with valid context
10. Create a file on ScaleOutFs (Node01) and write buffer through SMB2.
11. Disable ClusSvc on ClusterResourceOwner
12. Client expects Status = ERROR_SUCCESS, RESOURCE_CHANGE
- ChangeType = 0xFFFFFFFF
- ResourceName = Node01
13. Invoke WitnessrAsyncNotify with valid context
14. Client expects Status = ERROR_SUCCESS, RESOURCE_CHANGE
- ChangeType = 0x00000001
- ResourceName = Node02
15. Invoke WitnessrUnRegister with valid context
16. Client expects Status = ERROR_SUCCESS
17. Unbind
18. Read buffer and close the file on ScaleOutFs (Node02) through SMB2.
Cleanup

FileServerFailover_Encryption

Scenario
DescriptionOperate files with/without encryption before/after server failover and after failover
Message SequenceFrom client1
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle request)
WRITE
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE (with/without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With durable handle reconnect)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_Encryption
DescriptionOperate files with encryption before server failover and after failover
Prerequisites
Test Execution StepsFrom client1
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle request)
WRITE
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With durable handle reconnect)
READ
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDFileServerFailover_Negative_EncryptionBeforeFailover_NoEncryptionAfterFailover
DescriptionOperate files with encryption before server failover but without encryption after failover
Prerequisites
Test Execution StepsFrom client1
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle request)
WRITE
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE (without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With durable handle reconnect)
Expect error STATUS_ACCESS_DENIED
in response
TREE_DISCONNECT
Expect error STATUS_ACCESS_DENIED
in response
LOGOFF
Cleanup
Test IDFileServerFailover_Negative_NoEncryptionBeforeFailover_EncrytpionAfterFailover
DescriptionOperate files without encryption before failover but with encryption after failover
Prerequisites
Test Execution StepsFrom client1
NEGOTIATE (without SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle request)
Expect error STATUS_ACCESS_DENIED in response
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE (with SMB2_GLOBAL_CAP_ENCRYPTION)
SESSION_SETUP
TREE_CONNECT
CREATE (With durable handle reconnect)
Expect error STATUS_OBJECT_NAME_NOT_FOUND
in response
TREE_DISCONNECT
LOGOFF
Cleanup

FileServerFailover_Lease

Scenario
DescriptionOperate file/directory with lease and durable handle before server failover and expect lease break notification
Message Sequence**From client1 **
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with durable handle and SMB2_CREATE_REQUEST_LEASE_V2 and lease state)
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, durable handle request with same lease state)
From client3 to access same file to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
From client2
Receive LEASE_BREAK
Send LEASE_BREAK_ACK
CLOSE
TREE_DISCONNECT
LOGOFF
From client3
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_DirectoryLeasing
DescriptionOperate directory with lease and durable handle before server failover and expect lease break notification
Prerequisites
Test Execution Steps**From client1 **
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (directory, with durable handle and SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (directory, durable handle request with same lease state SMB2_LEASE_READ_CACHING
From client3 to access same file to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with DELETE)
From client2
Receive LEASE_BREAK
Send LEASE_BREAK_ACK
CLOSE
TREE_DISCONNECT
LOGOFF
From client3
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup
Test IDFileServerFailover_FileLeasing
DescriptionOperate file with lease and durable handle before server failover and expect lease break notification
Prerequisites
Test Execution Steps**From client1 **
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with durable handle and SMB2_CREATE_REQUEST_LEASE_V2 and lease state SMB2_LEASE_READ_CACHING
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, durable handle request with same lease state SMB2_LEASE_READ_CACHING
From client3 to access same file to trigger leasing break
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with WRITE)
From client2
Receive LEASE_BREAK
Send LEASE_BREAK_ACK
CLOSE
TREE_DISCONNECT
LOGOFF
From client3
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

FileServerFailover_Lock

Scenario
Test caseFileServer_Failover_Lock
DescriptionOperate files with lock during failover and expect the lock is maintained after failover
Message SequenceFrom client1 open a file and lock a specific range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with durable handle request)
WRITE
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle reconnect)
READ (the locking range, expect success)
WRITE (the locking range, expect success)
From client3 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From client2 unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
**From client3 try to write the range **
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_Lock
DescriptionOperate files with lock during failover and expect the lock is maintained after failover
Prerequisites
Test Execution StepsFrom client1 open a file and lock a specific range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File, with durable handle request)
WRITE
LOCK (with SMB2_LOCKFLAG_SHARED_LOCK in SMB2_LOCK_ELEMENT)
Disable current node of the Cluster which owns the connection
From client2
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (with durable handle reconnect)
READ (the locking range, expect success)
WRITE (the locking range, expect success)
From client3 open the same file and try to read and write the locking range
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE (File)
READ (the locking range, expect success)
WRITE (the locking range, expect fail)
From client2 unlock the range
LOCK (with SMB2_LOCKFLAG_UNLOCK in SMB2_LOCK_ELEMENT)
CLOSE
TREE_DISCONNECT
LOGOFF
From client3 try to write the range
WRITE (the locking range, expect success)
CLOSE
TREE_DISCONNECT
LOGOFF
Cleanup

FileServerFailover_DurableHandleV2

Scenario
DescriptionTest the CREATE request from different client could not success after failover when persistent handle is requested
Message SequenceFrom one client open a file and request persistent handle
NEGOTIATE
SESSION_SETUP
TREE_CONNECT
CREATE(with CREATE_DURABLE_HANDLE_REQUEST_V2 create context)
Disable Node1to simulate failover
From different client try to open the same file
Repeat step 1 to 3
CREATE (Incompatible share access with previous CREATE request and will result violation)
Expect error in response from server
TREE_DISCONNECT
LOGOFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_BlockCreateFromDifferentClient
DescriptionTest the CREATE request from different client could succeed after failover when persistent handle is requested
Prerequisites
Test Execution StepsFrom one client open a file and request persistent handle
Client sends NEGOTIATE request
Server sends NEGOTIATE response
Client sends SESSION_SETUP request
Server sends SESSION_SETUP response
According to the status code of last step, client may send more SESSION_SETUP request as needed
Client sends TREE_CONNECT request
Server sends TREE_CONNECT response
Client sends CREATE request with CREATE_DURABLE_HANDLE_REQUEST_V2 create context
Server sends CREATE response
Disable Node1to simulate failover
From different client try to open the same file
Repeat step 1 to 7
Client sends CREATE request
Expect error in response from server
Client sends TREE_DISCONNECT request
Server sends TREE_DISCONNECT response
Client sends LOGOFF request
Server sends LOGOFF response
Cleanup

FileServerFailover_SMB311_Redirect_To_Owner_SOFS

Scenario
DescriptionTest server can handle a TreeConnect request with flag SMB2_SHAREFLAG_REDIRECT_TO_OWNER when SMB dialect is 3.1.1 and share type includes STYPE_CLUSTER_SOFS.
Message Sequence1. Start a client by sending the following requests: 1. NEGOTIATE; 2. SESSION_SETUP;
2. Client sends TREE_CONNECT request with TREE_CONNECT flag SMB2_SHAREFLAG_REDIRECT_TO_OWNER.
3. Tear down the client by sending LOG_OFF
Cluster Involved ScenarioYES
Test Case
Test IDFileServerFailover_SMB311_Redirect_To_Owner_SOFS
DescriptionTest server can handle a TreeConnect request with flag SMB2_SHAREFLAG_REDIRECT_TO_OWNER when SMB dialect is 3.1.1 and share type includes STYPE_CLUSTER_SOFS.
Prerequisites
Test Execution StepsCreate Client
NEGOTIATE
SESSION_SETUP
TREE_CONNECT (with SMB2_SHAREFLAG_REDIRECT_TO_OWNER)
LOGOFF
Cleanup

FSRVP Test

ScenarioTest CasesSMB 3.0 New FeatureHyper-V Scenario Importance
VSSOperateShadowCopySet6YesCritical
VSSSetContext5YesCritical
VSSAbortShadowCopySet3YesCritical

VSSOperateShadowCopySet

Scenario
DescriptionOperate a shadow copy set.
Call SequenceIsPathSupported
GetSupportedVersion
SetContext
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
Cluster Involved ScenarioYES
Test Case
Test IDBVT_VSSOperateShadowCopySet_WritableSnapshot_GeneralFileServer
DescriptionCheck if the general file server supports the VSS provider to create a writable snapshot for remote files.
Prerequisites
Test Execution StepsIsPathSupported("\GeneralFS.contoso.com\SMBBasic")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the success.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDBVT_VSSOperateShadowCopySet_WritableSnapshot_ScaleoutFileServer
DescriptionCheck if the scaleout file server supports the VSS provider to create a writable snapshot for remote files.
Prerequisites
Test Execution StepsIsPathSupported("\ScaleOutFS.contoso.com\SMBBasic")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the success.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDBVT_VSSOperateShadowCopySet_WritableSnapshot_SingleNode
DescriptionCheck if the server supports the VSS provider to create a writable snapshot for remote files.
Prerequisites
Test Execution StepsIsPathSupported("\Node01\SMBBasic")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the success.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSOperateShadowCopySet_DifferentNodeSharePath
DescriptionCheck if the server returns correctly when adding different sharePath on multi nodes to a shadow copy set.
Prerequisites
Test Execution StepsIsPathSupported("\Node01\SMBBasic")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet("\Node01\SMBBasic")
AddToShadowCopySet("\Node02\SMBBasic")
Expect the server returns an error code E_INVALIDARG (0x80070057).
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDBVT_VSSOperateShadowCopySet_ClusterSharePath_OwnerNode
DescriptionCheck if the server returns correctly when adding different sharePath on the cluster and the owner node to a shadow copy set.
Prerequisites
Test Execution StepsGet the owner of cluster resource "GeneralFS"
IsPathSupported("\GeneralFS\SMBClustered")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet("\GeneralFS\SMBClustered")
AddToShadowCopySet("\Owner\SMBBasic")
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the success.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDBVT_VSSOperateShadowCopySet_ClusterSharePath_NonOwnerNode
DescriptionCheck if the server returns correctly when adding different sharePath on the cluster and the non-owner node to a shadow copy set.
Prerequisites
Test Execution StepsGet the owner of cluster resource "GeneralFS"
IsPathSupported("\GeneralFS\SMBClustered")
GetSupportedVersion
SetContext(0x00400000)
StartShadowCopySet
AddToShadowCopySet("\GeneralFS\SMBClustered")
AddToShadowCopySet("\NonOwner\SMBBasic")
Expect the server returns an error code E_INVALIDARG (0x80070057).
CleanupAbortShadowCopySet
DeleteShareMapping

VSSSetContext

Scenario
DescriptionTest important context.
Call SequenceIsPathSupported
GetSupportedVersion
SetContext
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
Cluster Involved ScenarioNO
Test Case
Test IDBVT_VSSSetContext_ReadonlySnapshot_BACKUP
DescriptionCheck if the server supports FsrvpContextValues.FSRVP_CTX_BACKUP
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000002)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the failure.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSSetContext_ReadonlySnapshot_APP_ROLLBACK
DescriptionCheck if the server supports FsrvpContextValues.FSRVP_CTX_APP_ROLLBACK
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x0000000B)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the failure.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSSetContext_ReadonlySnapshot_NAS_ROLLBACK
DescriptionCheck if the server supports FsrvpContextValues.FSRVP_CTX_NAS_ROLLBACK (0x00000010).
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000010)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the failure.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSSetContext_ReadonlySnapshot_FILE_SHARE_BACKUP
DescriptionCheck if the server supports FsrvpContextValues.FSRVP_CTX_FILE_SHARE_BACKUP (0x00000019).
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000019)
StartShadowCopySet
AddToShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
Create a file in the exposed share and expect the failure.
RecoveryCompleteShadowCopySet
IsPathShadowCopied
DeleteShareMapping
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSSetContext_Invalid
DescriptionCheck if the server does not support FsrvpShadowCopyAttributes.FSRVP_ATTR_NO_AUTO_RECOVERY
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00400002)
Expect the server returns an error code FSRVP_E_UNSUPPORTED_CONTEXT (0x8004231B).
CleanupAbortShadowCopySet
DeleteShareMapping

VSSAbortShadowCopySet

Scenario
DescriptionTest to abort a shadow copy set in specific state.
Call SequenceIsPathSupported
GetSupportedVersion
SetContext
StartShadowCopySet (AbortShadowCopySet)
AddToShadowCopySet (AbortShadowCopySet)
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
GetShareMapping
RecoveryCompleteShadowCopySet (AbortShadowCopySet)
IsPathShadowCopied
DeleteShareMapping
Cluster Involved ScenarioNO
Test Case
Test IDVSSAbortShadowCopySet_Started
DescriptionCheck if the server supports AbortShadowCopySet after calling StartShadowCopySet.
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000000)
StartShadowCopySet
AbortShadowCopySet
Expect the server returns SUCCESS(0x00000000)
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSAbortShadowCopySet_Added
DescriptionCheck if the server supports AbortShadowCopySet after calling AddShadowCopySet.
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000000)
StartShadowCopySet
AddShadowCopySet
AbortShadowCopySet
Expect the server returns SUCCESS(0x00000000)
CleanupAbortShadowCopySet
DeleteShareMapping
Test IDVSSAbortShadowCopySet_Recovered
DescriptionCheck if the server responses with FSRVP_E_BAD_STATE when calling AbortShadowCopySet after called RecoveryCompleteShadowCopySet.
Prerequisites
Test Execution StepsIsPathSupported
GetSupportedVersion
SetContext(0x00000000)
StartShadowCopySet
AddShadowCopySet
PrepareShadowCopySet
CommitShadowCopySet
ExposeShadowCopySet
RecoveryCompleteShadowCopySet
AbortShadowCopySet
Expect the server returns an error code FSRVP_E_BAD_STATE(0x80042301)
CleanupAbortShadowCopySet
DeleteShareMapping

RSVD Test

ScenarioTest Cases
OpenCloseSharedVHD3
TunnelOperationToSharedVHD6
ReadWriteSharedVHD2
QuerySharedVirtualDiskSupport1
TwoClientsAccessSameSharedVHD2
QueryVHDSetFileInfo2
ConvertVHDtoVHDSet1
Checkpoint4
ExtractAndOptimizeVHDSet2
ChangeTracking1
Resize1

OpenCloseSharedVHD

Scenario
DescriptionCheck if server handles the request to open/close a shared virtual disk file correctly.
Message SequenceOpenSharedVirtualDisk
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_OpenCloseSharedVHD_V1
DescriptionCheck if the server supports V1 opening/closing a shared virtual disk file.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file with SMB2 create context SVHDX_OPEN_DEVICE_CONTEXT and expects success.
Client closes the file and expect success.
CleanupN/A
Test IDBVT_OpenCloseSharedVHD_V2
DescriptionCheck if the server supports V2 opening/closing a shared virtual disk file.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file with SMB2 create context SVHDX_OPEN_DEVICE_CONTEXT_V2 and expects success.
Client closes the file and expect success.
CleanupN/A
Test IDReconnectSharedVHDWithoutDeviceContext
DescriptionCheck if the client can reconnect the persistent handle to the shared virtual disk file without carrying device context.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file with SMB2 create contexts SVHDX_OPEN_DEVICE_CONTEXT and SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 (persistent bit is set).
Client disconnects from the server.
Client reconnects the persistent handle without create context SVHDX_OPEN_DEVICE_CONTEXT and expects success.
CleanupN/A

TunnelOperationToSharedVHD

Scenario
DescriptionCheck if server handles the tunnel operation request to a shared virtual disk file correctly.
Message SequenceOpenSharedVirtualDisk
TunnelOperation
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_TunnelGetFileInfoToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_GET_FILE_INFO_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends tunnel operation RSVD_TUNNEL_GET_FILE_INFO_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelSCSIToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_SCSI_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelCheckConnectionStatusToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_CHECK_CONNECTION_STATUS_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends tunnel operation RSVD_TUNNEL_CHECK_CONNECTION_STATUS_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelSRBStatusToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_SRB_STATUS_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Read fail
Client sends tunnel operation RSVD_TUNNEL_SRB_STATUS_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelGetDiskInfoToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_GET_DISK_INFO_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends tunnel operation RSVD_TUNNEL_GET_DISK_INFO_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelValidateDiskToSharedVHD
DescriptionCheck if server supports handling tunnel operation RSVD_TUNNEL_VALIDATE_DISK_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends tunnel operation RSVD_TUNNEL_VALIDATE_DISK_OPERATION to server and expects success.
Client closes the file.
CleanupN/A

ReadWriteSharedVHD

Scenario
DescriptionCheck if server handles Read/Write request to a shared virtual disk file correctly.
Message SequenceOpenSharedVirtualDisk
ReadContent
WriteContent
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_ReadSharedVHD
DescriptionCheck if server handles Read request to a shared virtual disk file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client reads file content successfully.
Client closes the file.
CleanupN/A
Test IDBVT_WriteSharedVHD
DescriptionCheck if server handles Write request to a shared virtual disk file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client writes file content successfully.
Client closes the file.
CleanupN/A

QuerySharedVirtualDiskSupport

Scenario
DescriptionCheck if server handles SHARED_VIRTUAL_DISK_SUPPORT request to a shared virtual disk file correctly.
Message SequenceOpenSharedVirtualDisk
QuerySharedVirtualDiskSupport
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_QuerySharedVirtualDiskSupport
DescriptionCheck if server handles SHARED_VIRTUAL_DISK_SUPPORT request to a shared virtual disk file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file successfully.
Client sends SVHDX_SHARED_VIRTUAL_DISK_SUPPORT_REQUEST to server and expects success.
Client closes the file.
CleanupN/A

TwoClientsAccessSameSharedVHD

Scenario
DescriptionCheck if server handles requests to the same shared virtual disk file from two clients correctly.
Message SequenceThe first client does some operation to the shared virtual disk file.
The second client does some operation to the same shared virtual disk file.
The two clients closes the shared virtual disk file.
Cluster Involved ScenarioYES
Test Case
Test IDTwoClientsReadSameSharedVHD
DescriptionCheck if server handles Read request to a shared virtual disk file from two clients correctly.
Prerequisites
Test Execution StepsThe first client opens a shared virtual disk file successfully.
The first client reads file content successfully.
The second client opens the same shared virtual disk file successfully.
The second client reads file content successfully.
The first client closes the file.
The second client closes the file.
CleanupN/A
Test IDTwoClientsWriteSameSharedVHD
DescriptionCheck if server handles Write request to a shared virtual disk file from two clients correctly.
PrerequisitesN/A
Test Execution StepsThe first client opens a shared virtual disk file successfully.
The first client writes file content successfully.
The second client opens the same shared virtual disk file successfully.
The second client writes file content successfully.
The first client closes the file.
The second client closes the file.
CleanupN/A

QueryVHDSetFileInfo

Scenario
DescriptionCheck if server handles the tunnel operation request to query a shared virtual disk set file information correctly.
Message SequenceOpenSharedVirtualDisk
SvhdxTunnelVhdSetQueryInformation
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_Query_VHDSet_FileInfo_SnapshotList
DescriptionCheck if server supports handling tunnel operation SVHDX_TUNNEL_VHDSET_FILE_QUERY_INFORMATION_REQUEST while SetFileInfo is set to SvhdxVHDSetFileInformationTypeSnapshotList
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends tunnel operation SVHDX_TUNNEL_VHDSET_FILE_QUERY_INFORMATION_REQUEST with SetFileInfo set to SvhdxVHDSetFileInformationTypeSnapshotList to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_Query_VHDSet_FileInfo_SnapshotEntry
DescriptionCheck if server supports handling tunnel operation SVHDX_TUNNEL_VHDSET_FILE_QUERY_INFORMATION_REQUEST while SetFileInfo is set to SvhdxVHDSetFileInformationTypeSnapshotEntry
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends tunnel operation SVHDX_TUNNEL_VHDSET_FILE_QUERY_INFORMATION_REQUEST with SetFileInfo set to SvhdxVHDSetFileInformationTypeSnapshotEntry to server and expects success.
Client closes the file.
CleanupN/A

ConvertVHDtoVHDSet

Scenario
DescriptionCheck if server handles the tunnel operation request to convert a shared virtual disk file into a shared virtual disk set file correctly.
Message SequenceOpenSharedVirtualDisk
SvhdxMetaOperationStart
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_Convert_VHDFile_to_VHDSetFile
DescriptionCheck if server supports handling tunnel operation SVHDX_META_OPERATION_START_REQUEST with SVHDX_META_OPERATION_CONVERT_TO_VHDSET in the payload to convert the .vhdx file into the .vhds file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends tunnel operation SVHDX_META_OPERATION_START_REQUEST with SVHDX_META_OPERATION_CONVERT_TO_VHDSET structure in the payload to server and expects success.
Client closes the file.
CleanupN/A

Checkpoint

Scenario
DescriptionCheck if server handles the tunnel operation request to create, delete, apply a checkpoint on a shared virtual disk set file, including querying virtual disk changes between snapshots and opening the virtual disk file by a target specifier.
Message SequenceOpenSharedVirtualDisk
SvhdxMetaOperationStart
SvhdxMetaOperationStart
SvhdxTunnelDeleteSnapshot
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_Create_Delete_Checkpoint
DescriptionCheck if server supports handling tunnel operation to create and delete checkpoint on a shared virtual disk set file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the first SVHDX_META_OPERATION_START_REQUEST with SVHDX_META_OPERATION_CREATE_SNAPSHOT structure in the payload to server to do initialization and expects success.
Client sends the second SVHDX_META_OPERATION_START_REQUEST with SVHDX_META_OPERATION_CREATE_SNAPSHOT structure in the payload to server to take a snapshot and expects success.
Client sends the SVHDX_TUNNEL_DELETE_SNAPSHOT_REQUEST to server to delete the created snapshot and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_QueryVirtualDiskChanges
DescriptionCheck if server supports querying a list of changed ranges since the designated snapshot.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the first snapshot.
Client closes the open.
Client reopens the shared virtual disk file and expects success.
Client sends Write request and expects success.
Client creates another snapshot.
Client sends the tunnel operation SVHDX_TUNNEL_QUERY_VIRTUAL_DISK_CHANGES_REQUEST to query the changes since the first snapshot.
Client deletes the two snapshots.
Client closes the file.
CleanupN/A
Test IDBVT_ApplySnapshot
DescriptionCheck if server supports applying a specified snapshot.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client reads 512 bytes and saves it for later comparation.
Client creates a snapshot.
Client closes the open.
Client reopens the shared virtual disk file and expects success.
Client sends Write request to change the file and expects success.
Client sends Apply Snapshot request to apply the previous snapshot.
Client rereads 512 bytes and compares it with the previously saved bytes.
Client deletes ths snapshot.
Client closes the file.
CleanupN/A
Test IDBVT_OpenSharedVHDSetByTargetSpecifier
DescriptionCheck if the server supports opening a shared VHD set file with using a Target Specifier.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the first tunnel operation SVHDX_META_OPERATION_START_REQUEST to create a snapshot.
Client closes the file.
Client reopens the shared virtual disk file using a Target Specifier and expects success.
Client closes the file.
CleanupN/A

ExtractAndOptimizeVHDSet

Scenario
DescriptionCheck if server handles the tunnel operation request to extract/optimize the shared virtual disk set file correctly.
Message SequenceOpenSharedVirtualDisk
SvhdxMetaOperationStart
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_Extract_VHDSet
DescriptionCheck if server supports handling tunnel operation to extract the shared virtual disk set file correctly.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the SVHDX_META_OPERATION_START_REQUEST with SVHDX_META_OPERATION_EXTRACT structure in the payload to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_Optimize
DescriptionCheck if server supports handling an Optimize request.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the tunnel operation SVHDX_META_OPERATION_START_REQUEST with an Optimize request and expects success.
Client closes the file.
CleanupN/A

Resize

Scenario
DescriptionCheck if server supports Resize.
Message SequenceOpenSharedVirtualDisk
Resize
CloseSharedVirtualDisk
OpenSharedVirtualDisk again and verify if the size is changed
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_Resize
DescriptionCheck if server supports handling tunnel operation to resize a VHDSet file.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the tunnel operation SVHDX_META_OPERATION_START_REQUEST to resize a VHDSet file and expects success.
Client closes the file.
Client reopens the virtual disk file and expects VirtualSize is changed to 2G.
Client closes the file.
CleanupN/A

SCSI Persistent Reservation

Scenario
DescriptionCheck if server supports SCSI Persistent Reservation by using RSVD as transport.
Message SequenceOpenSharedVirtualDisk
SCSI Persistent Reserver Out Command
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_TunnelSCSIPersistentReserve_RegisterAndReserve
DescriptionCheck if server supports SCSI persistent reservation service actions: Register and Reserve, by tunnel operation RSVD_TUNNEL_SCSI_OPERATION.
Prerequisites
Test Execution StepsClient opens a shared virtual disk file and expects success.
Client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
Client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
Client closes the file.
CleanupN/A
Test IDBVT_TunnelSCSIPersistentReserve_ReserveConflict
DescriptionCheck if server can handle SCSI Persistent Reservation Conflict by tunnel operation RSVD_TUNNEL_SCSI_OPERATION.
Prerequisites
Test Execution StepsThe first client opens a shared virtual disk file and expects success.
The second client opens a shared virtual disk file and expects success.
The first client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The second client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success
The second client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects server returns Reservation Conflict.
The first client closes the file.
The second client closes the file.
CleanupN/A
Test IDBVT_TunnelSCSIPersistentReserve_ReserveAndRelease
DescriptionCheck if server supports SCSI persistent reservation service actions: Reserve and Release, by tunnel operation RSVD_TUNNEL_SCSI_OPERATION.
Prerequisites
Test Execution StepsThe first client opens a shared virtual disk file and expects success.
The second client opens a shared virtual disk file and expects success.
The first client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client sends Release service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The second client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success
The second client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client closes the file.
The second client closes the file.
CleanupN/A
Test IDBVT_TunnelSCSIPersistentReserve_Preempt
DescriptionCheck if server supports SCSI persistent reservation service action: Preempt, by tunnel operation RSVD_TUNNEL_SCSI_OPERATION.
Prerequisites
Test Execution StepsThe first client opens a shared virtual disk file and expects success.
The second client opens a shared virtual disk file and expects success.
The first client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client sends Reserve service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The second client sends Register service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success
The second client sends Preempt service action of SCSI Persistent Reserve Out command by tunnel operation RSVD_TUNNEL_SCSI_OPERATION to server and expects success.
The first client closes the file.
The second client closes the file.
CleanupN/A

ChangeTracking

Scenario
DescriptionCheck if server supports change tracking.
Message SequenceOpenSharedVirtualDisk
Start Change Tracking
Make some changes
Stop Change Tracking
CloseSharedVirtualDisk
Cluster Involved ScenarioYES
Test Case
Test IDBVT_ChangeTracking
DescriptionCheck if server supports handling change tracking.
Prerequisites
Test Execution StepsClient opens a shared virtual disk set file successfully.
Client sends the tunnel operation SVHDX_CHANGE_TRACKING_START_REQUEST to start change tracking.
Client sends Write request to change the vhds file.
Client sends the tunnel operation RSVD_TUNNEL_CHANGE_TRACKING_GET_PARAMETERS to get the change tracking status.
Client sends the tunnel operation SVHDX_CHANGE_TRACKING_STOP_REQUEST to stop change tracking.
Client closes the file.
CleanupN/A

DFSC Test

ScenarioTest Cases
Domain_referral_to_DC5
DC_referral_to_DC6
Sysvol_referral_to_DC7
Root_referral_to_DC5
Link_referral_to_DC6
Root_and_Link_referral_to_DFSServer11
Path_Normalization_to_DFSServer2

The test cases are designed with below assumptions, and these terms will be used in test case description or test steps:

  • Domain name: contoso.com

  • DFS Server name: node01

  • Domain-based namespace: DomainBased

  • Stand-alone namespace: Standalone

  • DFS Link path: DFSLink

  • DFS interlink: \node01\SMBDfs\SMBDfsShare (This is another DFS link)

The following scenarios are out of scope in DFSC test suite:

  • The necessity of maintaining and sorting the root/link targets in the test environment and the metadata at the DFS server side is abstracted out and these are handled by the lower layer protocols. This includes the Client Target Failback feature.

  • Scenarios with domains in trusted forests in relationship to the client’s domain.

  • DFS referral target caches.

Domain_referral_to_DC

Scenario
DescriptionCheck if server handles domain referral requests correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends domain referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_DomainReferralV3ToDC
DescriptionClient sends a version 3 Domain referral request to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes a SMB connection between client and DC server.
2. Client sends a Domain referral v3 REQ_GET_DFS_REFERRAL message (RequestFileName is empty, MaxReferralLevel is 3) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the accuracy of the response.
4. Disconnect and logoff.
CleanupN/A
Test IDDomainReferralV1ToDC
DescriptionClient sends a v1 Domain referral request to DC, and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Domain referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is empty, MaxReferralLevel is 1) to DC.
3. Client expects STATUS == STATUS_UNSUCCESSFUL.
4. Disconnect and logoff.
CleanupN/A
Test IDDomainReferralV2ToDC
DescriptionClient sends a v2 Domain referral request to DC, and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Domain referral v2 REQ_GET_DFS_REFERRAL message (RequestFileName is empty, MaxReferralLevel is 2) to DC.
3. Client expects STATUS == STATUS_UNSUCCESSFUL.
4. Disconnect and logoff.
CleanupN/A
Test IDDomainReferralV4EXSiteToDC
DescriptionClient sends a v4 Domain referral request EX to DC, and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Domain referral v4 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is empty, MaxReferralLevel is 4, SiteName flag is set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3.
4. Verify the accuracy of the response.
5. Disconnect and logoff.
CleanupN/A
Test IDDomainReferralV4EXToDC
DescriptionClient sends v4 Domain referral request EX to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Domain referral v4 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is empty, MaxReferralLevel is 4, SiteName flag is not set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v4.
4. Verify the accuracy of the response.
5. Disconnect and logoff.
CleanupN/A

DC_referral_to_DC

Scenario
DescriptionCheck if server handles DC referral request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends DC referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_DCReferralV3ToDC
DescriptionClient sends a version 3 DC referral request with a valid domain name(FQDN) to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes a SMB connection between client and DC server.
2. Client sends a DC referral v3 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com", MaxReferralLevel is 3) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3.
4. Verify the name format is FQDN in response.
5. Verify the response contains all DCs in the domain.
6. Disconnect and logoff.
CleanupN/A
Test IDDCReferralV1ToDC
DescriptionClient sends a v1 DC referral request to DC and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a DC referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com", MaxReferralLevel is 1) to DC.
3. Client expects STATUS == STATUS_UNSUCCESSFUL.
4. Disconnect and logoff.
CleanupN/A
Test IDDCReferralV2ToDC
DescriptionClient sends a v2 DC referral request to DC and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a DC referral v2 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com", MaxReferralLevel is 2) to DC.
3. Client expects STATUS == STATUS_UNSUCCESSFUL
4. Disconnect and logoff.
CleanupN/A
Test IDDCReferralV4EXNetbiosToDC
DescriptionClient sends a v4 DC referral request EX with a valid domain name(NETBIOS) to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a DC referral v4 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso", MaxReferralLevel is 4, SiteName flag is not set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3.
4. Verify the name format is NETBIOS in response.
5. Verify the response contains all DCs in the domain.
6. Disconnect and logoff.
CleanupN/A
Test IDDCReferralV4EXSiteToDC
DescriptionClient sends a v4 DC referral request EX with a site name to DC and expects positive response.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a DC referral v4 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso", MaxReferralLevel is 4, SiteName flag is set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDInvalidDCReferralToDC
DescriptionClient sends a v4 DC referral request with an invalid domain name(NETBIOS) to DC and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a DC referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\Invalid", MaxReferralLevel is 4) to DC.
3. Client expects STATUS == STATUS_INVALID_PARAMETER.
4. Disconnect and logoff.
CleanupN/A

Sysvol_referral_to_DC

Scenario
DescriptionCheck if server handles Sysvol request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends Sysvol referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_SysvolReferralV3ToDCNetlogonPath
DescriptionClient sends a version 3 sysvol referral request with NETLOGON directory to DC, and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes a SMB connection between client and DC server.
2. Client sends a Sysvol referral v3 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso\NETLOGON", MaxReferralLevel is 3) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verifies the accuracy of the response.
4. Disconnect and logoff.
CleanupN/A
Test IDBVT_SysvolReferralV4ToDCSysvolPath
DescriptionClient sends a v4 Sysvol referral request with SYSVOL directory to DC, and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v4 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\NETLOGON", MaxReferralLevel is 4) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the accuracy of the response.
4. Disconnect and logoff.
CleanupN/A
Test IDInvalidSysvolReferralToDC
DescriptionClient sends a v1 Sysvol referral request with invalid Domain name to DC and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\Invalid\SYSVOL", MaxReferralLevel is 1) to DC.
3. Client expects STATUS == STATUS_NOT_FOUND.
4. Disconnect and logoff.
CleanupN/A
Test IDSysvolReferralV1EXSiteToDCSysvolPath
DescriptionClient sends a v1 Sysvol referral request(EX) with SYSVOL directory to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v1 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\SYSVOL", MaxReferralLevel is 1, SiteName flag is set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the response.
4. Disconnect and logoff.
CleanupN/A
Test IDSysvolReferralV1ToDCSysvolPath
DescriptionClient sends v1 Sysvol referral request with SYSVOL directory to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\SYSVOL", MaxReferralLevel is 1) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the response.
4. Disconnect and logoff.
CleanupN/A
Test IDSysvolReferralV2ToDCNetlogonPath
DescriptionClient sends a v2 Sysvol referral request with NETLOGON path to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v2 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\NETLOGON", MaxReferralLevel is 2) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the response.
4. Disconnect and logoff.
CleanupN/A
Test IDSysvolReferralV2EXToDCNetlogonPath
DescriptionClient sends a v2 Sysvol referral request(EX) with NETLOGON directory to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Sysvol referral v2 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\SYSVOL", MaxReferralLevel is 1, SiteName flag is not set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and verify the response.
4. Disconnect and logoff.
CleanupN/A

Root_referral_to_DC

Scenario
DescriptionCheck if server handles Root referral request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends Root referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_RootReferralV4ToDC
DescriptionClient sends a v4 Root referral request to DC, and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\Root", MaxReferralLevel is 4) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v4.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDRootReferralV1ToDC
DescriptionClient sends a v1 Root referral request to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Root referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased", MaxReferralLevel is 1) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v1.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDRootReferralV2EXToDC
DescriptionClient sends a v2 Root referral request to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Root referral v2 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\DomainBased", MaxReferralLevel is 2, SiteName Flag is not set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v2.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDRootReferralV3EXSiteToDC
DescriptionClient sends a v3 Root referral request to DC and expects positive response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Root referral v3 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\DomainBased", MaxReferralLevel is 3, SiteName flag is set) to DC.
3. Client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDInvalidRootReferralToDC
DescriptionClient sends an invalid v4 Root referral request to DC and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\Invalid", MaxReferralLevel is 4) to DC.
3. Client expects STATUS == STATUS_NO_SUCH_FILE.
4. Disconnect and logoff.
CleanupN/A
Scenario
DescriptionCheck if server handles Link referral request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends Link referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDLinkReferralV4ToDC
DescriptionClient sends a v4 Link referral request to DC, and expects positive response or STATUS_NOT_FOUND depends on if the DC is hosting DFS server.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased\DFSLink", MaxReferralLevel is 4) to DC.
3. If DC is hosting DFS server, then client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v4. Otherwise, client expects STATUS_NOT_FOUND from DC.
4. Verify the response if any.
5. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralV1ToDC
DescriptionClient sends a v1 Link referral request to DC, and expects positive response or STATUS_NOT_FOUND depends on if the DC is hosting DFS server.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Link referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased\DFSLink", MaxReferralLevel is 1) to DC.
3. If DC is hosting DFS server, then client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v1. Otherwise, client expects STATUS_NOT_FOUND from DC.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralV2EXToDC
DescriptionClient sends a v2 Link referral request to DC, and expects positive response or STATUS_NOT_FOUND depends on if the DC is hosting DFS server.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Link referral v2 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\DomainBased\DFSLink", MaxReferralLevel is 2, SiteName flag is not set) to DC.
3. If DC is hosting DFS server, then client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v2. Otherwise, client expects STATUS_NOT_FOUND from DC.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralV3EXSiteToDC
DescriptionClient sends a v3 Link referral request to DC, and expects positive response or STATUS_NOT_FOUND depends on if the DC is hosting DFS server.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Link referral v3 REQ_GET_DFS_REFERRAL_EX message (RequestFileName is "\contoso.com\DomainBased\DFSLink", MaxReferralLevel is 3, SiteName flag is set) to DC.
3. If DC is hosting DFS server, then client expects STATUS == STATUS_SUCCESS and RESP GET_DFS_REFERRAL message version is v3. Otherwise, client expects STATUS_NOT_FOUND from DC.
4. Verify the response.
5. Disconnect and logoff.
CleanupN/A
Test IDInvalidNamespaceLinkReferralToDC
DescriptionClient sends a v4 Link referral request to DC with invalid namespace, expect negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DC server.
2. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\Invalid\DFSLink", MaxReferralLevel is 4) to DC.
3. Client expects STATUS == STATUS_NOT_FOUND.
4. Disconnect and logoff.
CleanupN/A
Scenario
DescriptionCheck if server handles root and link referral request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends root and link referral request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDBVT_RootAndLinkReferralStandaloneV4ToDFSServer
DescriptionClient sends a DFS root referral request v4 to DFS Server first, and then link referral request v4.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone", MaxReferralLevel is 4) to DFS server.
5. Client expects STATUS = STATUS_SUCCESS and returns the same path.
6. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone\DFSLink", MaxReferralLevel is 4) to DFS server.
7. Client expects STATUS == STATUS_SUCCESS and verifies response.
4. Disconnect and logoff.
CleanupN/A
Test IDBVT_RootAndLinkReferralDomainV4ToDFSServer
DescriptionClient sends a DFS root referral request v4 to DFS Server first, and then link referral request v4.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased", MaxReferralLevel is 4) to DFS server.
5. Client expects STATUS = STATUS_SUCCESS and returns the same path.
6. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\DomainBased\DFSLink", MaxReferralLevel is 4) to DFS server.
7. Client expects STATUS == STATUS_SUCCESS and verifies response.
4. Disconnect and logoff.
CleanupN/A
Test IDRootAndLinkReferralStandaloneV2ToDFSServer
DescriptionClient sends a DFS root referral request v2 to DFS Server first, and then link referral request v2.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v2 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone", MaxReferralLevel is 2) to DFS server.
5. Client expects STATUS = STATUS_SUCCESS and returns the same path.
6. Client sends a Link referral v2 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone\DFSLink", MaxReferralLevel is 2) to DFS server.
7. Client expects STATUS == STATUS_SUCCESS and verifies the response.
4. Disconnect and logoff.
CleanupN/A
Test IDRootAndLinkReferralEXStandaloneV1ToDFSServer
DescriptionClient sends a DFS root referral request v1 first, and then link referral request v1.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone", MaxReferralLevel is 1) to DFS server.
5. Client expects STATUS = STATUS_SUCCESS and returns the same path.
6. Client sends a Link referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone\DFSLink", MaxReferralLevel is 1) to DFS server.
7. Client expects STATUS == STATUS_SUCCESS and verifies the response.
4. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralStandaloneToDFSServerReturnRootTarget
DescriptionClient sends a DFS link referral request v3 to DFS Server first and expects root target returned.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Link referral v3 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone\Invalid", MaxReferralLevel is 3) to DFS server.
3. Client expects STATUS == STATUS_SUCCESS and returns the root target (\node01\Standalone).
4. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralStandaloneToDFSServerReturnInterlink
DescriptionClient sends a DFS link referral request v4 and expects interlink returned.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Standalone\Interlink", MaxReferralLevel is 4) to DFS server.
3. Client expects STATUS == STATUS_SUCCESS and returns interlink (\node01\SMBDfs\SMBDfsShare).
4. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralDomainV1ToDFSServer
DescriptionClient sends a DFS link referral request v1 to DFS Server and expects positive response.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Link referral v1 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased\DFSlink", MaxReferralLevel is 1) to DFS server.
3. Client expects STATUS == STATUS_SUCCESS and verifies response.
4. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralDomainToDFSServerReturnRootTarget
DescriptionClient sends a DFS link referral request v4 and expects root target returned.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased\Invalid", MaxReferralLevel is 1) to DFS server.
3. Client expects STATUS == STATUS_SUCCESS and verifies returned root target.
4. Disconnect and logoff.
CleanupN/A
Test IDLinkReferralDomainToDFSServerReturnInterlink
DescriptionClient sends a DFS link referral request v4 to DFS Server and expects interlink returned.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Link referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\DomainBased\Interlink", MaxReferralLevel is 4) to DFS server.
3. Client expects STATUS == STATUS_SUCCESS and returns interlink (\node01\SMBDfs\SMBDfsShare).
4. Disconnect and logoff.
CleanupN/A
Test IDInvalidRootReferralStandaloneToDFSServer
DescriptionClient sends a v4 invalid Root referral request to DFS server and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\node01\Invalid", MaxReferralLevel is 4) to DFS server.
3. Client expects STATUS == STATUS_NOT_FOUND.
4. Disconnect and logoff.
CleanupN/A
Test IDInvalidRootReferralDomainToDFSServer
DescriptionClient sends a v4 invalid Root referral request to DFS server and expects negative response
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a Root referral v4 REQ_GET_DFS_REFERRAL message (RequestFileName is "\contoso.com\Invalid", MaxReferralLevel is 4) to DFS server.
3. Client expects STATUS == STATUS_NOT_FOUND for non-windows platform and STATUS_DFS_UNAVAILABLE for windows platform.
4. Disconnect and logoff.
CleanupN/A

Path_Normalization_to_DFSServer

Scenario
DescriptionCheck if server handles path normalization request correctly.
Message SequenceClient establishes SMB2 connection to server.
Client sends path normalization request to server.
Check server responses correctly.
Disconnect and logoff SMB2 connection.
Cluster Involved ScenarioNO
Test Case
Test IDNormalizePathWithDFSLink
DescriptionClient sends SMB2 create request to open a file in a DFS path with DFS Link, verify if server normalize the path correctly.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a SMB2 CREATE message with DFS path containing DFSLink to DFS server.
3. Client expects STATUS = STATUS_PATH_NOT_COVERED.
4. Disconnect and logoff.
CleanupN/A
Test IDNormalizePathWithoutDFSlink
DescriptionClient sends SMB2 create request to open a file in a DFS path without DFS Link, verify if server normalize the path correctly.
PrerequisitesCommon prerequisites
Test Execution Steps1. Client establishes an SMB connection between client and DFS server.
2. Client sends a SMB2 CREATE with DFS path but not containing DFSLink to DFS server.
3. Client expects STATUS = STATUS_SUCCESS.
4. Disconnect and logoff.
CleanupN/A