Winsock Stress Test - OpenClose (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.

This test opens and closes a large number of sockets. You can specify the number of sockets to open and close and whether the sockets are bound, connected, or used in data transfers. You can also specify the application that launches the client thread, the server thread, or both.

You can run this test from a single command line or between two separate devices. You should run the server thread before or in the same command line as the client thread.

Test Prerequisites

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

There are no hardware prerequisites for Open/Close Winsock Stress Test.

The following table shows the software requirements for the Open/Close 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.

ocstres2_vx.exe

Open/Close 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.

If you are running the test between two different devices, you will need the name of the target device.

Running the Test

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

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

ocstres2_vX [-s ServerName/Addr] [-f Freq] [-w Wait] [-n Iterations] [-c SocksB4Close] [-p Port] [-u | -x] [-ab] [-g | -h | -o | -r] [-b BytesToXfer] [-d]

Parameter

Description

General Options:

f:

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

w:

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

n:

Number of iterations (default: 1000)

c:

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

p:

Port to connect/listen on (default: 5)

i:

Version of IP to use 4, 6, or X (default: X)

Thread Options:

a:

Run Client Thread

b:

Run TCP/UDP Server Thread

Client Options:

s:

Specify the server to communicate with. (default: localhost)

u:

Use datagram (UDP) sockets (default is TCP)

x:

Use random mixed socket types (UDP/TCP)

g:

Bind the sockets

h:

connect to the server (includes binding)

Server Options:

d:

Set server to Deamon mode

Data Transfer Options (all include bind/connect for client):

o:

Send data before closing socket

r:

Receive data before closing socket

y:

Bytes to send/receive (default: 128)

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 - Open/Close test.

Command Line

Description

s ocstres2_vx -c10 -x -a

The following command line opens and closes 1000 sockets of random type in groups of 10.

s ocstres2_vx -f200 -n10000 -c5 -h -a -b

The following command line opens, binds, connects, and closes 10,000 sockets in groups of five for IPv4 only.

s ocstres2_vx -s <name of target desktop computer> -o -r -a

The following command line opens, binds, connects, sends data on, receives data on, and then closes 1000 sockets.

Verifying the Test

During the running of the test, there should not be any consistent failures. After the test completes successfully, a summary of the tests 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 a network connection.

See Also

Other Resources

Networking - Ethernet Tests