Standalone tests, Performance test – Comtrol eCos User Manual
Page 500

Chapter 36. Tests and Demonstrations
Standalone Tests
socket_test - trivial test of socket creation API
mbuf_test - trivial test of mbuf allocation API
These two do not communicate over the net; they just perform simple API tests then exit.
ftp_test
- simple FTP test, connects to “server”
This test initializes the interface(s) then connects to the FTP server on the “server” machine for for each active
interface in turn, confirms that the connection was successful, disconnects and exits. This tests interworking with
the server.
ping_test
- pings “server” and non-existent host to test timeout
This test initializes the interface(s) then pings the server machine in the standard way, then pings address “32 up”
from the server in the expectation that there is no machine there. This confirms that the successful ping is not a
false positive, and tests the receive timeout. If there is such a machine, of course the 2nd set of pings succeeds,
confirming that we can talk to a machine not previously mentioned by configuration or by bootp. It then does the
same thing on the other interface, eth1.
dhcp_test
- ping test, but also manipulates DHCP leases
This test is very similar to the ping test, but in addition, provided the network package is not configured to do this
automatically, it manually relinquishes and reclaims DHCP leases for all available interfaces. This tests the external
API to DHCP. See section below describing this.
flood
- a flood ping test; use with care
This test performs pings on all interfaces as quickly as possible, and only prints status information periodically.
Flood pinging is bad for network performance; so do not use this test on general purpose networks unless protected
by a switch.
Performance Test
tcp_echo
- data forwarding program for performance test
tcp_echo is one part of the standard performance test we use. The other parts are host programs
tcp_source
and
tcp_sink
. To make these (under LINUX) cd to the tests source directory in the eCos repository and type “
make
-f make.linux
” - this should build
tcp_source
and
tcp_sink
.
The LINUX program “
tcp_source
” sends data to the target. On the target, “
tcp_echo
” sends it onwards to
“
tcp_sink
” running on LINUX. So the target must receive and send on all the data that
tcp_source
sends it; the
time taken for this is measured and the data rate is calculated.
To invoke the test, first start
tcp_echo
on the target board and wait for it to become quiescent - it will report work
to calibrate a CPU load which can be used to simulate real operating conditions for the stack.
Then on your LINUX machine, in one terminal window, invoke
tcp_sink
giving it the IP address (or hostname)
of one interface of the target board. For example “
tcp_sink 10.130.39.66
”.
tcp_echo
on the target will print
something like “
SINK connection from 10.130.39.13:1143
” when
tcp_sink
is correctly invoked.
396