From owner-p4-projects@FreeBSD.ORG Mon Aug 18 14:09:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 234AD10656F1; Mon, 18 Aug 2008 14:09:08 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADCF4106568F for ; Mon, 18 Aug 2008 14:09:07 +0000 (UTC) (envelope-from bilouro@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4A28FC19 for ; Mon, 18 Aug 2008 14:09:07 +0000 (UTC) (envelope-from bilouro@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7IE97K2051604 for ; Mon, 18 Aug 2008 14:09:07 GMT (envelope-from bilouro@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7IE97Yc051602 for perforce@freebsd.org; Mon, 18 Aug 2008 14:09:07 GMT (envelope-from bilouro@FreeBSD.org) Date: Mon, 18 Aug 2008 14:09:07 GMT Message-Id: <200808181409.m7IE97Yc051602@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bilouro@FreeBSD.org using -f From: Victor Hugo Bilouro To: Perforce Change Reviews Cc: Subject: PERFORCE change 147722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 14:09:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=147722 Change 147722 by bilouro@bilouro_tcptest on 2008/08/18 14:08:36 Documentation Affected files ... .. //depot/projects/soc2008/bilouro_tcptest/README#2 edit .. //depot/projects/soc2008/bilouro_tcptest/SETUP#1 add .. //depot/projects/soc2008/bilouro_tcptest/TODO#5 edit .. //depot/projects/soc2008/bilouro_tcptest/USING#1 add .. //depot/projects/soc2008/bilouro_tcptest/src/scripts/tests/cresetFromNonSyncState.py#2 edit Differences ... ==== //depot/projects/soc2008/bilouro_tcptest/README#2 (text+ko) ==== @@ -1,1 +1,56 @@ -TCP/IP Regression Test Suite +== WHAT == + A multi-platform TCP/IP v4 Stack Testing Tool, + + As a testing tool, it can perform regression, protocol conformance, and fuzz tests. The tool may also be employed as an aid to protocol developers and both testing and debugging of firewalls/routers. + + +== USING == + It's built on top of PCS(Packet Construction Set) + + "PCS is a set of Python modules and objects that make building network protocol code easier for the protocol developer. The core of the system is the pcs module itself which provides the necessary functionality to create classes that implement packets." [[http://pcs.sourceforge.net/|PCS]] + + PCS enables testing at OSI layers 3, 4, and 5. + + +== HOW == + Tcptest mainly is a python module and one script for each test covered (more then one per script often) + The module count with methods acting as fasteners, doing things like (a)three way handshake, (b)active/passive close and (c)several createXX and assertXX, where XX=(ip, tcp, rst, urg, fin, syn, psh, so on...) + As the tests are being created, the number of 'fasteners' are growing, turning each moment easier to create new tests. + + +== PHILOSOPHY == + Use of small tests. So we can cover a wide range of traffics, events and transitions predetermined separately. + + The development would be like a protocol, but without covering all possible events and transitions, only traffic previously determined. + + Instead of targeting a TCP Finite State Machine (FSM) like the implementation of TCP/IP protocols, the development will be based towards flow of packets, where traffic is composed of packets that are sent and received in a previously registered way. + +== THE FOLLOWING TESTS WILL BE INITIALLY COVERED == + + 1. Three-way handshake [done] + 2. Reset from closed state [done] + 3. Reset from non syncronized state [done] + 4. Reset from syncronized state [done] + 5. Sliding Window Protocol + 6. Urgent Pointer + 7. TCP Options establishment + 8. Selective Acknowledgments + 9. TCP Timestamps + 10. Time-wait configuration [done] + 11. Connection close [done] + 12. Simultaneous close + 13. Receive Window Size Advertisement + 14. Transmit Window Size Advertisement + 15. Support Partner’s Shrinking Window + 16. Silly Window Syndrome Avoidance + 17. Zero Window Handling + 18. Receive ACKs, RSTs, and URGs while Window is Zero + 19. Zero window Probing + +== MENTOR == + * George Neville-Neil + + +== STUDENT == + * Victor Hugo Bilouro + ==== //depot/projects/soc2008/bilouro_tcptest/TODO#5 (text+ko) ==== @@ -1,10 +1,5 @@ use the last version of pcs -rewrite connection establishment and finalization pcb-like oriented -elicit with net@ some regression test suggested create connection establishment options test -create some regression test scripts -create some conformance test scripts -choose the better method to create tests, programmatically or parsing oriented Think about: to be able make synchronous tests, will be wonderful remotely @@ -13,7 +8,7 @@ self.output = { self.thisside : pcs.PcapConnector("ed0") , \ self.thatside : pcs.PcapConnector(remoteip,"ed0") } - this.packet == that.packet will be possible + test this.packet == that.packet will be possible Think about: self.ethersrc = ethernet.ether_atob("00:1c:42:47:3f:cd") @@ -23,5 +18,6 @@ * may be as a utility method ethernet().configue(ip) -done: --manually establish a tcp connection using pcs +Rewrite method that receives data from socket, with timeout. For some tests we have to listen for a packet only to certify the DUT doesn't send anything back. + +Use the latest version of pcs from http://neville-neil.com/hg ==== //depot/projects/soc2008/bilouro_tcptest/src/scripts/tests/cresetFromNonSyncState.py#2 (text+ko) ==== @@ -119,9 +119,6 @@ (ip, tcp) = tcptest.createoutofwindowack(self, self.tcb, self.thisside, self.thatside) tcptest.createwritepacket(self, self.tcb, ip, tcp, self.thisside, self.thatside) - (ip, tcp) = tcptest.createip(self, self.tcb, self.thisside, self.thatside) - tcptest.createwritepacket(self, self.tcb, ip, tcp, self.thisside, self.thatside) - (iprst, tcprst) = tcptest.receive(self, self.tcb, self.thisside, self.thatside) tcptest.assertReset(self, self.tcb, tcprst, self.thisside, self.thatside, tcp)