goldsimon
972b7c2bfd
sys_arch unit tests: refine test_sys_arch_waiting_fn a bit
9 years ago
Joel Cunningham
81e4726607
test_socket: conditional compile buffer trailer code
...
This code is marked as dead when BUF_SZ is a multiple of 4 (current
situation with unit tests)
This hopefully fixes a -Wunreachable-code failure found by Travis CI
9 years ago
Joel Cunningham
0a5a18e703
test_socket: add sendmsg/recvmsg TCP test
...
This migrates the sendmsg TCP test from socket examples (task #14408 )
to socket unit tests
Additionally, this adds support for testing recvmsg, creating a TCP
test for both sendmsg/recvmsg (referred to as msgapi test)
This also makes a small change to msgapi UDP to clear the receive
buffer after verifying the previous datagram
9 years ago
Joel Cunningham
551d76eadd
test_sockets: move loopback addr logic to utility function
...
This moves the loopback address creation logic to a utility function
so it can be shared with forth coming message API TCP test
9 years ago
Joel Cunningham
4c78ec7931
test_socket: replace {0} with memset
...
Using {0} broke Travis CI even though this should be correct for
initializing struct msghdr (see example in Linxu man pages:
http://man7.org/linux/man-pages/man3/cmsg.3.html )
Just use memset for now which is the common approach in LwIP codebase
9 years ago
Joel Cunningham
02e957de1e
test_socket: convert sendmsg test to use recvmsg
...
This converts the sendmsg test to use recvmsg for receiving, thus
exercising both sendmsg and recvmsg in a single test
This also adjusts the test naming to communicate all message APIs
(sendmsg/recvmsg) are being tested
9 years ago
goldsimon
dffb75c5fa
test_sockets: fix warning about unused variable "addr_size"
9 years ago
goldsimon
aa129f35a2
hopefully fix building unit tests on linux/clang
9 years ago
goldsimon
e1d818bb5f
sockets unit tests: removed commented-out test code :-/
9 years ago
goldsimon
b0444a63b0
tried to fix sockets unit tests; fix configuration to run with any NO_SYS setting and with/without IPv6 (IPv4 is required)
9 years ago
goldsimon
a42d1678eb
tcp unit tests: don't break later tests relying on loopif
9 years ago
Joel Cunningham
53fcd50870
task #14408 : move sendmsg UDP to unit tests
...
This commit moves the sendmsg UDP test from socket examples to socket
unit tests
The test has been converted to send/receive on the loopback interface
and also test a connected sendmsg with NULL msg_name
9 years ago
goldsimon
d820fb2f8d
Try to add a Filelists.mk file for the unit tests (to fix unix build of unit tests)
9 years ago
goldsimon
fc47f846ed
Fix and improve sockets unit test and unit test sys_arch (with a little help of tcpip.c)
9 years ago
goldsimon
8313c4d870
tried to add basic socket unit tests (nonsense only for now); made LOCK_TCPIP_CORE()/UNLOCK_TCPIP_CORE() overridable for that
9 years ago
Joel Cunningham
8bf402fd67
Fix unit test with assumed congestion avoidance
...
test_tcp_fast_rexmit_wraparound correctness relied on the congestion
window being in congestion avoidance so that only a single TCP_MSS
segment is sent upon ACKing the first segment.
It's not known whether the test was relying tcp_alloc() to set ssthresh
to 0 and thus start in congestion avoidance or if the test was working by
accident until changes in b90a54f989
This fixes the test by enforcing the requirement of starting in
congestion avoidance
Signed-off-by: goldsimon <goldsimon@gmx.de>
9 years ago
goldsimon
e9e9ec23b8
tcp unit tests: fixed that tcp_teardown() could lead to accessing a netif pointer that is not valid any more (netif added in test function stored on stack)
9 years ago
sg
b198c877db
fix compiling TCP unit tests with IPv6 enabled
9 years ago
Erik Ekman
6c9a9b9d99
Remove duplicate netif_dhcp_data() macro
...
Fix compilation of unit tests
9 years ago
sg
8760fb677f
fixed warnings in mdns unit tests
9 years ago
Dirk Ziegelmeier
1884c7e83f
Fix TCP unit tests after changes from "Add hook for TCP Initial Sequence Number generation" commit
...
(pcb->lastack and friends are not initialized during allocation any more, but by connect() / bind() call)
9 years ago
Dirk Ziegelmeier
7f319f5ec5
Fix compile of test_tcp.c unit test after introduction of tcp_next_iss hook
9 years ago
goldsimon
0e07ed4b13
fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that
9 years ago
Erik Ekman
b90682dc8b
Update email address
...
I am leaving Verisure at the end of the month.
10 years ago
goldsimon
96c3c48ba7
mdns: moved private things into mdns_priv.h
10 years ago
Dirk Ziegelmeier
e844159f0a
Fix warning in test_etharp.c
10 years ago
Dirk Ziegelmeier
11386a26d9
Fix compile of DHCP unit test
10 years ago
Dirk Ziegelmeier
5df88220c4
Fix compile of MDNS unit test with GCC
10 years ago
Dirk Ziegelmeier
a8c8e08984
Minor: cleanups in unit test code
10 years ago
Dirk Ziegelmeier
7f60cb3889
Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now
10 years ago
Dirk Ziegelmeier
fa6a2d48cc
Fix DHCP unit test after my last changes
10 years ago
Dirk Ziegelmeier
93b286e508
Also rename LWIP_MDNS to LWIP_MDNS_RESPONDER in unit tests...
10 years ago
Erik Ekman
4919932c49
Apply patch #8755 : Multicast DNS responder support from Erik Ekman
10 years ago
Dirk Ziegelmeier
36b9caed23
Fix compile of unit test
10 years ago
sg
a2fd68098e
minor: macros should not end with underscore(s)
10 years ago
Dirk Ziegelmeier
6af213787a
Fix clang address sanitizer errors in unit tests (buffers too small)
10 years ago
Erik Ekman
28dd0813ab
Disable SYS_LIGHTWEIGHT_PROT in unit tests
10 years ago
goldsimon
288fc8ede3
fixed unit tests after changing memp stats
10 years ago
Dirk Ziegelmeier
6af4215f27
Next try to fix test_udp.c (can't compile it at my current machine)
10 years ago
Dirk Ziegelmeier
c483520081
Fix compile of UDP unit test
10 years ago
Erik Ekman
efd3fb8f4e
Fix pedantic dhcp test error
...
../../../../lwip/test/unit/dhcp/test_dhcp.c:121:34: error: comma at end
of enumerator list [-Werror=edantic]
cc1: all warnings being treated as errors
10 years ago
Erik Ekman
94e502fc8a
Switch to C-style comments in test lwipopts
10 years ago
Dirk Ziegelmeier
d133999e1d
Fix warnings in unit test code when compiling with stricter GCC settings
10 years ago
Dirk Ziegelmeier
8dc77ef558
doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
...
Convert TODO -> @todo
10 years ago
Henrik Persson
b9a2ee8aaa
[PATCH] Drop instead of ASSERT in tcp_input header parsing
...
Since allowing input validation to trip the ASSERT handler is bad,
let's just drop the packets instead if validation fails.
Signed-off-by: sg <goldsimon@gmx.de>
10 years ago
Sylvain Rochet
37bb0b89f0
all: trivial include changes related to the new "lwip/priv/" include directory
11 years ago
Sylvain Rochet
ce98bc9437
test: etharp: Fixed const warning
11 years ago
Erik Ekman
e8c0ba2a47
Fix tests after ip4_current_header() made const
11 years ago
sg
851e03966d
Fixed more compiler warnings for unit tests
11 years ago
Erik Ekman
38e3299675
test_etharp: Fix warning about braces
...
../../lwip-trunk/test/unit/etharp/test_etharp.c:16:8: warning: missing
braces around initializer [-Wmissing-braces]
struct eth_addr test_ethaddr = {1,1,1,1,1,1};
^
11 years ago