Commit Graph
753 Commits
Author SHA1 Message Date
3e3fd870b6 [release/6.0] Skip test suites crashing on CI for iOS/tvOS/MacCatalyst and test fixes for Android (#58841)
Manual backport of #57208, #58519, #58562, #58210, #57732, #58428, #58586, #58745, #57687 to release/6.0

Numerous test suites have been failing for iOS/tvOS/MacCatalyst consistently on CI without useful logs as to why. Moreover, some of these suites pass locally.

This PR looks to reduce the failures on CI by skipping the problematic suites
Skips test suites logged in #53624

ActiveIssues
#58440
#58418
#58367
#58584

Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
Co-authored-by: Jo Shields <[email protected]>
2021-09-13 10:46:42 -04:00
github-actions[bot]andAlexander Köplinger 4ebbb8ed88 PhysicalFileProvider: Use active polling instead of FileSystemWatcher on iOS/tvOS (#58165)
In https://github.com/dotnet/runtime/issues/57931 we found out that the FSEventStream APIs which are used to implement System.IO.FileSystemWatcher aren't allowed on the App Store.
According to [Apple's docs](https://developer.apple.com/documentation/coreservices/1443980-fseventstreamcreate) these APIs are only supported on macOS and Mac Catalyst.

Mark System.IO.FileSystemWatcher as unsupported on iOS/tvOS and throw PNSE.
Switch PhysicalFileProvider to use active polling instead, like we do for Browser.

Addresses https://github.com/dotnet/runtime/issues/57931

Co-authored-by: Alexander Köplinger <[email protected]>
2021-08-26 21:52:43 +02:00
James Thomson 5817dc8abe Fix invoking of FileSystemWatcher (#53151)
Call `protected` `On...` event raising methods from `Notify...` methods,
to invoke `SynchronizingObject` when required.

Fix #52644
2021-08-13 11:20:56 -07: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
dcce0f56e1 Add symbolic link APIs (#54253)
Co-authored-by: David Cantu <[email protected]>
Co-authored-by: carlossanlop <[email protected]>
Co-authored-by: carlossanlop <Carlos Sanchez [email protected]>
2021-07-09 13:17:31 +02:00
Jan Jahoda ec2b5689b0 Disable FileSystemWatcher_DirectorySymbolicLink_TargetsFile_Fails (#53368) 2021-05-27 20:05:35 +02:00
Adam Sitnik 44f050acc0 Fold System.IO.FileSystem into CoreLib (#53231)
* move Queue<T> to System.Private.CoreLib

* fold System.IO.FileSystem into System.Private.CoreLib
2021-05-27 12:56:30 +02:00
David CantúandCarlos Sanchez 3bd75ba9f1 Allow watch of symbolic links to folders on Unix (#52679)
* Allow watch of symbolic links to folders on Unix

* Add logic to repeat directory tests with symlinks

* Remove whitespace

Co-authored-by: Carlos Sanchez <[email protected]>

* Avoid follow symlinks by default in subdirectories

* Add Symbolic Link tests

* Revert "Add logic to repeat directory tests with symlinks"

This reverts commit 5b44eb0195c2e5824ac375862765ea5a2cdeb0ad.

* Exclude test from win7 and 8.1

* Avoid running Process.Start in iOS, tvOS and MacCatalyst

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <[email protected]>

Co-authored-by: Carlos Sanchez <[email protected]>
2021-05-26 07:47:05 -07: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
Kareem ZedanandJan Kotas b08a97afb8 Task/use get last p invoke error (#52212)
* replacing GetLastWin32Error with GetLastPInvokeError in remaining assemblies

* replace GetLastWin32Error with GetLastPInvokeError in assemblies outside system.private.corelib

* Apply suggestions from code review

Co-authored-by: Jan Kotas <[email protected]>
2021-05-09 12:42:21 -07:00
Jan Kotas 1e9983499f Release GCHandle in FSEventStreamContext release callback (#52275)
The callbacks are sometimes delivered even after the FSEventStream is disposed
2021-05-05 06:28:58 -07:00
Jan Kotas 6b71dd24ff Use function pointers in OSX FileSystemWatcher (#52090) 2021-04-30 05:29:16 -07:00
Jan Kotas 964b5005d8 Cleanup lifetime management in OSX FileSystemWatcher (#52019)
May fix #51538
2021-04-29 12:21:35 -07: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
Steve MacLean 34294fabcb [macOS-arm64] Disable failing libraries tests (#49400)
* Disable tests for XUnit crashes on Apple Silicon

* Apple Silicon Disable System.IO.MemoryMappedFiles.Tests

* Apple Silicon disable DirectoryServices.Protocols.Tests

* Apple Silicon disable Cryptography tests

M1 helix missing usable libssl

* Apple Silicon disable TestVirtualMemorySize64

* Apple Silicon disable ImportCollectionsFromContainerOnly

* Apple Silicon disable XmlWriterApi tests

* Fix whitespace
2021-03-10 12:02:50 -05:00
Eric Erhardt f7de865465 Remove unnecessary references to System.ComponentModel.TypeConverter (#49068)
These references don't appear to be needed, so I removed them.
2021-03-03 16:45:11 -05:00
Alexander Köplinger e5ae9882e7 Import iOS from MacCatalyst in libraries OSGroups.json (#48652)
This allows us to reuse the existing iOS build configs since we don't have MacCatalyst-specific logic yet.
2021-02-23 18:38:43 -08: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
Jo Shields 44f8f0faee Add Mac Catalyst (iOS API, Mac ABI) runtime (#47823)
Initial support for Mac Catalyst for mono subset. This enables building runtime packs and working jobs, but right now the `tests` subset needs some work to allow library test runs in CI
2021-02-08 14:26:14 -05:00
Stephen Toub a10c2e6ebd Add MemoryMarshal.CreateReadOnlySpanFromNullTerminated (#47539) 2021-01-29 22:42:17 -05:00
Stephen Toub c58e45c9bf Replace two uses of TaskCreationOptions.LongRunning (#47296) 2021-01-21 16:55:23 -08:00
Stephen Toub c7fda3b94a Add Thread.UnsafeStart (#47056) 2021-01-16 13:52:21 -05:00
Santiago Fernandez Madero f9004fe53b DisableFileSystemWatcherTest (#45511) 2020-12-02 21:52:07 -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
Anirudh Agnihotry b37f10a504 Changing Windows_NT -> Windows for enabling TargetPlatformMoniker feature of the sdk for platform specific tfms. (#43651)
* eng change

* coreclr change

* libraries change

* tests change

* installer & mono change

* py files changed

* .md change

* .yml change

* remove redundant targetos property

* Windows_NT -> windows after ninja change

* fixing runtime build failure
2020-11-02 14:25:58 -08:00
Stephen Toub e8339af091 Remove some unnecessary unsafe usage (#43430) 2020-10-16 22:24:20 -04:00
Aaron RobinsonandJan Kotas d1c0fa8243 Roslyn update response (#43056)
* Update function pointer syntax usage to official.

* Fix warnings with new Roslyn

Co-authored-by: Jan Kotas <[email protected]>
2020-10-06 13:11:35 -07:00
Jan Kotas 1bdb45a0a2 Use ReadOnlySpan<byte> for parsing FileWatcher responses (#42474) 2020-09-18 21:30:43 -07:00
Carlos Sanchezandcarlossanlop 2a1735b162 Fix Windows AccessViolationException in FileSystemWatcher when monitoring network share for changes (#42419)
* Fix FileSystemWatcher crash due to malformed data coming from Windows.

* Address PR suggestions.

* Bring back assert for numBytes.

Co-authored-by: carlossanlop <[email protected]>
2020-09-18 16:01:58 -07:00
Mitchell HwangandMitchell Hwang c49aab6b9e [wasm] Mark System.IO.FileSystem.Watcher APIs as unsupported on Browser (#41682)
* [wasm] System.IO.FileSystem.Watcher enable platform attributes

* Mark System.IO.FileSystem.Watcher unsupported at assembly level

Co-authored-by: Mitchell Hwang <[email protected]>
2020-09-04 21:57:31 +02:00
Krzysztof WicherandJeff Handley ff4f37fa33 Fix NRE introduced in FileSystemWatcher during nullability annotations (#41315)
* Fix NRE introduced during nullability annotations

* Apply Jeff's suggestions from code review

Co-authored-by: Jeff Handley <[email protected]>

Co-authored-by: Jeff Handley <[email protected]>
2020-08-25 10:35:31 -07:00
Santiago Fernandez Madero 3130ac980c Move Editor Attribute to S.CM.Primitives and apply to types that had it in netfx (#41145)
* Move EditorAttribute to System.ComponentModel.Primitives

* Add EditorAttribute to types that had it in netfx and fix some DesignerSerializableAttributes

* PR Feedback

* PR Feedback
2020-08-22 17:23:57 -07:00
Adam Sitnik efafca9bd8 use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only (#40522)
* use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only

* use `||` instead of `|`
2020-08-10 17:50:42 +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
Alexander Köplinger 6998f4c575 Unify resource strings used for Browser PNSE (#39637)
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.
2020-07-20 21:22:55 +02:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Anirudh Agnihotry 5ce04ccc9a Make browser peer for windows_nt and unix (#37944)
Fixes https://github.com/dotnet/runtime/issues/38559
2020-07-08 12:59:37 +02:00
Stephen Toub 7edc80a799 Remove some stale pragma warning disables (#38551) 2020-06-30 05:35:49 -04:00
Dan Moseley 540bd56295 Remove defunct comment (#38558) 2020-06-29 17:30:37 -07:00
Stephen Toub ed78fadab6 Fix CA1805 for unnecessary initialization of fields (#38410)
This has three primary benefits:
1. In some cases, in particular for static fields where other static fields have non-default initialization, the C# compiler can't elide the default initialization, resulting in more IL.
2. It highlights places where the field is otherwise unused and can be deleted, but where the presence of the initialization was silencing the C# compiler's warnings about the unused field.
3. It increases consistency and decreases maintenance / code size / etc.
2020-06-26 07:52:35 -04:00
Steve PfisterandSteve Pfister 3b95bca292 Since FileSystemWatcher is not supported on wasm, throw PNSE and skip tests (#38368)
Co-authored-by: Steve Pfister <[email protected]>
2020-06-25 13:59:09 +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
Mitchell HwangandMitchell Hwang ecfc69fb58 [libraries] Extend PlatformDetection.IsOSX to include all Apple OS (#37707)
* [libraries] Replacee IsNotApple with IsApple

* [libraries] Extend PlatformDetection.IsOSX to include all Apple OS

* [libraries] Remove test case from DateTimeFormatInfoData

* [Libraries] Rename IsApple to IsOSXLike

* [libraries] Revert GdiplusTests condition from IsOSXLike to IsOSX

Co-authored-by: Mitchell Hwang <[email protected]>
2020-06-11 10:29:25 -04: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
Krzysztof Wicher 5cfda7737f make Poll enums shared 2020-05-12 15:01:20 -07: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
Alex Villarreal 61733e21bb Enable xunit1024 (#34512)
* Enable analyzer rule xUnit1024

* Remove redundant test in System.Text.Json

The very next method is a Theory with inline data that tests this
exact scenario.

* Rename test methods in System.Text.Json

* Rename test methods in System.ComponentModel.Annotations

* Private methods -> local functions in System.Text.Json

* Rename test methods in System.Collections.Immutable

For RemoveNonExistingTest, just moved the logic from the single-use
helper into the method with the Fact attribute.

* Rename test methods in System.Globalization

* Rename test methods in System.Runtime.Extensions

In Math.cs, removed Round_Decimal_Digits Fact which manually tested
cases included in the MemberData of a Theory with the same name.

* Rename test methods in System.Private.Uri

* Rename test methods in System.Runtime.WindowsRuntime.UI.Xaml

* Rename test methods in System.Security.Cryptography.X509Certificates

* Rename test methods in System.Reflection

* Remove redundant test in System.IO.FileSystem.Watcher

Theory EndInit_ResumesPausedEnableRaisingEvents alredy tests
the same scenario as the removed Fact of the same name.

* Rename test methods in System.IO.FileSystem.Watcher

* Rename test methods in System.Composition.Runtime

* Rename test methods in System.Drawing.Primitives

* Rename test methods in System.Reflection.Emit

* Rename test methods in System.Text.RegularExpressions

* Private methods -> local functions in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks

* Simplify tests in System.Threading

* Rename test methods in System.Threading

* Rename test methods in Microsoft.VisualBasic.Core

* Rename test methods in System.DirectoryServices.AccountManagement

* Private methods -> local functions in System.Text.Encoding

* Rename test methods in System.Text.Encoding

* Rename test methods in System.Security.Cryptography.Primitives

* Rename test methods in System.Runtime.Numeric

* Rename test methods in System.CodeDom.Tests

* Rename test methods in System.Reflection.Emit.ILGeneration

* Rename test methods in System.Composition.AttributedModel

* Rename test methods in System.Data.DataSetExtensions

* Rename test methods in System.Runtime

* Rename test methods in System.Runtime.InteropServices

* Remove redundant test in System.ServiceModel.Syndication

* Rename test methods in System.ServiceModel.Syndication

* Rename test methods in System.Data.Common

* Rename test methods in System.Security.Cryptography.Xml

* Private methods -> local functions in System.Security.Cryptography.Xml

* Simplify tests in System.Security.Cryptography.ProtectedData

* Replace private methods with local functions...

In System.Security.Cryptography.Algorithms

* Rename test methods in System.Security.Cryptography.Algorithms

* Simplify tests code in System.Collections.Concurrent

* Rename test methods in System.Drawing.Common

* Rename test methods in System.Data.OleDb

* Rename test methods in System.ComponentModel.TypeConverter

* Rename test methods in System.Web.HttpUtility

* Rename test methods in System.Linq

* Private method -> local function in System.Linq

* Rename test methods in System.Memory

* Rename test methods in System.IO.IsolatedStorage

* Rename test methods in System.DirectoryServices.Protocols

* Rename test methods in System.Globalization.Extensions

* Private methods -> local functions in System.Globalization.Extensions

* Rename test methods in System.IO.Compression

* Rename test methods in System.Security.Cryptography.Encoding

* Rename test methods in Microsoft.Win32.Registry

* Rename test methods in System.IO.UnmanagedMemoryStream

* Rename test methods in System.Collections

* Rename test methods in System.Collections.Specialized

* Rename test methods in System.Private.Xml

* Rename test methods in System.IO.FileSystem

* Rename test methods in System.Diagnostics.StackTrace

* Rename test methods in System.Diagnostics

* Improve some test method renames

* Minor nit fixing

* More improvements to test method names
2020-04-08 06:58:54 -04:00
Jo Shields 952eecabbd Initial addition of tvOS Mono (#34475) 2020-04-08 02:00:28 +02:00