Skip to content

Mark getaddrinfo tests as non-deterministic#285

Closed
patricoferris wants to merge 1 commit intoocaml-multicore:mainfrom
patricoferris:fix-getaddr-tests
Closed

Mark getaddrinfo tests as non-deterministic#285
patricoferris wants to merge 1 commit intoocaml-multicore:mainfrom
patricoferris:fix-getaddr-tests

Conversation

@patricoferris
Copy link
Copy Markdown
Collaborator

On macOS Catalina these tests return the same list only with the `UDP entry before thee `TCP entry, so either they should be marked as non-deterministic (as in this PR) or we need a stable way to sort the list before returning it.

@talex5
Copy link
Copy Markdown
Collaborator

talex5 commented Aug 22, 2022

Maybe we should have getaddrinfo_stream and getaddrinfo_datagram to limit the results to a specific type?

The order of results from getaddrinfo is significant, so we shouldn't sort in the function itself. man getaddrinfo says:

Normally, the application should try using the addresses in the order in which they are returned. The sorting function used within getaddrinfo() is defined in RFC 3484; the order can be tweaked for a particular system by editing /etc/gai.conf

However, we could sort the results in the tests.

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.

2 participants