Skip to content

Run some tests on Windows#415

Open
chrysn wants to merge 23 commits into
masterfrom
test-windows
Open

Run some tests on Windows#415
chrysn wants to merge 23 commits into
masterfrom
test-windows

Conversation

@chrysn
Copy link
Copy Markdown
Owner

@chrysn chrysn commented Apr 29, 2026

In the latest update to udp6 I claimed that RECVPKTINFO was widely supported by now, so I thought I'd just run tests on Windows to see whether this even applies there. (Works on the widesprad UNIXes, including Android and MacOS in recent Python versions).

Turned out that while IPV6_RECVPKTINFO is still not there yet, according to https://learn.microsoft.com/en-us/windows/win32/winsock/ipv6-pktinfo they just use a different name for the same thing, so giving it a try.

(Running on GitHub as they're offering Windows runners; I get that Codeberg can't do this, but providing proprietary OS runners is probably the one thing GH is good for now still).

chrysn added 23 commits April 23, 2026 00:32
This is a bit excessive in terms of the cases it covers, but currently
necessary because the regular Site handling of UPA is otherwise not
visible to aiocoap-rd.
The fallback check was erroneous as every Message has a request (but it
may be None).

This triggered when data POSTed to the registration resource had no
content format.
The failure to recognize the own remote is covered up by
determine_remote creating a sufficiently similar object after it was not
recognized in the fast path. This change prepares for remotes being
reused more.
The test counts messages, and on loaded systems, it can easily trigger
due to the high number of repetitions.
The functions have been split that way already in the lower parts of MID
handling, and this allows for a future two-pass interface.

This has a regression in that fill_or_recognize_remote now
fails when called by a user; a determination has yet to be made whether
that is even considered public.
This allows using role reversal when multiple ports are in use: Only if
no transport "feels responsible" for a message, other transports
(starting from the first) are asked whether they can route it.
On the off chance an application is using this even though it was not
described as stable, things should (!) keep working with a warning.
@chrysn chrysn self-assigned this Apr 29, 2026
@chrysn
Copy link
Copy Markdown
Owner Author

chrysn commented Apr 29, 2026

The biggest roadblock to using something udp6-ish (maybe in future by using connected sockets for some tasks to get around the need for recverr, or by using MacOS style ICMP sockets if they run on Win too) even on Windows is that for recvmsg we run an own RecvmsgDatagramProtocol, and that'd need a different impl on Windows because there is no add_reader there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant