lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] test_mdns.c troubles


From: goldsimon
Subject: Re: [lwip-devel] test_mdns.c troubles
Date: Wed, 19 Dec 2018 15:19:34 +0100
User-agent: K-9 Mail for Android


Gisle Vanem wrote:
>Trying to build the unit-test on Windows (MSVC) with the newly
>added test_mdns.c has given me lots of griefs:
>
>   ../../src/apps/mdns/mdns.c(85): fatal error C1189:
>#error:  "If you want to use MDNS, you have to define LWIP_RAND=(random
>function)
>   in your lwipopts.h"

Yes, Dirk already discovered that, too. I don't know what's the correct guy for 
that, currently.

>But then further down (line 121):
>   #ifdef LWIP_RAND
>   /* first probe timeout SHOULD be random 0-250 ms*/
>
>Why an '#error' and an '#ifdef' for the same condition?
>
>AFAICS a good 'LWIP_RAND()' function for Windows
>is supposed to be 'sys_win_rand()' in contrib/ports/win32/sys_arch.c.
>
>But compiling this sys_arch.c from 'test/unit' picks up the
>"wrong" sys_arch.h with a 'sema_t' incompatible with
>'contrib/ports/win32/sys_arch.c'. In "unit-test mode", is
>this 'sema_t' supposed to be this simple?
>
>Carefully revising my '-I' paths fixed that. But having 2
>sys_arch.c for the same program is IMHO not very pretty.
>Can some 'sys_*' files be renamed to 'test_sys*' to avoid
>more confusion?
>
>Besides, I have some doubt regarding the Check lib.
>Running 'lwip_unittests.exe', gives:
>Running suite(s): IPv4
>  IPv6
>  UDP
>  TCP
>  TCP_OOS
>  DEF
>  MEM
>  NETIF
>  PBUF
>Assertion "pbuf_copy() does not allow packet queues!" failed at line
>1002 in ../../src/core/pbuf.c
>  TIMERS
>  ETHARP
>  DHCP
>Assertion "overload in file/sname" failed at line 1589 in
>../../src/core/ipv4/dhcp.c
>Assertion "overload in file/sname" failed at line 1589 in
>../../src/core/ipv4/dhcp.c
>Assertion "overload in file/sname" failed at line 1589 in
>../../src/core/ipv4/dhcp.c
>  MDNS
>  MQTT
>  SOCKETS
>Assertion "tcp_connect: can only connect from state CLOSED" failed at
>line 1083 in ../../src/core/tcp.c
>Assertion "tcp_connect: can only connect from state CLOSED" failed at
>line 1083 in ../../src/core/tcp.c
>Assertion "tcp_connect: can only connect from state CLOSED" failed at
>line 1083 in ../../src/core/tcp.c
>Assertion "tcp_connect: can only connect from state CLOSED" failed at
>line 1083 in ../../src/core/tcp.c
>Assertion "tcp_connect: can only connect from state CLOSED" failed at
>line 1083 in ../../src/core/tcp.c
>100%: Checks: 110, Failures: 0, Errors: 0
>
>Shouldn't these "Assertion" increment the "Failures:" count?

No. There are tests that check invalid usage. They shouldn't fail.

Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]