Commit Graph
1634 Commits
Author SHA1 Message Date
Egor BogatovandStephen Toub bba6c0b618 Add Tuple-based Math.DivRem overloads (#45074)
* Add Tuple-based Math.DivRem overloads

* Remove internal versions of Math.DivRem

* Add AggressiveInlining

* Add comments

Co-authored-by: Stephen Toub <[email protected]>
2020-12-03 20:39:33 -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
Stephen Toub ffe020f0c4 Add wiggle room to MonitoringIsEnabled test (#44228) 2020-11-03 20:00:30 -05: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
Egor Bogatov 298d019c4a RyuJIT: Fold Popcnt.PopCount with constant argument (#37836)
Intrinsify BitOperations.PopCount for constant input
2020-10-27 08:31:59 -07:00
Egor Bogatov 21f515290e [mono] Fix constant folding for Math.Round (#42951) 2020-10-03 01:19:06 +03:00
Santiago Fernandez MaderoandEirik Tsarpalis 0798485568 Add server core testing (#41701)
* Add server core testing to Windows x64

* Add server core testing

* Use 20h1 queue instead

* Remove runtime testing until we get more capacity on 20H1 queue

* Use 2004 image

* Skip tests on Server core

* PR Feedback and fix build

* Disable more server core tests

* Disable more tests on Server Core

* Attempt fixing failing process test in server core

address feedback

* Fix PlatformDetection.IsInContainer for windows and feedback from Eirik's change

* PR Feedback

* Don't run server core on PRs yet until we get more capacity

Co-authored-by: Eirik Tsarpalis <[email protected]>
2020-10-01 14:35:25 -07:00
2544c744d2 Add Environment.ProcessPath (#42768)
Fixes #40862

Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Ryan Lucia <[email protected]>
2020-10-01 07:21:30 -07:00
Huo Yaoyuan d66f88b379 Add more Half methods to BitConverter (#41789)
* Add GetBytes, TryWriteBytes, ToHalf overloads for Half.

* Add ref source in System.Runtime.

* Add basic tests.

* Add array and span tests in BitConverter.

* Add xmldoc for BitConverter.GetBytes and TryWriteBytes.

* Add xmldoc for BitConverter.ToXXX.

* Add xmldoc for BitConverter.BitsTo.
2020-09-04 16:46:59 -07:00
Huo YaoyuanandJan Kotas 393c1b2067 Add methods to manipulate Half in binary (#40882)
* Expose HalfToInt16Bits and Int16BitsToHalf.

* Use HalfToInt16Bits and Int16BitsToHalf in tests.

* Add and expose BinaryPrimitive Half overloads.

* Test BinaryPrimitive Half overloads.

* Add and expose BinaryReader/Writer Half overloads.

* Test BinaryReader/Writer Half overloads.

Co-authored-by: Jan Kotas <[email protected]>
2020-09-01 13:17:28 -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
Adam Sitnik 3ea278dae3 Remove new platform members from OSPlatform (#40373)
* Remove new platform members from OSPlatform

* remove IsOSPlatformEarlierThan and IsOSPlatformOrLater methods

* remove unused resource and dependency

* delegate RuntimeInformation.IsOSPlatform to call OperatingSystem.IsOSPlatform. it won't compile now as the new guards have not been merged yet (#40457)

* remove OSPlatform.Browser and it's usage
2020-08-07 12:18:34 +02:00
Adam Sitnik c073e574a6 Implement platform guards in OperatingSystem class (#40457)
* add Is$OsName methods to OperatingSystem class

* add OperatingSystem.*VersionAtLeast methods

* add IsOSPlatform and IsOSPlatformVersionAtLeast

* add xml comments

* address code review suggestions

* move TARGET_* defines to a common file
2020-08-07 09:16:19 +02:00
Marek SafarandAlexander Köplinger 5ad9b0e233 Add Browser specific PersistedFiles implementation (#39350)
* Add Browser specific PersistedFiles implementation

Simplified the implementation removes dependency on several native calls
which all return only default values.

Co-authored-by: Alexander Köplinger <[email protected]>
2020-08-04 21:00:13 -05:00
Larry Ewing 6caef38177 [wasm] Enable stack tests that now work on browser-wasm (#40206)
* Enable stack tests that now work on browser-wasm
2020-07-31 13:18:32 -05: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
Kenneth Pouncey bf0076c80b [browser][tests] Activate System.Runtime.Extensions UserName tests (#39692)
- Added specific tests for Browser
2020-07-21 13:30:44 +02:00
Nicolas Portmann f6dc87f43d Add Convert.ToHexString/FromHexString
Add methods to convert between hexadecimal strings and bytes, and converts internal usage to use those APIs when possible, or reuse the shared code as helpers otherwise.
2020-07-17 17:12:21 -07: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
5c99007671 ICU integration and asset loading overhaul (#37971)
This PR overhauls runtime startup/asset loading and adds support for ICU integration.

The mono-config.js format is reworked and simplified, with new functionality added:

    Individual assets can be loaded from one or more remote sources with configurable fallback behavior
    In addition to the existing support for loading assemblies, you can now pre-load arbitrary files into the native heap or into emscripten's virtual file system. VFS support previously only existed in runtime-test.js but now is available to any consumer of dotnet.js.
    Assets can have a virtual path set so that their application-facing path does not necessarily have to match their path on the server.
    One or more ICU data archives can be added to the assets list and will be automatically loaded and used to enable ICU-based globalization support.
    Many configuration knobs that previously required API calls can now be set declaratively in the configuration file (environment variables, etc.)

WasmAppBuilder is updated to add ICUDataFiles and RemoteSources parameters that can be used to add the associated information to the config file declaratively from a msbuild project.

Various adjustments are made to existing tests and test cases so that they will pass with the addition of ICU integration.

Co-authored-by: EgorBo <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
Co-authored-by: Larry Ewing <[email protected]>
2020-07-16 16:02:10 -07:00
Alexander KöplingerandStephen Toub b44daef3e8 WASM: Fix System.Diagnostics.TraceSource tests (#39224)
* WASM: Fix System.Diagnostics.TraceSource tests

One test was using `Assembly.GetEntryAssembly()` which returns null on WebAssembly.
Others are testing that the output contains the stacktrace but it is empty on WASM right now.

* PR feedback

Co-authored-by: Stephen Toub <[email protected]>

Co-authored-by: Stephen Toub <[email protected]>
2020-07-14 11:58:11 +02:00
927ced16e8 [wasm] Addressing System.Runtime.Extensions failures (#38996)
Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
2020-07-13 22:30:36 +02:00
Alexander Köplinger fff0ec3c92 Add space after "Other" in OperatingSystem.VersionString (#39180)
Follow-up to https://github.com/dotnet/runtime/pull/39130
2020-07-13 20:56:53 +02:00
Alexander Köplinger 9bd7dd7c62 Fix creating OperatingSystem with PlatformID.Other (#39130)
Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
https://github.com/dotnet/runtime/pull/38790 was missing some tests that verified this behavior.
2020-07-11 03:49:23 +02:00
Stephen Toub ea2b09beea Add and use Environment.ProcessId (#38908)
* Add and use Environment.ProcessId

* Split newly added tests
2020-07-09 18:09:05 -04:00
Anirudh Agnihotry d3f62bd225 remove pragma warning from ref source files (#38907) 2020-07-08 18:33:44 -07: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
Ryan Lucia c4cef3ab83 Add explicit test for generic argument list with Type.GetType (#37872)
And disable it for Mono, given our current bug. This is tested indirectly by the other test I've updated, but I think it ought to be more clear.
2020-06-24 16:00:05 +02:00
Anirudh Agnihotry 9907151841 Add Netcoreapp ridless config to System.Private.Uri And System.Private.Xml (#38142)
* remove unnecessary cross compilation

* remove extra <

* correct pinvoke path

* use ridless for unix os

* remove extra warn
2020-06-23 09:33:21 -07: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
Santiago Fernandez Madero 4aef3cc24e Disable Environment.UserName tests in wasm (#38166) 2020-06-19 16:46:26 -07:00
Santiago Fernandez Madero 07f9116469 Add support to map test support files to wasm vfs in WasmAppBuilder (#37938)
* Add support to map test support files to wasm vfs in WasmAppBuilder

* PR Feedback

* Remove workaround for System.Reflection.Metadata.Tests

* Add BCL and BuildReference assets to VFS

* PR Feedback and fix more test projects

* Avoid potential null ref
2020-06-18 01:28:07 -07: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
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
Ryan Lucia 37dea6f745 [runtime] Add remaining runtime events and fix some existing ones on netcore (#36658)
* Wire up OnResourceResolve

* Fix corlib satellite assembly check for postload hook

* Add ALC and AppContext to mono_defaults

* Remove ProcessExit from MonoDomain and clean up caller

* Remove UnhandledException from MonoDomain and call AppContext instead

* Wire up FirstChanceException

Still need to clean up handle usage, resolve some unanswered questions, and fix the remaining test (AssemblyResolve_FirstChanceException)

* Cleanup

* Update AssemblyResolve_FirstChanceException ActiveIssue

* Fix build

* Feedback

* Ensure no stray handles exist during thread finalizer
2020-06-08 02:17:45 -04:00
John Kelly 16e7c69d3d Add Math.Tau, MathF.Tau (#37517)
* Add Math.Tau, MathF.Tau

* Remove unncessary 'checked' and wrong val
2020-06-07 08:54:21 -07:00
Jan Kotas 6f01d72467 Follow ups for Math.BigMul (#36920)
- Use more efficient and compact uint cast instead of bit masks where possible
- Improved test coverage
- Update comment in FastMod
- Optimize BigMul for 32-bit platforms
2020-05-23 20:23:20 -07:00
SRVandAdeel Mujahid 70ac9ae4c6 BigMul with 64-bit operands (#35975)
* Unsigned 128-bit BigMul

* Signed 128-bit BigMul

* Added explanation of alg and reference to it

* Removed else branch

Co-authored-by: Adeel Mujahid <[email protected]>
2020-05-22 20:48:53 -07:00
Carlos Sanchez LopezandJan Kotas 61c6581832 Fix Path.GetPathRoot wrong check in Unix (#35734)
* Fix Path.GetPathRoot wrong check in Unix

* Return .Empty instead of null

* Update src/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.cs

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

* Address unit test comments

Co-authored-by: Jan Kotas <[email protected]>
2020-05-13 12:24:01 -07:00
Eric Erhardt 2d4acbde20 Return the correct OSVersion on OSX like systems. (#36029)
* Return the correct OSVersion on OSX like systems.

Fix #34977

* Rename files to not have Linux when they aren't Linux specific.

* Assert OSVersion Build number is valid.

* PR feedback

Move interop code to Common\src\Interop.
Specify the full path to libobjc.dylib.
Fix objc_msgSend_stret for ARM64.

* Specify full path to libproc.dylib.

Fix #24095
2020-05-11 09:47:01 -05:00
Viktor Hofer 000046f6c8 Change netcoreapp5.0 to net5.0 (#35176)
* Change netcoreapp5.0 to net5.0

* Remove tfm downgrades

* Rename S.R.CS.Unsfae include folder
2020-05-06 13:53:21 +02:00
Anirudh Agnihotry 0ac72ac366 Remove TargetsNet* from the runtime repo (#35589)
* feedbacl from previous time

* remove TargetsNet* from ItemGroup

* removing targetFramework from .targets
2020-05-04 17:12:23 +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
Anirudh Agnihotry ec685b719c fixing building of projects in VS (#35146) 2020-04-19 10:09:42 -07:00
Günther Foidl 7b5b7f10fb Better codegen / perf form Math.Max and Math.Min (#33851)
* Forced inline of Math.Min/Max double/float

* Math.Min split in fast and slow

* Math.Min another try

* Added more tests to Math

* Picked variant "MinReorder"
2020-04-14 07:58:39 -07: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
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
Maxim Lipnin 63bac660b1 Remove CoreFX.issues_linux.rsp file (#33953)
* Enable some tests passing locally

* Disable several tests failing in linux CI due to the problem with
libgdiplus

* Enable tests passing locally on Ubuntu 18.04

* Disable several tests failing in
AssemblyLoadContext.InternalLoadFromPath

* Remove CoreFX.issues_linux.rsp file

* Fix condition for including rsp files
2020-03-25 09:05:57 -04:00