Skip to content

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jul 31, 2020

Backport of #14668

Contribution description

When compiled with LWIP_IPV4=1 LWIP_IPV6=1 this test currently fails in current master. This "regression" was introduced with 035acc2. 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.

Testing procedure

LWIP_IPV4=1 LWIP_IPV6=1 make -C tests/lwip_sock_tcp -j16 flash test

should succeed (but fails in master)

Issues/PRs references

See #14665 (comment)

When compiled with `LWIP_IPV4=1 LWIP_IPV6=1` this test currently fails
in current master. This "regression" was introduced with 035acc2.
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 c90654d)
@miri64 miri64 added Area: network Area: Networking Area: pkg Area: External package ports Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Jul 31, 2020
@miri64 miri64 requested a review from maribu July 31, 2020 13:12
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Same reasoning as the original PR and the test also works here.

@miri64 miri64 merged commit 531d96a into RIOT-OS:2020.07-branch Jul 31, 2020
@miri64 miri64 deleted the backport/2020.07/tests/fix/sock_tcp branch July 31, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: pkg Area: External package ports Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants