* Revert "NameResolutionPal.Unix: fixed loss of address family information in async lookup (#47171)"
This reverts commit 2f2593177d.
* Revert "NameResolutionPal.Unix enabled async name resolution (#34633)"
This reverts commit f4ae905942.
* Fixed unreachable code bug
SupportsGetAddrInfoAsync is a constant on *nix. Tests check if it's supported and return if not, so unreachable code was created on *nix.
* Restored warning CS0162
* Disable failing DNS tests on Linux
As there's currently no infrastructure to disable just for SLES,
disabling for its parent, which is Linux.
* Disable failing dns tests for sles only
* 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 8c955bc4bd1d0dbe4b2823f4327ad52bf9856fd7 and d7cb2be7eb3ec09f27a537c89341fb63e176e0bc.
* Handle the case of HostName="" and tests for this
* Use flexible array member to hold the address in struct state
Cf. https://github.com/dotnet/runtime/pull/34633#discussion_r406447963
* Nits in native layer
Cf. https://github.com/dotnet/runtime/pull/34633#discussion_r406494734
* 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, https://github.com/dotnet/runtime/pull/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. https://github.com/dotnet/runtime/pull/34633#issuecomment-746377633
* 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 fa9c6f90b7ef5033e3c30a46dfe34dc47d5ef91e.
* Another to build single file host
Based on https://github.com/dotnet/runtime/pull/34633#issuecomment-756045320
* Test for !Windows instead excluding several Unix-flavors
Cf. https://github.com/dotnet/runtime/pull/34633#issuecomment-760205332
Co-authored-by: Vladimir Sadov <[email protected]>
* disable vs restore in vs for projects targeting platform specific older frameworks
* Add infra to auto-update solution files for restore
* Add NuGet.config files for solutions affected by restore issue
Co-authored-by: Viktor Hofer <[email protected]>
* Delete NetEventSource.IsEnabled
These were all meant to be changed to NetEventSource.Log.IsEnabled(), and there are almost 900 occurrences of that pattern. But there are still 9 stragglers, and the method itself. Deleting the method and fixing the call sites.
* Fix uses in NetEventSource itself
Some help to remove allocation, some just help to avoid pulling in Tuple and likely increasing build size.
* Update src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs
Co-authored-by: Jeremy Barton <[email protected]>
* Initialize winsock directly
* Delete test that is not relevant anymore
* Add tests for methods the require initialized winsock
Co-authored-by: Stephen Toub <[email protected]>
* Correct NameResolutionTelemetry logic
Taken from c4c9a2f99b7e339388199086d3014041abccc21e
* Enable listening to multiple sources with TestEventListener
* Workaround EventWrittenEventArgs bug when the EventArgs are stored
Workaround https://github.com/dotnet/runtime/issues/42128
* Correct System.Net.Sockets Telemetry
* Avoid using value tuple in TestEventListener
* Remove unnecessary argument to OnCompletedInternal
* Remove redundant Telemetry.IsEnabled check
* Log Connect/Accept start before the initial context capture
* Use SocketHelperBase in Accept tests
* Avoid duplicate events for BeginConnect without ConnextEx support
* Enable Sync Socket tests
* Revert unrelated SocketPal change
* Log the correct ErrorCode in case of socket disposal
* Add more info on TelemetryTest timeout
* Add PlatformSpecific attribute to ConnectFailure test
* Add missing BeginConnect AfterConnect call on sync failure
* Add comment around GetHelperBase
* Correct WaitForEventCountersAsync helper
* Assert against SocketError.TimedOut in ConnectFailed test
* Add EndConnect comment
* Log Failure around sync SocketPal exceptions
* Don't assert that the exception message is empty
* Dispose socket in a different Thread
* Disable Telemetry failure tests for Sync on RedHat7
* Use more descriptive names in MemberData generation
* Avoid using reflection for #42128 workaround
* Remove ConnectCanceled event
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
We sometimes used `... is not supported on Browser.` and elsewhere `... is not supported on this platform.`
Standardize on the latter one as it can potentially be reused for other targets.
* Add telemetry to System.Net.NameResolution
* Rename hostName to hostNameOrAddress
* Use constants for event IDs
* Address PR feedback
* Reduce overhead when only the counter is needed
* Make NameResolution Telemetry an activity
* Remove redundant check
* Fix indentation
* Check IsEnabled before AfterResolution to help linker
* Add Telemetry tests
* Throws => ThrowsAny
They're super verbose, very inconsistent, costly, and not helpful (they appear to be trying to provide tracing of the full flow of calls, but they fail to do even that).
* Trim NetEventSource when EventSource.IsSupported is false
Follow up to #38129. NetEventSource code was still left in even when EventSource.IsSupported is false, since all the usages of NetEventSource are keying off its own static property: NetEventSource.IsEnabled.
Remove NetEventSource.IsEnabled so the linker can trim NetEventSource code when EventSource.IsSupported is false.
* Remove HttpTelemetry.IsEnabled static property so the linker can trim EventSource code when EventSource.IsSupported is false.
* Fix fake NetEventSource to match what is in the product.
The System.Net.* libs in dotnet/runtime inherited this from .NET Framework. To my knowledge it's not once helped flag any issues in dotnet/runtime, it's only built into debug builds, it's become very inconsistent as the code base has evolved, and it's just cluttering stuff up. So, goodbye.
* Annotate System.Net.Primitives for nullable
* Fix build breaks in other libraries due to new annotations
Co-authored-by: Stephen Toub <[email protected]>
* libraries -restore for vertical build without test restore
* Automatic test change and regex to remove the addition of an extra line at eof
* manual test restore fixed (restore completely done for vertical build)
* build native done
* Automatic ref change and regex to remove the last line
* manual reference assebly change and generated shims build
* automatic src change and regex
* native bin place and src build manual change
* apicompat and pretest.csproj done
* fixing the package build
* fixing all config
* packaging and feedback
* adding back placeholder configuration
* fixing the shims
* delete configuration.props
* making the build work in master
* Test Change
* fixing the packageing, test restore replacing TargetFramework -> OriginalTargetFramework
* delete test configuraiton.props, trailing semicolon and use targetFramework
* reverting the package change
* enable apicompat and fixing configurationGroup for individual projects
* fixing the api compat
* making ilproj work
* adding the outerBuildTest
* adding the arcade package version
* fixing the merge conflicts
* minor changes
* adding additional configs and setting the runtimeOS
* making the vs stuff work
* removing the target Group to fix the apicompat
* fixing the linux build and some minor changes
* making additionalBuildTargetFramework LOcalProperty
* fixing the allConfigurations build
* fixing the netfx build
* fixing package Testing and restore
* Missing TargetFrameworks tag
* making the VSdesgin stuff work
* Remove OriginalFramework Entirely
* some minor pr feedback
* RemoveExtraSemicolon
* use boolean exclude flag
* fixing yml scripts to pass tests
* adding comments and some minor feedback
* moving packaging property to correct plave
* fixing the build for web assembly
* Fixing the live ci build
* Fixing the live build for shims
* fixing the tests
* fixing the packaging and enterprise linux
* fixing package sizes
* Fix the targetFramework
* updating the targetFramework sdl
* removing the buildOS and be able to use OSGroup as done in the old system
* Fixing the osgroup stuff for send to helix task
* Fix OSX failures
* Fixing the osx build
* uploading tmp folder to artifacts
* running restore for runtime.deproj correctly