Dirk Ziegelmeier
d9c9b55766
CMake: add an include guard since files are intended to be included in other projects
2018-10-05 08:02:34 +02:00
Simon Goldschmidt
eeee2b1c55
dhcp: adapt unit test to ignoring packets without END
2018-07-03 20:47:49 +02:00
Simon Goldschmidt
824ebbe0e9
tcp: fix RTO timer not working if link is down
...
... and added some test cases for this situation
See bug #54139
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-19 22:48:06 +02:00
Simon Goldschmidt
e61b925709
try to fix compiling with gcc & clang
2018-06-14 15:01:57 +02:00
Simon Goldschmidt
39faa8f61d
added tests for ip6addr_ntoa_r
2018-06-14 12:30:14 +02:00
Simon Goldschmidt
b0e5eeb7d2
udp: prefer correctly bound pcbs when receiving broadcast
...
See bug #53301
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 22:01:18 +02:00
Simon Goldschmidt
38614e4f3e
unit tests: remove dummy netif input function
...
This partly reverts a26a2e13
after removing that NULL check again.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 10:46:44 +02:00
Simon Goldschmidt
392c676ef5
fix bug #53273 : IPv6 link-local address generation for non-ethernet type netif does not convert byte order
2018-06-13 08:57:17 +02:00
Simon Goldschmidt
0c5133d7cf
fix ip6addr_aton for non-shortened ipv4 mapped addresses
2018-06-12 21:48:32 +02:00
Simon Goldschmidt
a26a2e1340
adapt unit tests to additional NULL checks
2018-06-12 13:47:13 +02:00
Simon Goldschmidt
2837bb310c
fix ip6addr_aton handling IPv4-mapped addresses
...
... and added a unit test for it
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-11 22:21:31 +02:00
Simon Goldschmidt
f8e7cccf21
add new ip6 tests to (c)make list files
2018-06-10 19:23:02 +02:00
Simon Goldschmidt
fd050b8a97
fix bug #53971 Lwip sends Router Solicitation on address changes
...
... and add a unit test for it.
Moved resetting netif->rs_count from all reports to link-up and netif-up only.
While at it, clean up the interface a bit so that netif->rs_count is touched
from nd6.c only.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-08 22:18:50 +02:00
Simon Goldschmidt
d4845abac6
test_etharp: fix compiler warning
2018-06-08 20:03:51 +02:00
Dirk Ziegelmeier
f116bc37d1
Cleanups in CMake files
2018-04-30 22:29:07 +02:00
Dirk Ziegelmeier
ab5bc1e766
Work on CMake build system - add Filelists.cmake for unit tests
2018-04-27 23:58:36 +02:00
goldsimon
4a22d6d5a2
sockets_stresstest: fix typo (&1, not %1)
2018-04-20 07:52:35 +02:00
goldsimon
71c13c6079
Improve the socket stress test to better test fullduplex
2018-04-18 22:03:11 +02:00
goldsimon
61a1b98cc9
various IPv6-only compile fixes
2018-03-07 20:55:00 +01:00
Joel Cunningham
b28e979739
unit: write out XML file
...
This writes out the results of the unit tests in an XML file called
lwip_unittests.xml in the same directory as the unittests executable.
See https://libcheck.github.io/check/doc/check_html/check_4.html#XML-Logging
for an example of the ouput. Of particular use is the duration field, for
each test and for the entire test run.
2018-03-04 10:42:54 -06:00
Joel Cunningham
b1258bf8e6
unit: speed up test_pbuf_queueing_bigger_than_64k
...
Speed up test_pbuf_queueing_bigger_than_64k by using memcmp rather than
a byte by byte comparision. This allows using word aligned compares
within the memcmp implementation
This fixes a unit test timeout on my Windows 10 box with WSL which was
taking longer than 4 seconds for the unix port unit test to complete
See failure details in https://savannah.nongnu.org/patch/index.php?9579
2018-03-03 17:43:23 -06:00
goldsimon
ca0a356221
sockets_stresstest: don't compile when LWIP_SOCKET is disabled
2018-02-18 08:56:57 +01:00
goldsimon
e6f0700c81
fuzz: fix compile error, ignore 0 length pbufs
2018-02-18 08:56:23 +01:00
goldsimon
58de2af5f2
test/fuzz: add some applications, add an experimental multi-packet mode
...
The experimental multi-packet mode splits input bytes depending on a length
decoded from the first 2 bytes and does that until the end of input.
To use this mode, compile with "make D=-DLWIP_FUZZ_MULTI_PACKET"
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-02-15 14:35:08 +01:00
goldsimon
7b6d2870ca
test: add a unit test for TCP_CHECKSUM_ON_COPY with retransmissions
...
This triggers bug #50914 (TCP_CHECKSUM_ON_COPY when adding data to
retransmission) when data is added to an already transmitted segment
with an uneven length of tcp data.
2018-02-12 12:34:45 +01:00
goldsimon
cff31ba5de
test: enable LWIP_CHECKSUM_ON_COPY and TCP_CHECKSUM_ON_COPY_SANITY_CHECK
...
To find and verify bug #50914 (TCP_CHECKSUM_ON_COPY when adding data to
retransmission), enable checksum-on-copy for the unit tests.
2018-02-12 12:32:40 +01:00
goldsimon
b1b6275110
socket/netconn recv: FIN should only be reported once
...
FIN should only be reported once (as '0' for sockets, as 'ERR_CLSD' for
netconns). Before this change, ERR_CLSD was returned forever...
This is the 2nd try. First try (commit ebcae98ae6
)
was buggy in that it could drop the FIN if it was read together with data
(reverted in commit ebcae98ae6
).
This version fixes this by adding an apiflag and a netconn flag to keep
track of this.
2018-02-04 20:16:53 +01:00
goldsimon
fe828634ac
socket unit test: check receiving FIN together with data works
2018-02-04 20:14:02 +01:00
goldsimon
a7a8d9273c
sockets_stresstest: replace printf with LWIP_DEBUGF, fix unused arg
2018-01-17 19:46:32 +01:00
goldsimon
f343a67b40
netif unit test: add some more tests for ext callbacks
2018-01-13 15:22:09 +01:00
goldsimon
e645d00484
netif unit test: fix -Werror=c++-compat
2018-01-13 15:16:12 +01:00
goldsimon
734b6ab57a
netif: ensure netif_set_addr() only results in one "ext_status_callback"
...
This can be used e.g. in mdns to create one, not multiple "changed" triggers
if IP address and netmask change at the same time.
2018-01-12 23:11:38 +01:00
goldsimon
fa75ffed9d
unit tests: added test_netif (checking ext_callbacks only, for now)
2018-01-12 22:27:15 +01:00
Dirk Ziegelmeier
990c25d4f3
Add unit test for a long running timer
2018-01-12 12:37:16 +01:00
Dirk Ziegelmeier
b6b14438b7
Rename lwip_sys_timers_get_next_timout() to sys_timeouts_get_next_timeout()
2018-01-11 09:53:07 +01:00
goldsimon
1affbb4bd5
unit tests: fixed testing itoa with too small buffer
2018-01-08 21:38:16 +01:00
Dirk Ziegelmeier
d7566216c9
Remove Simon's compile fix in test_timers.c, it is not needed any more. The function is now used.
2018-01-08 13:02:58 +01:00
Dirk Ziegelmeier
b4768f1711
Once again: Fix build warnings in test_timers.c
2018-01-08 08:34:17 +01:00
Dirk Ziegelmeier
3f30bfae28
lwipopts.h for unit tests: Increase number of timeouts
2018-01-08 07:34:38 +01:00
Dirk Ziegelmeier
eaca067c7d
Make _cyclic_ timers interval more deterministic - next timeout is calculated from last due time instead of relative to current time
...
This eliminates the cyclic timer jitter
2018-01-08 07:16:49 +01:00
Dirk Ziegelmeier
dd3861720f
Fix bug #52748 : the bug in timeouts.c by reimplementing timer logic to use absolute instead of relative timeout values
2018-01-08 07:16:47 +01:00
goldsimon
e415151cf2
minor style change: fixed indentation
2018-01-05 21:30:32 +01:00
goldsimon
40c0f21b9e
Added dummy sys_mbox_trypost to unit test port
2018-01-05 21:30:07 +01:00
goldsimon
c4867b878c
Try to silence unused function warning in travis
2018-01-05 21:12:31 +01:00
Dirk Ziegelmeier
1623c3e2cc
Add test for bug 52748
...
Disabled :-) -> travis doesn't complain
2018-01-05 08:20:36 +01:00
Dirk Ziegelmeier
8de4900641
Work on timer unit tests
2018-01-05 07:49:39 +01:00
Dirk Ziegelmeier
8542556a03
Fix build warning in test_def.c
2018-01-04 13:37:29 +01:00
Dirk Ziegelmeier
756b7431a7
Start implementing unit tests for timers
2018-01-04 13:37:05 +01:00
Joel Cunningham
a98d3a4efb
Add test_def.c to Filelists.mk
2017-12-27 09:13:31 -06:00
goldsimon
c6887522fe
Fixed lwip_itoa (bug #51729 ) and added unit tests for it
2017-12-23 20:35:18 +01:00