Fix socket creation on macos. SOCK_NONBLOCK does not exists. #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
socket.SOCK_NONBLOCKdoes not exist on macOS, so creating a dbus instance with an unix path fails. This fix uses same socket creation as with tcp. This works on macOS 10.15.6 with dbus 1.12.20, but I don't know if it has any consequences on other platforms.Running the tests locally with:
Where
DBUS_LAUNCHD_SESSION_BUS_SOCKETis something like/private/tmp/com.apple.launchd/unix_domain_listener.Results in two failed tests:
If I use
pathinstead ofabstractas dictionary key intest_tcp_connection_with_forwardingthe test passes.