SMB and CIFS are windows file sharing protocols. CIFS is window’s product but there is wide spread acceptance of SMB2 & SMB3. These are becoming common protocols for NAS boxes/Appliances.
It is typical to see NFS, CIFS/SMB for file sharing across heterogeneous environments. Both protocols implement different ACLs and permissions(r,w,x). Samba is needed to help export files among CIFS/SMB clients. Kerberos is also an important ingredient for authentication and authorization. To complicate things further, Samba4 member of a domain can also act as Domain Controller.
Well, this article will only focus on SMB2/3 testing strategy.
SMB test efforts will encompass of ensuring general SMB robustness by writing Test Plans, Execution and automation of Test cases & Scenarios.
We should break the SMB testing into Sanity, Functional, Performance, Load & Stress Testing.
There is also need for Product integration and Interoperability testing of SMB with NFS and other supported protocols(AFS,FTP,AD-LDAP,webDAV).
Open source SMB test tools like FSCT, SMBTrap, servtest, IOZone, DBENCH/NetBench, Keimpx, Pike, SMB torture & Microsoft interoperability
suite should be evaluated and reused for faster test coverage.
Microsoft interoperability suite provides less coverage. This is good to have for SMB interoperability & Protocol Conformance testing.
SMBMap : Utility tool for listing share drives, drive permissions, contents, searching and remote command execution.
Keimpx : Checking for valid credentials across network of SMB (Combinations of User/NTLM, hash logon sessions).
SMB2 Server Test Suite provides interoperability testing against server requirements.
Important Test Scenarios :
Test scenarios covering Basics of SMB working along with Performance Testing.
Includes SMB/CIFS to NFS interoperability testing around Permission Mapping & Vice versa, ACL Security. Test for different access control models.
CIFS,NFS security tests for users(root, normal, Anonymous, unmapped), groups & shares.
Basic Performance Test cases.
Client Driven unavailability in SMB is Slow, unreliable & Unpredictable. It is also the root cause of my production problems.
Test scenarios around continuous availability timeouts, witness keep-alive[SWN] & SMB-direct timers[SMBD].
Specific Test coverage is required around : Request Expiration Timer [MS-SMB2], Durable Open Scavenger Timer [MS-SMB2], Idle Connection Timer, Session Expiration Timer [MS-SMB2],
Resilient Open Scavenger Timer [MS-SMB2], Send Credit Grant Timer, Keep alive interval.
SMB1/SMB2/SMB3 test tools are available and can help in regression automation.
SMB Performance Test considerations :
SMB performance benchmarking usually depends on SMB size transfer & number of concurrent connections.
Performance testing as a function of Stress and Load testing will cover various combinations of connections load,
TCP frame size, socket options, Locking, caching, Log Level, Request Pipelining, Bulk transfer impact and tuning of other SMB performance variables for the same.
Dbench, DiskSPD, Iometer can be useful for the Performance testing tests, above.