TCP Regression Testing Suite
(blog) Last year, another GSoC'er worked on a project called Packet Construction Set (PCS, http://pcs.sf.net). PCS is a set of Python libraries that allows developers to rapidly craft individual packets, or chains of packets, with a very fine level of detail. The framework will be extended to allow the testing of various TCP/IP stack states and corner cases. This will effectively result in the re-implementation of TCP stack fragments in user-space, and testing the test fragments against the actual TCP stack. Code coverage tools will be used to show the percentage of the TCP stack that is actually being tested. The resulting suite will be used to prevent regression errors in the TCP\IP stack. Robert Watson suggested that the framework should both deliver immediate results, and allow for long-term scope expansion and continued development. It was suggested that by the end of the summer, ARP, TCP setup, and a couple of TCP tear-down cases, and some aspects of the steady state are have functional tests written for them. Additionally, the framework should also allow for longer-term goals such as testing window expansion, congestion control, etc.
Documentation for the TCP Regression Testing Suite is in progress and will be included in the distribution. P4 Link
TODOs and Milestones
Tracked in local software on my dev box. There's too many of them, and they fluctuate too rapidly to upload them here!
Become familiar with PCS
Download and set up
Run tests to ensure proper setup
Modify canned example case to do something new
Late May / June
Get familiar with the TCP RFC. Very familiar. Uncomfortably familiar.
Start planning the test suite framework (this does not include any tests)
Start implementing framework
Continue implementing framework
Implement first few tests (TCP setup/tear-down) using calls to TCP implementation to test it
Re-implement first few tests by hooking into the correct sections and manually executing the tested code segments.
- Framework successfully tests and validates a standard TCP setup and tear-down.
- Framework successfully tests and validates standard TCP cases.
LISTEN -> SYN-RECVD -> ESTABLISHED
SYN-SENT -> SYN-RECVD -> ESTABLISHED
FIN-WAIT-1 -> FIN-WAIT-2 vs. FIN-WAIT-1 -> CLOSING