[riot-commits] [RIOT-OS/RIOT] c90654: tests/lwip_sock_tcp: fix -EADDRINUSE test

Marian Buschsieweke noreply at github.com
Fri Jul 31 15:08:19 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: c90654d4cc3a77c144c22a48051ef9c92f90f0c2
      https://github.com/RIOT-OS/RIOT/commit/c90654d4cc3a77c144c22a48051ef9c92f90f0c2
  Author: Martine S. Lenders <m.lenders at fu-berlin.de>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M tests/lwip_sock_tcp/main.c

  Log Message:
  -----------
  tests/lwip_sock_tcp: fix -EADDRINUSE test

When compiled with `LWIP_IPV4=1 LWIP_IPV6=1` this test currently fails
in current master. This "regression" was introduced with 035acc2e5388.
However, after some debugging I think that commit actually revealed a
problem with the test rather than introducing a bug.

The test starts the central server, and then checks if opening a
listening socket on the same port causes an `-EADDRINUSE` error.
The server, on the other hand, starts with `SOCK_FLAGS_REUSE_EP`, so of
course the listening operation may succeed. Instead, let's just call
`sock_tcp_listen` twice with two distinct queue objects. Way easier and
also more correct.


  Commit: ee1a10f2e4511e6bf9634b8d9a6a03e097b9bd53
      https://github.com/RIOT-OS/RIOT/commit/ee1a10f2e4511e6bf9634b8d9a6a03e097b9bd53
  Author: Marian Buschsieweke <maribu at users.noreply.github.com>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M tests/lwip_sock_tcp/main.c

  Log Message:
  -----------
  Merge pull request #14668 from miri64/tests/fix/sock_tcp

tests/lwip_sock_tcp: fix -EADDRINUSE test


Compare: https://github.com/RIOT-OS/RIOT/compare/f48147b585ff...ee1a10f2e451


More information about the commits mailing list