Code Confidencebuild 3.0.0.201402161939

Chapter 59. Testing

Table of Contents
Test Programs
Test Script

Test Programs

There are a number of test programs supplied with the PPP subsystem. By default all of these tests use the device configured by CYGPKG_PPP_TEST_DEVICE as the PPP link device.

ppp_up

This test just brings up the PPP link on CYGPKG_PPP_TEST_DEVICE and waits until the remote end brings it back down. No modem lines are used and the program expects a PPP connection to be waiting on the other end of the line. Typically the remote end will test the link using ping or access the HTTP system monitor if it is present.

If CYGPKG_PPP_TESTS_AUTOMATE is set, then this test attempts to bring PPP up at each of the baud rates specified in CYGDAT_PPP_TEST_BAUD_RATES. If it is not set then it will just bring the connection up at 115200 baud.

ppp_updown

This test brings the PPP link up on CYGPKG_PPP_TEST_DEVICE and attempts to ping the remote end of the link. Once the pings have finished, the link is then brought down.

If CYGPKG_PPP_TESTS_AUTOMATE is set, then this test attempts to bring PPP up at each of the baud rates specified in CYGDAT_PPP_TEST_BAUD_RATES. If it is not set then it will just bring the connection up at 115200 baud.

chat

This test does not bring the PPP link up but simply executes a chat script. It expects a server at the remote end of the link to supply the correct responses.

This program expects the test_server.sh script to be running on the remote end and attempts several different tests, expecting a variety of different responses for each.

ppp_auth

This test attempts to bring up the PPP link under a variety of different authentication conditions. This includes checking that both PAP and CHAP authentication work, and that the connection is rejected when the incorrect authentication protcol or secrets are used.

This test expects the test_server.sh script to be running on the remote end. For this test to work the /etc/ppp/pap-secrets file on the remote end should contain the following two lines:

eCos       *         secret       *
eCosPAP    *         secretPAP    *

The /etc/ppp/chap-secrets file should contain:

eCos       *         secret       *
eCosCHAP   *         secretCHAP   *
isp

This test expects the serial test device to be connected to a Hayes compatible modem. The test dials the telephone number given in CYGPKG_PPP_DEFAULT_DIALUP_NUMBER and attempts to log on to an ISP using the user name and password supplied in CYGPKG_PPP_AUTH_DEFAULT_USER and CYGPKG_PPP_AUTH_DEFAULT_PASSWD. Once the PPP connection has been made, the program then attempts to ping a number of well known addresses.

Since this test is designed to interact with an ISP, it does not run within the automated testing system.

tcp_echo

This is a version of the standard network tcp_echo test that brings up the PPP connection before waiting for the tcp_sink and tcp_source programs to connect. It is expected that at least one of these programs will connect via the PPP link. However, if another network interface is present, such as an ethernet device, then one may connect via that interface.

While this test is supported by the test_server.sh script, it runs for such a long time that it should not normally be used during automated testing.

nc_test_slave

This is a version of the standard network nc_test_slave test that brings up the PPP connection before waiting for the nc_test_master program to connect. It is expected that the master will connect via the PPP link.

While this test is supported by the test_server.sh script, it runs for such a long time that it should not normally be used during automated testing.