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

Martine Lenders noreply at github.com
Fri Jul 31 17:14:55 CEST 2020


  Branch: refs/heads/2020.07-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 83a75b60f894461bafceb903db752cd863f68cdf
      https://github.com/RIOT-OS/RIOT/commit/83a75b60f894461bafceb903db752cd863f68cdf
  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.

(cherry picked from commit c90654d4cc3a77c144c22a48051ef9c92f90f0c2)


  Commit: 531d96a932bee72dfb19a738556844baf385a4d4
      https://github.com/RIOT-OS/RIOT/commit/531d96a932bee72dfb19a738556844baf385a4d4
  Author: Martine 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:
  -----------
  Merge pull request #14670 from miri64/backport/2020.07/tests/fix/sock_tcp

tests/lwip_sock_tcp: fix -EADDRINUSE test [backport 2020.07]


Compare: https://github.com/RIOT-OS/RIOT/compare/398a06655298...531d96a932be


More information about the commits mailing list