Commit Graph
523 Commits
Author SHA1 Message Date
Jeff Handley df05666d8f Update the (Get|Set)CompressedStack obsoletions to use SYSLIB0003 (#56874)
* Update the (Get|Set)CompressedStack obsoletions to use SYSLIB0003

* Update test suppression
2021-08-05 15:10:49 -04:00
Jeff Handley 895c99cc50 Remove old fwlink from Obsolete messages and make message improvements (#56690)
* Remove old fwlink from Obsolete messages and make message improvements

* Thorough review and update of Obsolete messages

* Cleanup

* Make messages about unsupported APIs more consistent

* Update RequiresUnreferencedCodeAttribute messages to be consistent between ref and src

* Cleanup

* Cleanup

* Use 'not supported' instead of 'no longer supported'

* Omit unnecessary error:false from Obsolete attributes. Fix message typo.

* Remove old comment

* PR feedback
2021-08-04 14:58:10 -04:00
Steve Pfister c865deae8d Enable and tweak ThreadTests on Android (#56578)
Many ThreadTests should be working on Android, so they were enabled.  ApartmentState_AttributePresent was changed to skip permanently on Android.

Fixes https://github.com/dotnet/runtime/issues/50577
2021-07-30 08:01:57 -04:00
Viktor Hofer a6b9a63f35 Update libraries solution and NuGet.config files (#56430)
* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen
2021-07-28 18:44:17 +02:00
Steve MacLean d66e9361f5 Apple Silicon reenable 49568 (#52202) 2021-06-09 20:27:31 -04:00
Mitchell HwangandMitchell Hwang 5b57479fcb [MacCatalyst][libraries] Add specific SkipOnPlatform and ActiveIssues instead of test level skip (#52859)
* [MacCatalyst][libraries] Add System.Console.Tests SkipOnPlatform

* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests SkipOnPlatform

* [MacCatalyst][libraries] Add Microsoft.Extensions.Hosting.Unit.Tests SkipOnPlatform

* [MacCatalyst][libraries] Add System.Net.NetworkInformation.FunctionalTests SkipOnPlatform

* [MacCatalyst][libraries] Add System.IO.FileSystems.Tests SkipOnPlatform

* [MacCatalyst][libraries] Add Microsoft.VisualBasic.Core.Tests ActiveIssue

* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests ActiveIssue

* [MacCatalyst][libraries] Add System.Threading.Thread.Tests ActiveIssue

* [MacCatalyst][libraries] Add System.IO.FileSystem.Tests ActiveIssue

* [MacCatalyst][libraries] Add System.Runtime.Extensions.Tests ActiveIssue

* [MacCatalyst][libraries] Remove test project level skips

* [MacCatalyst] Add forgotten PNSE and ActiveIssue

* [MacCatalyst][libraries] Coalesce MacCatalyst into iOS tvOS SkipOnPlatform

Co-authored-by: Mitchell Hwang <[email protected]>
2021-05-19 11:18:00 -04:00
5297337e5b [iOS][libraries] Skip failing iOS tests with ActiveIssues and proj level skips (#51491)
In effort to assess the state of the iOS library tests, a number of tests will be skipped

Test suites that crash, hang, or have a significant number of failures (mostly 20+ failing unique test methods) are skipped on at the `tests.proj` level. Otherwise, `[ActiveIssue]` attributes have been attached to either the individual test methods that fail or the entire class if the whole test class fails. Any pre-existing `ActiveIssue` attribute associated with iOS had been reassessed to either remain or be closed.

A few test suites have been skipped because they fail with some form of `PlatformNotSupportedException`. `[SkipOnPlatform]` attributes are attached to the failing test methods.

All of the Issues can be tracked at https://github.com/dotnet/runtime/projects/48#column-9236436

The ActiveIssues and `tests.proj` exclusions have been tested on https://github.com/dotnet/runtime/pull/49917 as well.

-----------
This PR makes the following changes in the following files:
`src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj` - Removed `$(NetCoreAppCurrent)-iOS` from target frameworks as it is stated to currently only supported on Windows.

`src/libraries/tests.proj` - Update the test suites that need to be skipped at the project level, reducing the number and categorizing as a skip due to PNSE, a skip due to numerous failures, and a skip due to the suite crashing.

The remaining files changed are either:
`[ActiveIssue("<issue-url>", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]`
`[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]`

Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Tammy Qiu <[email protected]>
2021-05-12 17:40:55 +02:00
Mitchell HwangandMitchell Hwang 913fdbe2f4 [Android][libraries] Skip failing Android tests with ActiveIssues and proj level skips (#50800)
* [Android][libraries] Update test suites skipped

* [Android][libraries] Add System.Globalization.Tests ActiveIssues 36672

* [Android][libraries] Add System.IO.Compression.Tests ActiveIssues 36845

* [Android][libraries] Add System.Text.RegularExpressions ActiveIssues 36848

* [Android][libraries] Add System.Diagnostics.DiagnosticSource.Switches.Tests ActiveIssues 37073

* [Android][libraries] Add System.Net.Requests.Tests ActiveIssues 37087

* [Android][libraries] Add System.Runtime.Tests test proj skip 37088

* [Android][libraries] Add System.Runtime.Numerics.Tests ActiveIssues 37093

* [Android][libraries] Add System.Security.Cryptography.Pkcs.Tests test proj skip 37094

* [Android][libraries] Add System.Console.Tests Active Issues 37465

* [Android][libraries] Consolidate System.Runtime.Extensions.Tests ActiveIssues into 49868

* [Android][libraries] Add System.Threading.Tasks.Parallel.Tests ActiveIssue 50566

* [Android][libraries] Add System.Net.NetworkInformation.Functional.Tests ActiveIssues 50567

* [Android][libraries] Add System.Net.Sockets.Tests ActiveIssues 50568

* [Android][libraries] Add System.Diagnostics.Debug.Tests ActiveIssues 50570

* [Android][libraries] Add Microsoft.VisualBasic.Core.Tests ActiveIssues 50572

* [Android][libraries] Add System.Text.Encoding.Tests ActiveIssues 50573

* [Android][libraries] Add System.Net.Ping.Functional.Tests ActiveIssues 50574

* [Android][libraries] Add Microsoft.Extensions.Logging.Console.Tests ActiveIssues 50575

* [Android][libraries] Add System.Collections.Concurrent.Tests ActiveIssues 50576

* [Android][libraries] Add System.Threading.Thread.Tests ActiveIssues 50577

* [Android][libraries] Rename System.Collections.Immutable.Tests ActiveIssues 50579

* [Android][libraries] Rename System.Security.Cryptography.Csp.Tests ActiveIssues 50580

* [Android][libraries] Remove test level skips that are now test specific skips

* [Android][libraries] Remove closed ActiveIssues

* [Android][libraries] Add more crashing test suites to be skipped

* [Android][libraries] Add Microsoft.Extensions.Configuration.Functional.Tests ActiveIssue 50866

* [Android][libraries] Add Microsoft.Extensions.Configuration.Ini.Tests ActiveIssue 50867

* [Android][libraries] Add Microsoft.Extensions.Configuration.Json.Tests ActiveIssue 50868

* [Android][libraries] Add Microsoft.Extensions.Configuration.Xml.Tests ActiveIssue 50870

* [Android][libraries] Add Microsoft.Extensions.DependencyInjection.Tests test proj skip

* [Android][libraries] Add Microsoft.Extensions.DependencyModel.Tests ActiveIssue 50872

* [Android][libraries] Add Microsoft.Extensions.Http.Tests ActiveIssue 50873

* [Android][libraries] Add Microsoft.Extensions.Logging.EventSource.Tests test proj skip

* [Android][libraries] Add Microsoft.Extensions.Logging.Tests ActiveIssues 50875

* [Android][libraries] Add Microsoft.Extensions.Options.Tests ActiveIssues 50877

* [Android][libraries] Add Microsoft.Extensions.Primitives.Tests ActiveIssues 50878

* [Android][libraries] Add System.CodeDom.Tests ActiveIssues 50879

* [Android][libraries] Add System.Collections.Immutable.Tests ActiveIssues 50579

* [Android][libraries] Add System.Collections.NonGeneric.Tests ActiveIssues 37069

* [Android][libraries] Add System.Collections.Tests test proj skip

* [Android][libraries] Add System.ComponentModel.Primitives.Tests ActiveIssues 50881

* [Android][libraries] Add System.ComponentModel.Annotations.Tests ActiveIssues 50882

* [Android][libraries] Add System.ComponentModel.TypeConverter.Tests test proj skip

* [Android][libraries] Add System.Composition.Hosting.Tests ActiveIssues 50917

* [Android][libraries] Add System.Composition.Runtime.Tests ActiveIssues 50918

* [Android][libraries] Add System.Composition.Tests ActiveIssues 50919

* [Android][libraries] Add System.Data.Common.Tests test proj skip

* [Android][libraries] Add System.Diagnostics.DiagnosticSource.Tests ActiveIssue 50924

* [Android][libraries] Add System.Diganostics.TextWriterTraceListener.Tests ActiveIssue 50925

* [Android][libraries] Add System.Diagnostics.Tracing.Tests test proj skip

* [Android][libraries] Add System.IO.Pipelines.Tests ActiveIssue 50927

* [Android][libraries] Add System.Linq.Expressions.Tests ActiveIssue 37474

* [Android][libraries] Add System.Net.NameResolution.Functional.Tests ActiveIssue 50928

* [Android][libraries] Add System.Net.Primitives.Functional.Tests ActiveIssue 50571

* [Android][libraries] Add System.Net.Requests.Tests ActiveIssue 37087

* [Android][libraries] Add System.ObjectModel.Tests ActiveIssue 50933

* [Android][libraries] Add System.Resources.Extensions.Tests ActiveIssue 50934

* [Android][libraries] Add System.Resources.ResourceManager.Tests ActiveIssue 50935

* [Android][libraries] Add System.Runtime.Serialization.Primitives.Tests ActiveIssue 50936

* [Android][libraries] Add System.Security.Cryptography.X509Certificates.Tests ActiveIssue 50937

* [Android][libraries] Add System.Text.Json.Tests test proj skip

* [Android][libraries] Add System.Text.RegularExpressions.Tests ActiveIssues 50942

* [Android][libraries] Add System.Threading.Channels.Tests ActiveIssues 50943

* [Android][libraries] Add System.Xml.Linq.xNodeBuilder.Tests ActiveIssues 50944

* [Android][libraries] Add System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests test proj skip

* [Android][libraries] Add System.Xml.XmlSchemaSet.Tests test proj skip

* [Android][libraries] Add System.Xml.Xsl.XslCompiledTransformApi.Tests test proj skip

* [Android][libraries] Add System.Xml.Xsl.XslTransformApi.Tests test proj skip

* [Android][libraries] Add System.Net.Sockets ActiveIssue EventSource 50568

* [Android][libraries] Add System.Net.Mail.Functional.Tests ActiveIssue  50999

* [Android][libraries] Clean up Android test architecture specific skips

* [Android][libraries] Add more test suite skips

* [Android][libraries] Skip test suites failing with PlatformNotSupportedException related failures

* [Android][libraries] Add more suites that have execution compromised

* [Android] Add new Microsoft.Extensions.Configuration.FileExtensions.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Ini.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Json.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Xml.Tests active issue

* [Android] Add new Microsoft.Extensions.Http.Tests active issue

* [Android] Fix System.Text.Json.Tests project path skip

Co-authored-by: Mitchell Hwang <[email protected]>
2021-05-10 11:16:38 -04:00
Alexander Köplinger bc9f00c226 Cleanup PlatformSpecific/SkipOnMono attributes that skip a platform (#50907)
We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser.
Right now we're skipping them via `[SkipOnMono("reason", TestPlatforms.Browser)]` but there's nothing that inherently ties this to Mono other than the current implementation.

The more generic `SkipOnPlatform` attribute can be used instead.
We can also use it in places where we do `[PlatformSpecific(~TestPlatforms....)]` to avoid the double inversion.
2021-04-09 13:20:18 +02:00
Steve MacLean e867be6cab Enable macOS-arm64 libraries tests on runtime-staging rolling builds (#49445)
* Disable failing Apple Silicon Libraries tests

-  Use tests.proj to disable catastrophically failing libraries tests
-  Add ActiveIssues where XUnit didn't crash

* Enable CoreCLR lib tests for Apple Silicon in Runtime-Staging
2021-03-18 14:03:08 -04:00
Ryan Lucia 6791d05494 Port some CoreRT Threading classes to Mono (#47333) 2021-03-13 08:33:05 +01:00
Dan Moseley c18d7b0aee Name some more threads (#47084)
* name threads

* typo:

* typo

* Truncate

* Name long running TP thread

* Allow resetting thread names

* Fix thread set test

* Remove unnecessary reset of FSW thread name

* prettier names

* consistent syntax

* Fix threadpool test

* Fix code typo

* typo

* adjust names
2021-02-08 20:17:10 +00:00
Stephen Toub c7fda3b94a Add Thread.UnsafeStart (#47056) 2021-01-16 13:52:21 -05:00
Jan Kotas 10381a2cdc Find&Replace coreclr/src -> coreclr (#45761) 2020-12-08 10:40:17 -08:00
Viktor Hofer ed295782bf Add workflow to update solution files with SlnGen and update them initially (#44703)
* Add slngen infra

* Update all solution files
2020-11-17 18:23:30 +01:00
Dan MoseleyandJan Kotas a207c7f5df Fix StartInfo test (#44392)
* Stabilize StartInfo_NotepadWithContent_withArgumentList

* Add state in failed SetApartmentState exception

* Same for other tests

* Extract common code

* Modify

* Extract common code

* Pass down throwOnError

* Apply suggestions from code review

Co-authored-by: Jan Kotas <[email protected]>

* feedback

* Add process for disposal

* Make slow test outer loop

Co-authored-by: Jan Kotas <[email protected]>
2020-11-12 01:58:23 +00:00
Stephen Toub fd3ae616fd Improve nullable annotation on Volatile.Read (#44410)
Make it clear to the compiler that Volatile.Read doesn't write to the ref argument, such that if the input was non-null before the call, it'll still be non-null after the call.
2020-11-09 19:17:12 -05:00
Stephen Toub 1d9b5e0ea6 Replace a couple Thread.CurrentThread.ManagedThreadIds (#43270)
* Replace a few Thread.CurrentThread.ManagedThreadIds

* Update some library tests as well
2020-10-12 17:17:45 -07:00
Maxim Lipnin a5faa95e49 Mark some APIs throwing PNSE from runtime as unsupported on Browser (#42310)
* Mark some APIs throwing PNSE from runtime as unsupported on Browser

* Annotate APIs in coreclr part
2020-09-22 11:27:27 -04:00
Luke Parker 60aa3bebf8 Mark Thread.ResetAbort as obsolete (#42228) 2020-09-14 22:52:58 -07:00
Eugene Rozenfeld ea1d20c71e Improve tailcallstress testing (#41059)
1. Dispatch all tail calls under TailCallStress via helpers. That
increases our coverage since valid non-tail-prefixed calls are
dispatched as fast calls in normal non-stress mode.

2. Don't attempt to tail call from methods that have a localloc
unless there is an explicit tail prefix. Note that we already disallowed
fast tail calls from such methods so this change only affects
tailcallstress mode.

3. Fix a bug in TestInvokeDOPAndCancel. As the test was written
this assert was firing under tailcallstress:
https://github.com/dotnet/runtime/blob/480c49b2419ab4a0b34bfd86754abc2f17079c77/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs#L1074
When this call to `cts.Cancel`:
https://github.com/dotnet/runtime/blob/480c49b2419ab4a0b34bfd86754abc2f17079c77/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs#L1065
is dispatched via helpers, it takes much longer than when it's
dispatched via a fast tail call (we have to jit a couple of IL stubs).
Because of that, it's possible that all other actions complete on the
other thread before cancellation is completed.
2020-08-24 15:06:06 -07:00
Adam Sitnik d306c6f31d Mark existing Windows-specific APIs without a version number, fixes #40095 (#40375) 2020-08-05 18:24:03 +02:00
Adam Sitnik 06963eaedf Rename MinimumOSPlatformAttribute and RemovedInOSPlatformAttribute (#40371)
* rename attributes:

* MinimumOSPlatformAttribute -> SupportedOSPlatformAttribute
* RemovedInOSPlatformAttribute -> UnsupportedOSPlatformAttribute

* update src and ref files

* update .targets file

* update comment ;)
2020-08-05 13:47:50 +02:00
Viktor Hofer 809a06f451 Remove depprojs in favor of PackageReferences (#35606)
- 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)"
2020-07-23 17:20:26 +02:00
Maxim Lipnin 30e6b79788 [wasm] Enable System.Threading.Thread.Tests test suite (#39826) 2020-07-23 15:21:59 +02:00
Jeff Handley 329f0dbfa3 Mark Obsoletions for .NET 5 (#39269)
* Mark new obsoletions for .NET 5; update existing obsoletions

* Exclude DirectoryServicesPermission/DirectoryServicesPermissionAttribute from obsoletions for now

* No need to restore SYSLIB0003 at end of Forwards files

* Use a common Obsoletions.cs file for all SYSLIB obsoletions

* Resurrect CER code behind #ifdef in EventSource

* Mark GlobalAssemblyCache overrides as Obsolete

* Suppress Thread.Abort() error in ImageAnimator.Unix.cs

* Unconditionally mark RoAssembly.GlobalAssemblyCache as obsolete

* Rename MSLIB0001 to SYSLIB0001 in ref assembly

* Suppress obsoletion warnings in tests

* Adopt a uniform #ifdef for NET50_OBSOLETIONS

* Fix BinaryFormatter obsoletion message after the rebase

* Use SYSTEM_PRIVATE_CORELIB constant instead of NETCOREAPP

* Remove the code comment on the ifdef

* Apply feedback related to CER obsoletions

* Apply feedback related to CAS

* Update ref assembly to reflect SecurityManager obsoletion

* Fix regression in System.IO.Pipes.NamedPipeServerStream.Windows.RunAsClient
2020-07-17 17:09:29 -07:00
Adam SitnikandViktor Hofer 52d4d8c057 mark Windows-specific APIs as such (#39265)
* move all OSPlatformAttributes to a single file so they can be easily referenced in < .NET 5 libraries

* Adds System.Runtime.Versioning*Platform* annotation attributes to < .NET 5 builds

* introduce MinimiumSupportedWindowsPlatform

* introduce IsWindowsSpecific setting that adds MinimumOSPlatform attribute for Windows Specific libraries

* mark all Windows-specific libraries as such

* annotate Windows-specific System.Console methods and properites

* annotate Windows-specific DpapiProtectedConfigurationProvider type

* annotate throwing Windows-specific APIs from System.Diagnostics.Process namespace

* annotate throwing Windows-specific APIs from System.IO.MemoryMappedFiles namespace

* annotate Windows-specific APIs from System.IO.Pipes namespace

* the new attributes should support enums

* annotate Windows-specific APIs from HttpListenerTimeoutManager class

* annotate Windows-specific APIs from System.Net.Sockets namespace

* annotate Windows-specific APIs from System.Runtime.InteropServices namespace

* annotate Windows-specific APIs from System.Security.Cryptography.Csp namespace

* annotate Windows-specific APIs from System.Security.Cryptography.X509Certificates namespace

* annotate Windows-specific APIs from System.Threading namespace

* address code review feedback: dont introduce new constants, reuse existing SYSTEM_PRIVATE_CORELIB

* code review: import the namespace, simplify the attribute name

* add missing Socket.DuplicateAndClose and Socket(SocketInformation)

* fix the test name (it does not throw)

* add missing DriveInfo.set_VolumeLabel

* add System.IO.FileSystem File Encrypt and Descrypt methods

* simplify the < .NET 5 check

* enable nullable in explicit way as it's not enabled in all the projects where this file is included

* include platform attributes in projects that ask for it in explicit way

* set IncludePlatformAttributes to true for projects that include files from other projects

* use suggestions from Viktor and Santi

Co-authored-by: Viktor Hofer <[email protected]>
2020-07-17 15:11:50 +02:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Viktor Hofer dd41a4aae9 Use ProjectReference to build against System.Private.CoreLib (#38196)
* Use ProjectReference to build against CoreLib
2020-06-22 19:53:00 +02:00
Mitchell HwangandMitchell Hwang 480c49b241 [libraries] Add ConditionalFact to wasm failing tests (#37822)
* [libraries] Add IsThreadingSupported

* [libraries] Add IsThreadingSupported attribute to failing wasm tests

* [libraries] Add IsObdcNotAvailableAndThreadingSupported property to DependencyCheckTest

* [libraries] Include system namespace in RedactedLogValueIntegrationTest and fix DependencyCheckTest ConditionalFact

* [libraries] Revert System.Console IsThreadingSupported changes

* [libraries] Remove IsThreadingSupported attribute from EncodingCodePages

Co-authored-by: Mitchell Hwang <[email protected]>
2020-06-17 13:48:00 -04:00
Anirudh Agnihotry c19ce52bb6 Tfm clean up (#37623)
* cross targting removed

* sln update and remove system.numeric.vectors

* cross targeting interop project
2020-06-12 10:17:27 -07:00
Alexander Köplinger da10ba8ca7 Use ConditionalFact/Theory for skipping RemoteExecutor on unsupported platforms (#37479)
RemoteExecutor doesn't work on platforms that can't spawn processes like iOS/Android/WebAssembly.
2020-06-09 12:40:44 +02:00
Stephen Toub 8d9c940e2f Enable nullable reference types for full facades (#37589)
Some of our full facades are missing `<Nullable>enable</Nullable>`.  I don't think the lack of these causes any issues, but having them makes it easy to confirm what ref assemblies remain to be annotated.
2020-06-09 06:00:01 -04:00
Aleksey Kliger (λgeek) 04708d5b5d [Mono] Don't set thread name of main thread on Linux (#36116)
* [mono] Record MonoNativeThreadId of the main thread

We would like to know the MonoNativeThreadId (pthread_t on Linux) of the main
thread of the application.  We can identify the main thread (on linux) because
it is the one for which `gettid () == getpid ()`.  (`gettid()` returns a
`pid_t` which is not the same thing as a `pthread_t`, hence this roundabout way
of detecting it.)

A complication arises in embedding scenarios: the main thread is not
necessarily the one that calls `mono_jit_init` or otherwise interacts with the
runtime.  Therefore we do the `gettid() == getpid ()` test at `MonoThreadInfo`
creation time when we call `register_thread`.

If the main thread never interacts with Mono, the main thread is not known to
us.

* [mono] Don't set name of main thread on Linux

Setting the name of the main thread also changes the name of the process.

Fixes https://github.com/dotnet/runtime/issues/35908

The corresponding fix for CoreCLR is https://github.com/dotnet/runtime/pull/34064

* Re-enable test from https://github.com/dotnet/runtime/pull/34064
2020-05-14 15:57:32 -04:00
b57a099c17 Ensure Process.ProcessName doesn't change when setting Thread.Name on Linux (#34064)
Fixes https://github.com/dotnet/runtime/issues/33673

This issue is a side-effect of adding support for setting thread names on Linux in https://github.com/dotnet/coreclr/pull/27182.

Co-authored-by: Dan Moseley <[email protected]>
Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>
2020-05-12 16:08:50 +02:00
Marcus Turewicz 890fab0a64 Use attribute Link syntax for Common files (#35436)
* Change <Link>...</Link> to Link="..."

* Format existing Link="..."
2020-04-25 05:26:50 -07:00
Maxim Lipnin ab6e225d0c [mono] Remove CoreFX.issues_windows.rsp file (#32592)
Changes:
- enabled `runtime (Libraries Test Run release mono Windows_NT x64 Debug)` CI lane (Windows Nano Server CI leg is disabled);
- enabled the tests that pass;
- marked failing test assemblies/classes/methods with `ActiveIssue` attribute using respective GH issues;
- removed CoreFX.issues_windows.rsp file and related mono rsp arguments.

Fixes #1980
2020-04-10 12:41:57 +02:00
Viktor Hofer d0dc66bc0b Rename CoreFx.Private.TestUtilities and reference it in slns (#34656)
* Rename CoreFx.Private.TestUtilities to TestUtilities

* Add TestUtilities reference to slns
2020-04-08 01:26:53 +02:00
Levi Broderick 0d08b0232d API review URL should be HTTPS, not HTTP (#32281) 2020-02-14 08:07:46 -08:00
Marco Rossignoli ed9fed1f41 Fix AppDomain.SetPrincipalPolicy bug for new threads (#32104)
* fix principal policy for new threads

Fixes #31717
2020-02-12 08:25:10 -08:00
Maxim Lipnin 76f525d94e [mono] Review [SkipOnTargetFramework(TargetFrameworkMonikers.Mono...] occurrences (#31920)
* Review test attributes

* Disable System.Threading.Tests.SynchronizationContextTests.WaitNotificationTest with an active issue
2020-02-08 05:47:52 -08:00
Anirudh Agnihotry 725968c3c5 New Configuration System (#1787)
* 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
2020-02-06 05:24:08 +00:00
Jan Kotas 099a512445 Merging small assemblies (part 1/N) (#2189)
* Delete unnecessary ClsCompliant

* Merge System.Diagnostics.Tools\src into CoreLib

* Merge System.Security.Pricipal\src into CoreLib

* Delete System.IO.UnmanagedMemoryStream\ref\System.IO.UnmanagedMemoryStream.cs

* Delete System.Reflection\ref\System.Reflection.cs

* Delete  System.Threading.Timer\src\ApiCompatBaseline.uapaot.txt

* Delete System.Buffers\src\Resources\Strings.resx

* Merge System.Buffers\ref into System.Runtime

* Merge System.Diagnostics.Debug\ref into System.Runtime

* Delete *\MatchingRefApiCompatBaseline.txt

* Merge System.Diagnostics.Tools into System.Runtime\ref

* Merge System.Resources.ResourceManager into System.Runtime\ref

* Cleanup System.IO.* project references

* Cleanup System.Reflection project references

* Cleanup System.Runtime.Handles project references

* Merge System.Threading.Thread\src into CoreLib

* Merge System.Threading.Timer\ref into System.Runtime

* Merge System.Threading.Tasks\ref into System.Runtime
2020-01-29 10:02:22 -08:00
Stephen ToubandJan Kotas ccf6aedb63 Address more issue numbers in the code (#1888)
* Address more issue numbers in the code

Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for.  In some cases the repo was named, but for consistency I still replaced it with a link.

In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers.

In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.

* Apply suggestions from code review

Co-Authored-By: Jan Kotas <[email protected]>

* Address PR feedback

* Fix OrderedEnumerable by using MemoryExtensions.Sort

Co-authored-by: Jan Kotas <[email protected]>
2020-01-18 00:52:17 -08:00
Anirudh Agnihotry 3b9abae5aa Removing "netcoreapp" and "netfx" TargetGroup (#457)
* netcoreapp -> netcoreapp5.0 in .sln files

* netcoreapp; -> netcoreapp5.0;  , netcoreapp- to netcoreapp5.0-

* netcoreapp- -> netcoreapp5.0 in .csproj

* 'netcoreapp -> 'netcoreapp5.0 in .csproj

* done with libraries sub folder

* missed semicolon

* minor changes

* netcoreapp -> netcoreapp5.0 in some extra files

* vNext target variable in configurations.props

* netcoreapp => netcoreapp5/0 in some other .props file

* netcoreapp -> vnext in .csproj

* making the netcorepap framework switch work

* fixing sendToHelix and linux build

* TargetFrameworkVNext -> netcoreappCurrent

* case correct netcoreappcurrent

* fixing send to helix zip path

* netfx -> net472 in .sln

* netfx; -> net472; in .props

* netfx- -> net472- in .props

* netfx - -> net472- in .csproj

* 'netfx-> 'net472 in .csproj

* netfx -> net472 manual change

* fixing ci build for netfx

* Not trying to change the global property

* Fixing build failure due to master changes in net https tests

* adding documentaiton and fixing filtering

* netcoreapp -> netcore5.0 in py file

* changing the path to use netcoreapp5.0 version

* feedback and override corefx path corrected in installers

* remaing netcoreapp5.0 changes done

* netcoreapp-> netcoreapp5.0 after live builds

* net472 -> netframeworkcurrent
2019-12-14 12:22:29 -08:00
Roman Marusyk bc5ed5c32a Consolidate .netcoreapp.cs files because System.Threading.* projects is no longer cross-compiled (#320) 2019-11-26 16:51:52 -08:00
Santiago Fernandez Madero d8adaeeff2 Fix test build of test project that referenced corefx shared corelib directly and cleanup common path usages (#47)
* Fix test build break and update common path usages to use property

* Use normalize directory for CommonPath and CommonTestPath

* Update instances of CommonPath and CommonTestPath to not use trailing \
2019-11-14 21:03:07 +01:00
Anirudh Agnihotry 3679e373a3 Bumping the assembly version to 5.0.0.0 (dotnet/corefx#41723)
* bumping the assembly Version

* correcting the resx file

* keeping netfx for oleDb

* fiixing the netfx tests as well

* fixing the DataSetExtensionsVersion

* removing netstandard2.0 from ref in datasetextensions


Commit migrated from https://github.com/dotnet/corefx/commit/9a4ed0d00bc642b015974684c32b00650426429f
2019-11-11 10:43:58 -08:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00