[haiku-gsoc] Re: [HCD08] ICMP functional test
- From: "Yin Qiu" <allenchue@xxxxxxxxx>
- To: philippe.houdoin@xxxxxxx
- Date: Fri, 8 Aug 2008 18:13:17 +0800
Hi there,
So for now, I plan to write test apps in src/tests/kits/net/icmp_tests. I'll
skip the unit test cases. The ICMP functions are not complete yet, but I
suppose writing test kits will help me identify what's missing and what's
wrong.
BTW, please enjoy the coming Beijing 2008 Olympic game :)
On Thu, Aug 7, 2008 at 4:52 PM, <philippe.houdoin@xxxxxxx> wrote:
> Hi Yin,
>
> > Now I want to perform test on my code. Currently I want to do these two
> > things following Axel's suggestions:
> > 1. Write a simple program that sends UDP datagrams to a port that does
> > not
> > exist. We want to get an unreachable message.
> > 2. Send a big datagram with DF bit set. We also would like to receive
> an
> > unreachable message.
>
> Try to test unreachable port for TCP stream too.
> Check it works thru loopback and actual ethernet interface(s) too.
>
> > However I don't quite know where to do this. I mean,
> > I noticed there was a "tests" folder in src/, which contains several test
> > cases. Should I implement my own test cases in the corresponding folder?
>
> Yes, that's where every tests should be.
> At first, it was supposed to contains only unit tests (CppUnit), but it has
> evolved into the root folder for all kind of testing code, from
> CppUnit-based ones to third-party test framework (netperf) and whatever
> collection of simple testing programs.
>
> Your will find a warm home here, under src/tests/kits/net/
>
> > If so, would you give me some advice?
>
> Create some "icmp_tests" folder under src/tests/kits/net/ and put your two
> testing apps there.
> You could look the already there testing programs and take inspiration, in
> particular to write the Jamfiles to build yours.
>
> For the second test, maybe you should look at ping code
> (src/bin/network/ping/ping.c) to see how to setup a raw IP datagram, the
> fragment offset and flags in particular.
>
> > Or shall I just write the program in the haiku VM with gcc installed?
>
> No, not "just". Tests are very valuable, and should be kept and available
> for everyone under src/tests/... in order to allow them to see test
> conditions, update them, run them for non-regression purpose, etc.
>
> Nothing forbid you to write directly them under Haiku, but you *must* send
> their source code along ICMP new code.
> The best way to do that is to create them under your
> src/tests/kit/net/icmp_tests working copy and include them in your
> patch/zipfile.
>
> Oh. That's off topic, but have a great Olympic Games.
>
> Bye,
> Philippe.
>
>
--
Yin Qiu
Nanjing University, China
-------------------------------------------
- References:
- [haiku-gsoc] Re: [HCD08] ICMP functional test
- From: philippe.houdoin
Other related posts:
- » [haiku-gsoc] Re: [HCD08] ICMP functional test
- » [haiku-gsoc] Re: [HCD08] ICMP functional test
- [haiku-gsoc] Re: [HCD08] ICMP functional test
- From: philippe.houdoin