patchlwIP - A Lightweight TCP/IP stack - Patches: patch #7883, Unit test fixes

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7883: Unit test fixes

Submitter:  Erik Ekman <yarrick>
Submitted:  Sun 04 Nov 2012 10:52:06 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Wed 12 Feb 2014 09:15:29 PM UTC, comment #2: 

Done everything but the "Minor-fixes-to-dhcp-relay-test" patch, which does not work after applying.

Thanks for the patches.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 04 Nov 2012 11:15:28 AM UTC, comment #1: 

Instead of expecting abort signal I changed the LWIP_PLATFORM_ASSERT to nothing and it is now a normal test.

Erik Ekman <yarrick>
Group Member
Sun 04 Nov 2012 10:52:06 AM UTC, original submission:  

I have fixed the test cases so they run and work on unix. The test_pbuf file was missing and its test expected to abort. A dhcp test had const arrays which were changed - this caused a segfault. I have also modified the test macros to include the test name in any errors.

Please pull the changes from the 'toupstream' branches at:
git://github.com/yarrick/lwip.git
git://github.com/yarrick/lwip-contrib.git


Changes in lwip:

commit 8c933cb55ee4f56b9b08114e4c495c7fa036bca5
Author: Erik Ekman <erik@kryo.se>
Date:   Wed Sep 5 20:09:09 2012 +0200

    Expect SIGABRT on pbuf copy test

    The test_pbuf_copy_zero_pbuf test is expected to fail the assert check and
    abort. Configure check to expect this signal to avoid failing the test.

 test/unit/core/test_pbuf.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

commit 008a69ef5f98cc5890079bc34ec19149013304f9
Author: Erik Ekman <erik@kryo.se>
Date:   Sun Nov 4 11:28:22 2012 +0100

    Minor fixes to dhcp relay test

 test/unit/dhcp/test_dhcp.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

commit 69cbfbf979dfae9bfcb8dcace7a8229df4fdfc45
Author: Erik Ekman <erik@kryo.se>
Date:   Fri Aug 31 18:45:12 2012 +0200

    Use macro to store correct testcase name

    Since check uses macros to get the testcase name, and the tests are added from an array, the error looks like this:
    ../../../../lwip/test/unit/core/test_pbuf.c:49:E:Core:tests[i]:0: (after this point) Received signal 6 (Aborted)
    (Note the tests[i] part)

    This patch creates a new macro used when listing test functions in the array, which stores the name earlier.
    Then the test_add macro is modified to use the correct test name. New error:
    ../../../../lwip/test/unit/core/test_pbuf.c:49:E:PBUF:test_pbuf_copy_zero_pbuf:0: (after this point) Received signal 6 (Aborted)

    This makes it easier to find the name of the failing test function.

 test/unit/core/test_mem.c      |  6 +++---
 test/unit/core/test_pbuf.c     |  6 +++---
 test/unit/dhcp/test_dhcp.c     | 12 +++++------
 test/unit/etharp/test_etharp.c |  6 +++---
 test/unit/lwip_check.h         | 18 +++++++++++++----
 test/unit/tcp/test_tcp.c       | 18 ++++++++---------
 test/unit/tcp/test_tcp_oos.c   | 46 +++++++++++++++++++++---------------------
 test/unit/udp/test_udp.c       |  6 +++---
 8 files changed, 64 insertions(+), 54 deletions(-)

commit 071a2402729ffcbb11986076b940e91557fa5c61
Author: Erik Ekman <erik@kryo.se>
Date:   Thu Aug 30 21:57:28 2012 +0200

    Don't mark arrays as const since they are modified by the test

 test/unit/dhcp/test_dhcp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changes in lwip-contrib:


commit 9c7141db139d2e1c554bc645c14ba51787148690
Author: Erik Ekman <erik@kryo.se>
Date:   Thu Aug 30 21:54:07 2012 +0200

    Include core/test_pbuf.c file in build

 ports/unix/check/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Erik Ekman <yarrick>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by yarrick (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-12 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code