tasklwIP - A Lightweight TCP/IP stack - Tasks: task #14408, Move sendmsg tests from socket...

 
 

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

task #14408: Move sendmsg tests from socket examples to socket unit tests

Submitter:  Joel Cunningham <jcunningham>
Submitted:  Thu 16 Mar 2017 10:24:31 PM UTC
   
 
Category:  socket/netconn Should Start On:  Thu 16 Mar 2017 12:00:00 AM UTC
Should be Finished on:  Thu 16 Mar 2017 12:00:00 AM UTC Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  jcunningham Percent Complete:  100%
Open/Closed:  Closed Planned Release:  None
Effort:  0.00

Mon 20 Mar 2017 08:32:05 PM UTC, comment #5: 

I'll try to put up a first example of a blocking test, if only to verify the test-sys_arch...

Simon Goldschmidt <goldsimon>
Group administrator
Mon 20 Mar 2017 01:31:59 PM UTC, comment #4: 

Simon,

Thanks for the update, I'll make a note to look at the blocking implementation

Joel Cunningham <jcunningham>
Group Member
Sat 18 Mar 2017 09:23:05 AM UTC, comment #3: 

Regarding blocking behaviour: I haven't tested that yet, but the idea was to set a callback (by passing it to test_sys_arch_wait_callback()) that gets called when sys_arch blocks on a semaphore or mbox (not required with mutexes since we only have one thread).
I've just refined the callback a bit to be type safe.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 17 Mar 2017 10:20:04 PM UTC, comment #2: 

sendmsg TCP moved to socket unit tests (using loopback) in:

lwip: 0a5a18e7034db789f3f632876aaaf4ea52b910ca
lwip-contrib: 2ff2c48e66250054665bd1bf3183d1ec4e329a27

The only thing that wasn't transferrable was a test using blocking sockets, but if we get blocking behavior working in the unit test, it will be trivial to add that back


Joel Cunningham <jcunningham>
Group Member
Fri 17 Mar 2017 12:39:27 AM UTC, comment #1: 

sendmsg UDP test has been moved to socket unit tests.  I expanded the test a little bit by also adding a test case for connecting the UDP socket (to itself) and using NULL for msg_name

lwip: 53fcd508708e60335e7f624db2fd2752ff0a240b
lwip-contrib: 2f996820e4ccad839b3c14a183ef4d95fced9313

I also noticed the unit tests don't yet work for IPv6.  I verified my test builds with LWIP_IPV6 set to 1, but the tests lockup before calling the sendmsg UDP so there is another problem going on.  I didn't have a chance to dig into it yet

Joel Cunningham <jcunningham>
Group Member
Thu 16 Mar 2017 10:24:31 PM UTC, original submission:  

Move sendmsg tests to socket unit tests (currently in socket examples)

Also improve test by adding support for exercising the various different error cases (maximum size exceeded, invalid struct msghdr, etc)

Joel Cunningham <jcunningham>
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 jcunningham (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
    2017-03-17 jcunningham Percent Complete50% 100%
        Open/ClosedOpen Closed
    2017-03-17 jcunningham Percent Complete0% 50%

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code