Winsock Core Functional Test
This automated test iterates through some of the core Winsock functionality against a loopback interface and verifies whether the Winsock API interface is correctly maintained.
All tests cover IPv4 and IPv6 sockets, which all bind to the loopback interface. Variations are as follows:
Socket Catalog. Enumerates the Winsock catalog, creates a socket for each returned protocolinfo structure (each protocol tuple), and binds it to the loopback interface.
OVERLAPPED IO. Creates both IPv4 and IPv6 TCP stream sockets, establishes a connection over loopback, and sends data between sockets via blocking send and overlapped receive calls. All data is verified as received.
TransmitFile variation. Verifies that TransmitFile correctly sends data and implements the TF_DISCONNECT flag for socket reuse for both IPv4 and IPv6 sockets. Creates a 260-byte temporary file and transmits over a TCP connection via TransmitFile. The listening socket uses AcceptEx to verify the connection and socket reuse.
ConditionalAccept. Verifies semantics of conditional accept over both IPv4 and IPv6 TCP stream sockets. Tests five connections: without a listener, returning CF_REJECT, returning CF_ACCEPT, returning CF_DEFER + CF_REJECT, and returning CF_DEFER + CF_ACCEPT.
Streams. Blocks send/receive over IPv4 and IPv6 TCP stream sockets. Defers calling acceptance with a zero listen backlog until the connection has finished.
Datagrams. Verifies sending and receiving of datagrams over IPv4 and IPv6 UDP sockets. Tests both sending datagrams via connect/send/receive and connectionless send to/receive from.
Select. Verifies READFDS notification on both IPv4 and IPv6 TCP sockets for indications of connection establishment, receiving data, and closure of the socket.
Bind. Verifies bind semantics for IPv4 and IPv6 TCP sockets: basic bind, SO_REUSEADDR binds, and SO_EXCLUSIVEADDRUSE binds.
ReadFile/WriteFile. Verifies whether overlapped ReadFile() and WriteFile() functions work correctly over both IPv4 and IPv6 TCP sockets.
Shutdown. Verifies shutdown() semantics on IPv4 and IPv6 TCP sockets by establishing a connection, posting a blocking receive, and verifying whether calling shutdown completes the receive with zero bytes received.
Addressing. Verifies the conversion of IPv4 and IPv6 addresses from h, decimal, and octal strings to the corresponding socket address structure values (WSAAddressToString and WSAStringToAddress).
Multicast. For IPv4 and IPv6, verifies the joining to multicast groups via IP_ADD_MEMBERSHIP and IPV6_ADD_MEMBERSHIP, sending and receiving data to the group, and leaving the group.
JoinLeaf. For IPv4 and IPv6, verifies the joining to multicast groups via WSAJoinLeaf, sending and receiving data to the group, and leaving the group.
AsyncSelect. For IPv4 and IPv6 TCP sockets, verifies that FD_CONNECT, FD_SEND, and FD_READ Windows messages are processed via WSAAsyncSelect. Also verifies whether FD_CONNECT is processed when a multicast socket completes WSAJoinLeaf.
IOCP. For IPv4 and IPv6 TCP sockets, makes overlapped receive calls in which the socket is associated with an I/O completion port. Also verifies whether the overlapped completions are processed and all data is received.
RAW socket. For IPv4 and IPv6, creates raw sockets, sending and receiving Internet Control Message Protocol (ICMP) messages via OVERLAPPED IO.
PnP. Verifies whether overlapped address change notification is signaled when non-loopback IP addresses are added to and removed from the first non-loopback.
For more information about the Winsock API, see Windows Sockets 2.
Test details
Associated requirements |
Filter.Driver.AntiVirus.MiniFilter Filter.Driver.AntiVirus.Winsock Filter.Driver.FileSystem.MiniFilter |
Platforms |
Windows 8 (x64) Windows 8 (x86) Windows Server 2012 (x64) Windows 8.1 x64 Windows 8.1 x86 Windows Server 2012 R2 |
Expected run time |
~30 minutes |
Categories |
Certification |
Type |
Automated |
Running the test
For more information about requirements, see File System Testing Prerequisites.
In addition, this test requires the following software:
A filter driver to be tested along with any supporting application suite
At least one connected network interface that has a valid IPv4 and IPv6 address
Troubleshooting
For troubleshooting information, see Troubleshooting File System Testing.
All test cases return Pass or Fail. To review test details, review the test log from Windows HCK Studio.
Note
Windows Firewall may open a message that suggests that the firewall may be blocking some features of the test. However, the firewall does not affect the test. You can safely ignore this message.
If this procedure does not provide a successful test result, submit the test log with device-specific or system-specific details to the Windows Hardware Certification Kit (HCK) Support alias.
More information
Command syntax
Command option | Description |
---|---|
Winsockfunctional -protocol ip -t "Winsock API\Current Protocols (IPv4/IPv6)\BVT" -wtt -r -dontdisable -ipsec -notrace |
You must supply this core argument. |
-lsponly |
You must append this argument when an LSP is installed. |
Note
For command-line help for this test binary, type /h.
File list
File | Location |
---|---|
WinsockFunctional.exe |
<[testbinroot]>\NTTest\NetTest\Winsock\common\ |
WinsockFunctional.wtl |
Detailed output log that contains the test results |
Wsbvt.log |
Summary output log of the test results |
Bvterr.log |
Summary output log of the test results |
Fnshell.ini |
Temporary .ini file that the test generates and uses |