Commit Graph
2441 Commits
Author SHA1 Message Date
Steve Pfister 8c6aeea1d8 Bring up full library test CI runs on iOS / tvOS devices (#59503)
This change enables device runs on CI by building each test app on the helix instance it was deployed to. In past attempts, we looked at enhancing what takes place on the build machine via build tricks, compressing / cleaning up files early, etc and we could not overcome the need for excessively long timeouts and far more disk space.

The change also adopts the patterns established in the wasm test build, giving us the opportunity to support different scenario runs as well as workloads testing in the future.
2021-11-02 07:43:15 -04:00
Viktor Hofer 0964be0ae9 Update slngen and solution files (#60871)
Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
2021-10-26 21:23:54 +02:00
Bibletoon 9e795c014b Add ObjectDisposedException.Throw for object instance and type (#58684) 2021-10-24 23:15:40 -07:00
ayousuf23andJeff Handley ad5a46ad09 Updated tests regarding issue #48119 (#52994)
* added tests for parsing decimal/double/half/single with . at different positions

* adjusted string length for testing . at or after max digit count for single/half

* Fix test cases with decimal separators to work in localized runs

Co-authored-by: Jeff Handley <[email protected]>
2021-10-21 17:56:29 -07:00
Steve Pfister 3c9cd8ec55 [Android] Skip/tweak some System.Runtime tests (#60569)
Fixes #37088

Fixes #50925
2021-10-20 16:28:24 -04:00
Eirik Tsarpalis 0586b1595c Implement IAsyncEnumerable<T>.ToBlockingEnumerable (#60363)
* Implement IAsyncEnumerable<T>.ToBlockingEnumerable

* address feedback

* update test assertion

* Add UnsupportedOSPlatform annotation to internal helper class

* restrict tests to platforms that support threading
2021-10-18 14:35:41 +01:00
Buyaa Namnan af4efb1936 Apply custom Message and Url to all [RequiresPreviewFeatures] attributes (#60379) 2021-10-15 10:05:43 -07:00
Tarek Mahmoud Sayed eff8883c71 Fix TimeZones Test failure (#60140) 2021-10-07 16:28:28 -07:00
Michal Strehovský b72b8a2a8c Annotate methods that get MethodBase from a stackwalk as RUC (#59851)
Fixes #53242. Saddened this didn't make .NET 6.0.

Stack traces in trimmed apps look ugly without this fix:

```
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'id')
   at System.TimeZoneInfo.ValidateTimeZoneInfo(String , TimeSpan , AdjustmentRule[] , Boolean& )
   at System.TimeZoneInfo..ctor(String , TimeSpan , String , String , String , AdjustmentRule[] , Boolean , Boolean )
   at System.TimeZoneInfo.CreateCustomTimeZone(String , TimeSpan , String , String )
   at Program.<Main>$(String[] args) in C:\stacktrace\Program.cs:line 3
```
2021-10-04 15:18:55 +09:00
Tarek Mahmoud Sayed 5bfae1c9ac Fix Time Zone when running with Globalization Invariant Mode (#59710) 2021-09-28 14:42:16 -07:00
Richard ŠefrandTanner Gooding 7691aa88ef Use correct NumberStyle when parsing double and float (#59205)
* User correct NumberStyle when parsing double and float

IParseable<float> and IParseable<double> would fail when parsing
a decimal point number due to incorrect NumberStyles parameter.

E.g. IParseable<double>.TryParse would fail as opposed to
IParseable<double>.Parse because the former explicitly states to use
NumberStyles.Integer

* Adding tests covering parse for float/double/half

* Delete MSBuild_pid-37116_6904092b1c9a481da960c9e28eba2a27.failure.txt

Co-authored-by: Tanner Gooding <[email protected]>
2021-09-20 08:35:58 -07:00
Robin Lindner c00b5fa4d9 Expose nint/nuint overloads for BitOperations (#58733)
* Change access modifier of BitOperations.IsPow2

* Add CLSCompliant(false) attribute to BitOperations.IsPow2

* Add BitOperations.RoundUpToPowerOf2 method for nuint

* Add BitOperations.LeadingZeroCount method for nuint

* Add BitOperations.Log2 method for nuint

* Add BitOperations.PopCount method for nuint

* Add BitOperations.TrailingZeroCount for nint and nuint

* Add BitOperations.RotateLeft and BitOperations.RotateRight for nuint

* Replace Environment.Is64BitProcess check with preprocessor variable TARGET_64BIT and reimplement accidentally removed comment

* Fix formatting

* Remove last Environment.Is64BitProcess check

* Add tests

* Remove [CLSCompliant(false)] Attribute from BitOperations which use nint (not nuint)

* Add refs

* Add refs

* Fix RotateLeft and RotateRight test

* Add IgnoreOnArchitectureTheoryAttribute and remove checks for not existing preprocessor variable

* Replace custom TheoryAttribute with ConditionalTheory

* Add unchecked syntax due CS8778

* Fix parameter type in BitOperationsTests.BitOps_RoundUpToPow2_nuint_64

* Fix Test values

* Fix expectation parameter

* Fix 32-bit expectation

* Fix 32-bit test
2021-09-17 16:31:07 -07:00
Andrii Kurdiumov 5588f94924 Remove usused rd.xml files (#59201)
Closes #51112
2021-09-16 16:53:54 -06:00
Miha Zupan fe50d91a99 Implement UriCreationOptions (#59173)
* Add UriCreationOptions

Includes DangerousDisablePathAndQueryCanonicalization

* Add /// comments
2021-09-16 12:11:08 -07:00
Prashanth Govindarajan d2cef2fe4c Runtime changes for DetectPreviewFeaturesAnalyzer (#59062)
* Turn on DetectPreviewFeaturesAnalyzer and runtime changes

* Missed decimal

* Add comments and update S.Runtime.csproj

* sq

* sq
2021-09-15 11:54:05 -07:00
Buyaa Namnan 8012edd17d Reflection nullability API: improve test coverage, fix bug found (#58479)
* Add/remove some tests, fix generics indexing bug
2021-09-10 18:08:49 -07:00
Jan Kotas 9a26fb9d2a Fix Type.GetTypeFromHandle nullable annotation (#58901)
* Fix Type.GetTypeFromHandle nullable annotation

* Fix build warnings

* Fix warnings in System.Private.DataContractSerialization
2021-09-10 09:37:19 -04:00
Prashanth Govindarajan f7b441d6c1 Add explicit APIs to Double/Single/Half/TimeOnly (#58774)
* Add explicit APIs to Double/Single/Half/TimeOnly

* sq

* Fix get accessor in ref
2021-09-08 14:43:42 -07:00
Elinor Fung 3fd30b0997 Clean up tests under src/tests/reflection (#58673) 2021-09-07 15:13:17 -07:00
Filip Navara 7292301fc5 Add test for implicit time zone conversion for mobile platforms (#58717) 2021-09-07 09:07:35 +02:00
Mitchell HwangandMitchell Hwang db04259424 [Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS (#58562)
* [Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS

* [Libraries] Fix IsIanaIdTest to assert throw for iOS/MacCatalyst/tvOS

* Readd new line

* [Mobile][Libraries] System.Runtime.Tests TimeZoneInfoTests remove mobile from iana conversion support

* [libraries] System.Runtime.Tests revert IsIanaIdTest iOS tvOS special casing

* Remove active issue added in recently merged PR

Co-authored-by: Mitchell Hwang <[email protected]>
2021-09-06 11:06:38 +02:00
Viktor Hofer 36b6247cc7 Update solution files for correct ordering of elements (#58655)
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.

Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
2021-09-04 00:16:15 +02:00
7d58d72894 [libraries] Skip test suites crashing on CI for iOS/tvOS/MacCatalyst (#57208)
* [MacCatalyst][Libraries] Reenable MacCatalyst x64 crashing test suites

* [MacCatalyst][Libraries] Reenable MacCatalyst arm64 crashing test suites

* Temporarily enable MacCatalyst arm64 lane

* Readd consistently crashing suites to iOS tvOS MacCatalyst skips

* Address crashes and PNSE failures on iOS MacCatalyst

* Temporarily bump timeout for tvOS

* fix typo

* Skip more crashed suites

* Undo temporary changes and Add ActiveIssue

* Skip more crashing suites

* Skip iOS.Simulator.Aot.Test flake on MacCatalyst CI

* Add a couple crashing suites

* Remove sample skip in tests.proj as it doesnt do anything

* Add another flakey crashed test for MacCatalyst

* Skip System.Xml.Xsl.XslCompiledTransformApi on MacCatalyst

* Temporarily remove test suite skips and enable arm64 lanes and bump lane timeout to evaluate crashes

* Reenable a test that was fixed

* Update Microsoft.DotNet.Helix.Sdk

Fixes an issue with mismatched dotnet SDK versions we're hitting in runtime-staging on mobile platforms (see https://github.com/dotnet/arcade/pull/7788)

* [iOS] Skip ValidAccessLevelCombinations ReadWriteExecute for iOSSimulator arm64

* Skip failing test suites

* Extend trampoline bump to iOS tvOS MacCatalyst

* Fixup typo

* Fix MonoAOTCompiler typo

* Bump trampolines for osxlike lanes

* Add active issues for failing tests

* Remove ActiveIssue that was fixed

* Add IsIanaIdTest skip

* Bump trampolines even higher

* Address feedback

* Fix typo

* Undo runtime-staging temporary changes and cleanup test skips

* Fix path typo

* Skip iOS sample

* Add new activeIssue and skip flakey Android test crash

* Skip functional tests crashing with exit code 0

Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
2021-09-03 13:22:20 -04:00
Tarek Mahmoud Sayed 5fc05889a8 Fix TimeZoneInfo.HasIanaId when using Local Time Zone (#58392) 2021-08-30 18:43:39 -07:00
Buyaa Namnan 4cf44d02c8 Set generic type arguments nullability for value types (#58036)
* Set generic type arguments nullability for value types
2021-08-30 11:48:22 -07:00
Ulrich Weigand 510f63e1fa [mono] Support RuntimeType.MakeGenericType with non-RuntimeType elements (#58014)
* Fixes https://github.com/dotnet/runtime/issues/58013
2021-08-27 14:49:37 -05:00
Stephen Toub 38631404d4 Fix Enum.Parse's parse failure exception to include value in error message (#57945) 2021-08-23 17:46:23 -04:00
Mitchell HwangandMitchell Hwang 302cc6f3d1 [libraries] Fix System.Runtime.Tests TimeZoneInfoTests for iOS/MacCatalyst/tvOS (#57732)
* [libraries] Fix System.Runtime.Tests TimeZoneInfoTests for iOS/MacCatalyst/tvOS

* Remove redundant PlatformDetection.IsMacCatalyst as IsiOS covers it

Co-authored-by: Mitchell Hwang <[email protected]>
2021-08-19 18:12:53 -04:00
Stephen Toub 80c7acc9db Make all interpolated string handlers pass by ref (#57536)
We currently pass all of our interpolated string handlers to their destination methods by ref, with the exception of those for Debug.  I think it makes sense to centralize on the pattern of always passing by ref: it doesn’t negatively impact the user experience, these are typically larger structs and so by ref helps (though it doesn’t matter for Debug), making it a ref makes it even less attractive to try to call directly / makes it look even more special, and most importantly, it gives us the opportunity to more safely clean up at the end of the operation.  This changes the Debug.Assert/Write{Line}If overloads we added in Preview 7 to pass the handler’s by ref.

This also then updates the Debug.Write{Line}If methods to create the StringBuilder used via StringBuilderCache, just in case these are used in a scenario where true is frequently passed.
2021-08-17 14:17:14 -04:00
Steve Pfister defa26b9e1 Disable System.Drawing.Common tests for mobile workloads and skip a few other tests (#57114)
Since the library is PNSE by default, make sure the tests do not run on mobile.
Also skips a few other tests.

Closes #57184
2021-08-12 20:44:35 -04:00
Mitchell HwangandMitchell Hwang 41e93d4be0 [libraries][iOS][tvOS] Fix case of assembly in ActivatorTests (#57237)
* [libraries][iOS][tvOS] Fix case of assembly in ActivatorTests

* Address test case change feedback

* Remove other activeissue

* Fix spacing

Co-authored-by: Mitchell Hwang <[email protected]>
2021-08-12 16:15:57 -04:00
Lakshan Fernando a4894885a5 Adding warnings to make generic and static ctor (#56628)
* Adding warnings to make generic and static ctor

* build break fixes

* build break2

* build break3

* Suppressing DispatchProxy warnings since they are safe

* FB

* FB

* typos
2021-08-12 08:32:43 -07:00
Eric Erhardt 1011edc50c Annotate DebuggerVisualizerAttribute to be linker safe (#57082)
* Annotate DebuggerVisualizerAttribute to be linker safe

Fix #49055
2021-08-11 15:36:46 -05:00
Dan Moseley c59d2005fc Disable 2 memory heavy array tests for 2 distros (#57108)
* Disable 2 Array tests on 2 distros

* Update string
2021-08-10 20:02:11 -04:00
Buyaa Namnan 8048fe6139 Update the runtime code where iOS/MacCatalyst logic is currently used to benefit from the updated analyzer behavior (#57072)
* Update the runtime code where iOS/MacCatalyst logic is currently used to benefit from the updated analyzer behavior
2021-08-10 11:21:40 -07:00
Dan Moseley 52ace05a1b Fix half bug (#57047)
* Fix half bug

* parens
2021-08-09 20:14:45 -06:00
Prashanth Govindarajan 822d877070 Update RequiresPreviewFeatures attribute (#56938)
* Add constructors and Message, URL properties

* Update attribute and tests

* sq

* Address feedback

* Just adding docs
2021-08-09 15:48:40 -07:00
Buyaa Namnan 5a02633884 Fix failling stress test (#56859) 2021-08-05 08:59:52 -07: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
Jeff Handley 4fa710e22f Mark HandleProcessCorruptedStateExceptionsAttribute as obsolete (#56664) 2021-08-03 19:28:42 -04:00
Andy Gocke 4500583025 Add RequiresAssemblyFiles attribute (#56196)
This PR annotates every API doc'd as having different
behavior in single-file publishing with RequiresAssemblyFiles.
Some APIs might be special-cased by the analyzer to produce
special messages, but RAF is useful for visual inspection
of the APIs. Module.Name and .FullyQualifiedName were also
unannotated.
2021-07-30 13:20:57 -07:00
Eric Erhardt 577d079a72 Move ILLink.LinkAttributes to shared and support NullabilityInfoContext with trimming nullability attributes (#56475)
* Copy ILLink.LinkAttributes from mono to shared.

* Update ILLink.LinkAttributes that are now shared between mono and coreclr

- Move IntrinsicAttribute to mono only
- Introduce feature switches for NullabilityInfoContext and AggressiveAttributeTrimming
- Minor other cleanup

* Respect the NullabilityInfoContext.IsSupported feature switch in NullabilityInfoContext.

* Document new feature switches

* Add trimming tests for NullabilityInfoContextSupport

* Move NonVersionableAttribute to mono-only

* Fix Linq tests now that the ExtensionAttribute isn't being trimmed all the time on mono WASM
2021-07-30 14:07:01 -05: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
ChrisVicaryandcvicary 7ed2959639 Fix for issue 56200 (#56261)
Use InternalFormat when formatting an integer
value as an Enum that uses the FlagsAttribute.

Fix #56200

Co-authored-by: cvicary <[email protected]>
2021-07-28 09:37:19 -04:00
Stephen Toub b9e3c72ead Update compiler version to enable CallerArgumentExpression (#56349) 2021-07-27 06:40:25 -04:00
Maxim Lipnin f5ed68b183 [iOS/tvOS/MacCatalyst] Disable some of the library tests due to failures (#56074)
It's to clean up the respective CI staging lanes.

The related issues:

[iOS/tvOS/MacCatalyst] Test failures in System.Diagnostics.Tracing.Tests #56073

[libraries][iOSSimulator] ImageTests.FromFile_NullFileName_ThrowsArgumentNullException fails  #56048

JitInfoIsPopulated failed with after is not greater than before #55712

[MacCatalyst] Test failures in System.Tests.OperatingSystemTests #56084

[MacCatalyst] App crash in System.Text.Json.SourceGeneration.Tests #56085
2021-07-22 15:39:41 -04:00
Elinor Fung 3f827217f4 Use Enabled/DisabledFeatureSwitches metadata in TrimmingTests (#56107) 2021-07-21 16:30:00 -07:00
62fad9df39 Disable array support for the COM variant wrapper classes when built-in COM is disabled. (#55756)
* Disable array support for the COM variant wrapper classes when built-in COM is disabled.

Fixes #55600

* Fix config call.

* Fix one more location of wrapper class usage.

* Fix method name.

* Add trimming test.

* Fix AV in IsArrayOfWrappers

* Fix trimming test

* Apply suggestions from code review

Co-authored-by: Eric Erhardt <[email protected]>

* Set Trim=true

Co-authored-by: Elinor Fung <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
2021-07-18 18:46:19 -05:00
Tanner Gooding 405da674b6 Add a System.Runtime.Experimental package so users can still use the generic math preview (#55678)
* Add a System.Runtime.Experimental package so users can still use the generic math preview

This reverts commit f6eb259db6.

* Simplify S.R.Experimental so it only produces a ref and its build version is 100 higher

* Ensure a nuget package is being produced and resolve PR feedback

* Update src/libraries/System.Runtime.Experimental/Directory.Build.props

* Add a reference to System.Runtime.Experimental so mono can build

* Disable System.Runtime.Experimental.Tests on WASM AOT
2021-07-15 18:23:31 -07:00
David Cantú 0dcf196495 Remove default value from param in ResolveLinkTarget(bool returnFinalTarget) missed in the main PR (#55670) 2021-07-14 23:07:12 -07:00