forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NameResolutionPal.Unix enabled async name resolution (dotnet#34633)
* Native implementation * Native tests * Managed implementation * Managed tests * Revert Interop.GetHostName change -- it's needed at other places too So this change was a bad idea ;-) * Fixed builds failures due to "unused parameter" * Native: move struct addrinfo hint from stack-alloc to heap-alloc Before I didn't last the async operation as it was on the stack. Now it's part of the GetAddrInfoAsyncState which gets heap allocted, so it last. I'm not sure if addrinfo needs to last the async operation, as the native tests pass either way. This change makes it more correct, nevertheless. * PR feedback * Fixed leak in tests.c according to valgrind's run * Fixed bug due to marshalled string argument * More managed PalTests * Revert "Native tests" This reverts commit 8c955bc and d7cb2be. * Handle the case of HostName="" and tests for this * Use flexible array member to hold the address in struct state Cf. dotnet#34633 (comment) * Nits in native layer Cf. dotnet#34633 (comment) * Fixed native merge conflict + added AddressFamily-handling * Fixed managed merge conflicts + added AddressFamily-handling * Updated NameResolutionPalTests for AddressFamily * Removed EnsureSocketsAreInitialized On Unix this was a nop anyway, dotnet#43284 removed it from Windows. * Fixed bug at native side Seems like "hint" must last the async operation, so stack-only won't do it. Tests will crash with ``` The active test run was aborted. Reason: Test host process crashed : .../runtime/src/libraries/Native/Unix/System.Native/pal_networking.c (315): error -7: Unknown AddrInfo error flag. Unknown error -7 (0 failed) ``` If put into the heap, it succeeds. * Refactor setting of the address family into TrySetAddressFamily * Fixed unused parameter warning / failure * Little cleanup * Fixed (unrelated) test failures Cf. dotnet#34633 (comment) * Made LoggingTest async instead of GetAwaiter().GetResult() * Use function pointer * Use OperatinngSystem instead of RuntimeInformation in tests * PR Feedback for CMake * Update src/libraries/Native/Unix/System.Native/extra_libs.cmake Co-authored-by: Günther Foidl <[email protected]> * Revert "Update src/libraries/Native/Unix/System.Native/extra_libs.cmake" This reverts commit fa9c6f9. * Another to build single file host Based on dotnet#34633 (comment) * Test for !Windows instead excluding several Unix-flavors Cf. dotnet#34633 (comment) Co-authored-by: Vladimir Sadov <[email protected]>
- Loading branch information
Showing
12 changed files
with
723 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.