Networking Testing Plan
Document formatted by vherva at Fri Apr 24 11:23:45 1998 on the host schemestation. This document is produced by the SchemeStation project during the Tik-76.115 course.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 Purpose | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This document describes the unit testing of the SCHEMESTATION networking system. The purpose of the unit testing is to ensure, that the implemented networking system corresponds to the specified networking protocol [Networking Specification] and that messages can be passed between domains with reasonable performance.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 Module testing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Testing the overall functionality of the module is dicided in to following categories:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 Function Testing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Each function is tested separately. For each function the following is tested:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 Other tests | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The networking system will be flooded with maximum amount of packets that the system can produce, and with packets that contain illegal headers.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 The testing program | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A separate testing program will be written to test all the networking operations. The testing involves having two test programs to act as minimal domains and communicate with each other via one test router. The two domains and the router are three instances of one executable, that acts as router, if a specific command line argument is supplied. The two client programs also get their own domain address, the address of the router and the address of the other client program as a command line argument.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.1 The test program phases | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.1.1 Networking system initialization | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The host address is set with net_sethostaddress(). The result is verified with gdb. The networking system is initialized by calling net_initialize. The net_becomerouter is called, if corresponding command line argument was supplied. This way, one of the testing executables can act as a router. Unless the command line attribute was supplied, net_userouter is called to initiate connection to the router. A packet callback is supplied for the system using net_registerpacketcallback. The callback dump the gotten packet on to the screen. The result of the hand shake initiated between the router and the client will be checked using gdb. Also, a perl script will be written to try to connect to the router with false protocol. The router may neither accept the connections nor stop serving the valid connections.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.1.2 Sending, receiving and retransmitting the packets | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In the sending phase, another of client programs (those not instructed to become routers) basicly executes a thight loop sending packets to the other client program. The client program client program can be put in to this mode with eg. typing a suitable key combination. The other client sits in a loop too and dumps the received messages to stdout. The result is verified by counting number of received messages and sent messages. The sending party can be instructed to dump the sent messages to stdout, too, so that the possible errors can be caught using diff(1).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.1.3 Invalid packet flood | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Another of the client programs will be set to "malfunction" mode - it will flood the router with random packets. It will be checked that none of these packets cause denial of service neither for the malfunctional client nor the intact client. All invalid packets have to be ignored.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 The results | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The described testing programs were written and executed in parallel. The functions are tested to carry out their tasks when proper arguments are supplied. The invalid argument testing is not yet accomplished. The ability to deal with malfunctional connection has been tested with the testing programs. The networking and messaging system were tested together. This was done after the addressing system tests as the testing demanded a functional addresing system. As the plan for addressing system testing [SCHEMESTATION Networking Testing Plan] dictates, the test arrangement consisted of two stub SCHEMESTATION domains that were set to send messages to each other. More extensive testing with multiple domains took place in the integration tests. The testing scheme included a 1-3 call test for each function, and a stress test, whose purpose was to unveil the memory leaks and defects in performance. We hoped also, that stress testing could reveal problems concering the non-blocking semantics of the networking system. All of the test concerning the semantics of the functions were succesfully passed. Numerous bugs were found, most of them have already been fixed.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.1 Summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.2 fuctions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
© SchemeStation project 1997-1998 | [Back to the document index] |