Commit Graph

16 Commits

Author SHA1 Message Date
Simon Goldschmidt
bb5ee3783a fix compiling/running tests on win32
- new files
- different warning settings
- all tests run in a single process (no fork)
2021-05-21 22:00:49 +02:00
Erik Ekman
5b7524e10e unit: Enable DNS
Avoid allocating in dns_init by enabling random source port.
2020-07-04 14:24:40 +02:00
Erik Ekman
2bf8fcd7c2 pbuf: Add pbuf_copy_partial_pbuf library function
Like pbuf_copy, but can copy part of a pbuf to an offset in another.
pbuf_copy now uses this function internally.

Replace pbuf_take_at loop in icmp6 with pbuf_copy_partial_pbuf().
2020-07-03 18:55:02 +02:00
Erik Ekman
90b3e45c31 pbuf: Add pbuf_copy test operating on chained pbufs
With the payload lengths not matching between source and destination.

Also remove redundant allocation check in other test, it is now done
in the test setup code.
2020-06-29 19:45:18 +02:00
Erik Ekman
bc1da0bddb pbuf: Remove redundant tests that pbufs are freed
Already checked by lwip_check_ensure_no_alloc() in teardown function.
2020-06-24 01:00:12 +02: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
4cec20230e Ensure that unit tests leave the stack in a clean state 2017-08-03 22:28:50 +02:00
goldsimon
5d10e1b6c3 test_pbuf: free pbufs at the end of tests 2017-06-29 20:44:14 +02:00
goldsimon
7617a76b19 added unit test to allocate zero length pbufs 2017-04-26 20:16:27 +02:00
goldsimon
288fc8ede3 fixed unit tests after changing memp stats 2016-07-08 10:20:04 +02:00
Dirk Ziegelmeier
d133999e1d Fix warnings in unit test code when compiling with stricter GCC settings 2016-06-23 22:30:37 +02:00
sg
767d0d9046 Fixed unit tests (compiler errors/warnings, coding style) 2015-08-03 20:41:49 +02:00
Erik Ekman
145efb1a33 Fix edge case in pbuf_take_at()
Writes to offsets pointing to the start of a pbuf in the chain
did nothing and just returned ERR_OK.

Added unit tests to verify the fix, and also
that pbuf_get_at()/pbuf_put_at() handles this case.
2015-08-03 20:34:08 +02:00
Simon Goldschmidt
a80c4d147c Unit test patch by Erik Ekman: use macro to store correct testcase name 2014-02-12 21:52:21 +01:00
Simon Goldschmidt
751deac9d1 Another fix to window scaling: support queueing more than 64 KByte in ooseq data 2014-02-12 21:34:19 +01:00
goldsimon
d690775ca1 Added unit test that pbuf_copy returns a correct error code for pbuf queues ending with a zero-length pbuf. 2012-05-03 20:11:23 +02:00