Winsock Stress Test - Socket Binding (Compact 2013)

3/26/2014

The Winsock Stress Test strains Winsock and networking functionality by performing a large number of socket operations. The socket operations performed by this test may also stress the remainder of the networking stack, for example, when receiving and sending large amounts of data.

Test Prerequisites

Your device must meet the following requirements before you run this test.

There are no hardware prerequisites for Winsock Stress Test.

The following table shows the software requirements for the Winsock Stress Test.

Requirements

Description

Netall.dll

Module that provides functions that generate random numbers, output data, and parse command lines. The Netall.dll file must be located in the same directory as the test.

bstres2_vx.exe

Winsock stress test application

Subtests

This test has no subtests.

Setting Up the Test

This test has no additional requirements beyond the standard test environment setup.

Running the Test

The Winsock Stress Test does not use the Tux test harness. You must run this test manually via Platform Builder's command line prompt.

The Winsock Stress Test has the following command line options, which you can display via the command: s bstres2_vX.exe /?

bstres2_vX.exe [-f Frequency] [-m Milliseconds] [-n NumIterations] [-a | -w | -l LocalAddress] [-u | -x]

Parameter

Description

f:

Number of interations to perform before displaying status (default: 100)

m:

Number of milliseconds to wait between iterations (default: 0)

n:

Number of binds to execute (default: 1000)

c:

Number of sockets to bind before closing (default: 1)

b:

Base port to start binding at (default: 18000)

u:

Bind datagram (UDP) sockets (default is TCP)

x:

Bind random mixed socket types (UDP/TCP)

l:

Bind socket to specified local address

a:

Bind socket to an automatically obtained local address. By default the test binds the socket to the unspecified address INADDR_ANY.

In addition, you can specify the following command-line options to modify the behavior of the test. Add one of the command-line parameter to:

Parameter

Description

-z

Redirect output to the console

-fl <filename>

Redirect output to a file

The following table shows some examples of Winsock Stress Test - Socket Binding test.

Command Line

Description

s bstres2_vx -c10 -x

This test will try to bind sockst to varying addresses and ports. You can specify the number of binds to perform in the command line. The test then loads a thread that opens, binds, and then closes the specified number of sockets. The following command line binds 1000 sockets of random type to an unspecified address in groups of 10.

s bstres2_vx -f10 -n100 -b1024 -a

This test binds 100 TCP/IP sockets to any local address on a range of ports starting with port 1024.

s bstres2_vx -u -l::1

This test binds 1000 User Datagram Protocol (UDP) sockets to an IPv6 loopback address.

Verifying the Test

During the running of the test, there should not be any consistent failures. At the end of the test a summary of the tests run will be displayed.

Troubleshooting the Test

If you are using two devices for this test, make sure that you have the correct name of the device.

Ensure that the device has an network connection.

See Also

Other Resources

Networking - Ethernet Tests