Chapter 36. tests and demonstrations, Loopback tests, Building the network tests – Comtrol eCos User Manual

Page 499: Tests and demonstrations, Standalone tests

Advertising
background image

Chapter 36. Tests and Demonstrations

Loopback tests

By default, only tests which can execute on any target will be built. These therefore do not actually use external
network interfaces (though they may configure and initialize them) but are limited to testing via the loopback
interface.

ping_lo_test - ping test of the loopback address

tcp_lo_select - simple test of select with TCP via loopback

tcp_lo_test - trivial TCP test via loopback

udp_lo_test - trivial UDP test via loopback

multi_lo_select - test of multiple select() calls simultaneously

Building the Network Tests

To build further network tests, ensure that the configuration option CYGPKG_NET_BUILD_TESTS is set in your
build and then make the tests in the usual way. Alternatively (with that option set) use

make -C net/common/VERSION / tests

after building the eCos library, if you wish to build only the network tests.

This should give test executables in

install/tests/net/common/VERSION /tests

including the following:

socket_test - trivial test of socket creation API

mbuf_test - trivial test of mbuf allocation API

ftp_test - simple FTP test, connects to “server”

ping_test - pings “server” and non-existent host to test timeout

dhcp_test - ping test, but also relinquishes and

reacquires DHCP leases periodically

flood - a flood ping test; use with care

tcp_echo - data forwarding program for performance test

nc_test_master - network characterization master

nc_test_slave - network characterization slave

server_test - a very simple server example

tftp_client_test - performs a tftp get and put from/to “server”

tftp_server_test - runs a tftp server for a short while

set_mac_address - set MAC address(es) of interfaces in NVRAM

bridge - contributed network bridge code

nc6_test_master - IPv4/IPv6 network characterization master

nc6_test_slave - IPv4/IPv6 network characterization slave

ga_server_test - a very simple IPv4/IPv6 server example

395

Advertising