[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Building automated test cases
From: |
Frédéric BERNON |
Subject: |
Re: [lwip-users] Building automated test cases |
Date: |
Sun, 30 Mar 2008 12:08:15 +0200 |
So, perhaps can you provide a test for any small part of lwIP? Next, is
"check" the best tool for such automated test cases ? What are the others
products like that ?
----- Original Message -----
From: "Erik Ekman" <address@hidden>
To: "Frédéric BERNON" <address@hidden>; "Mailing list for lwIP
users" <address@hidden>
Sent: Sunday, March 30, 2008 11:51 AM
Subject: Re: [lwip-users] Building automated test cases
On 3/30/08, Frédéric BERNON <address@hidden> wrote:
In all cases, adding some testing tools for lwip could be good, but I
don't
know "check", but I'm afraid it give lot of "boring" code in the lwIP
code.
Perhaps I'm wrong ? Next, to test the stack, I suppose you have to
implement
a virtual device which simulate your input/output bytes arrays?
Can you give us a small sample of the "check" use with lwIP ?
I think it would be possible to do add all the tests without changing
any of the code in lwip/src directory. For testing the full stack, you
are right that a fake netif is needed, but for only testing smaller
parts of the stack it is not needed.
Having lots of small test cases gives greater confidence when doing
changes to the stack, it is easy to see that the stuff still works.
Check runs on *nix systems and also on cygwin, which I guess is good enough.
Testing of for instance netif/etharp.c could look like this:
Testing initialization
Testing clearing of old entries in arp table
Inserting an entry and testing locating it
Testing filling arp table
Testing updating arp table
Testing handling of incoming arp packets
Testing adding mac addresses to packets
Testing sending arp requests
The test code could be placed under lwip/test/netif/test_etharp.c for
instance, and would not bother anyone not interested in the tests. The
original etharp.c would remain unchanged.
/Erik
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users