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
988ce1e80e
netif: Add test for netif_find
2021-02-27 12:28:14 +01:00
Erik Ekman
74231d6873
netif: Add test for netif_is_flag_set()
2021-02-08 19:29:33 +01:00
Erik Ekman
264a5a3e97
Rename IP and Ethernet equality checkers from _cmp to _eq
...
Functions ending in cmp are expected to return 0 on equality but these
return non-zero.
eth_addr_cmp -> eth_addr_eq
ip_addr_cmp -> ip_addr_eq
ip4_addr_cmp -> ip4_addr_eq
ip6_addr_cmp -> ip6_addr_eq
ip_addr_netcmp -> ip_addr_net_eq
ip4_addr_netcmp -> ip4_addr_net_eq
ip6_addr_netcmp -> ip6_addr_net_eq
ip_addr_cmp_zoneless -> ip_addr_zoneless_eq
ip6_addr_cmp_zoneless -> ip6_addr_zoneless_eq
ip6_addr_cmp_zone -> ip6_addr_zone_eq
ip6_addr_netcmp_zoneless -> ip6_addr_net_zoneless_eq
ip6_addr_nethostcmp -> ip6_addr_nethost_eq
ip6_addr_cmp_packed -> ip6_addr_packed_eq
ip6_addr_cmp_solicitednode -> ip6_addr_solicitednode_eq
All call sites have been changed, and fallback macros have been added to not
break external users.
2020-07-07 18:51:45 +02:00
Erik Ekman
047f3b3306
dns: Verify setting/getting servers in unit test
2020-07-04 18:57:41 +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
Erik Ekman
ea111c511e
unit: Support check v0.13.0 and later
...
Function name no longer needs to be fed separately when adding tests.
Also fix collision of non-static net_test variables in dhcp and netif
tests.
2020-06-19 15:39:15 +02:00
Simon Goldschmidt
dae8eb8d6e
adapt unit test to new netif ext callback reason
2020-01-13 19:37:59 +01: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
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
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
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
goldsimon
c6887522fe
Fixed lwip_itoa (bug #51729 ) and added unit tests for it
2017-12-23 20:35:18 +01:00
goldsimon
1710fc1a89
Fix a corner case of double-free in the heap
2017-09-25 22:29:02 +02:00
goldsimon
f058364d7f
Added two simple unit tests for illegal calls to mem_free()
2017-09-25 21:38:00 +02: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
sg
a2fd68098e
minor: macros should not end with underscore(s)
2016-08-08 21:47:53 +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
goldsimon
df16a7c4f3
Fixed compiler warnings in unit tests
2015-03-06 07:39:06 +01:00
goldsimon
0ff98eb2f5
mem: added an MEMP_OVERFLOW_CHECK implementation for MEM_USE_POOLS; added another unit test
2014-12-10 09:48:50 +01:00
Simon Goldschmidt
dbd125c714
Fixed bug #35874 reserved identifier violation (removed leading underscores from header include guards)
2014-05-19 21:46:18 +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
Simon Goldschmidt
bcfe3dacc6
fixed unit tests (one TCP test failed, removed comma at the end of array initializers)
2011-09-26 22:09:27 +02:00
goldsimon
52970c2459
Renamed mem_realloc() to mem_trim() to prevent confusion with realloc()
2010-02-19 16:23:46 +00:00
goldsimon
f5d4f3d83c
For wrong configurations, let the test fail instead of the compiler
2010-01-27 20:37:02 +00:00
goldsimon
e0c5c4de88
Fixed bug #28679 : mem_realloc calculates mem_stats wrong and added test case for it
2010-01-18 17:45:41 +00:00