Commit Graph
229 Commits
Author SHA1 Message Date
Vitek Karas 0042240dd8 Add zip tool to the install list for Android tests (#57569)
On default WSL Ubuntu `zip` is not installed, and trying to build Android tests fails with rather cryptic errors.
2021-08-17 08:00:48 -07:00
Tomáš Rylek 3b40c7cfc4 Add support for building just a subset of runtime tests (#57142)
This change adds four new options to the runtime test build command:

1) test <test project path relative to src\tests> - build just that
one test.

2) dir <directory relative to src\tests> - build all tests in the
directory.

3) tree <directory relative to src\tests> - build all tests in the
given subtree.

4) all - use clean rebuild (i.e. don't apply incrementalism)
when building the tests.

Thanks

Tomas
2021-08-12 15:54:17 +02:00
Adam SitnikandSingleAccretion 2ce426a7b3 update Windows ARM build requirements (#57275)
* update Windows ARM build requirements

* Apply suggestions from code review

Co-authored-by: SingleAccretion <[email protected]>
2021-08-12 13:19:48 +02:00
Fan YangandJuan Hoyos e0ba450d7f [Mono] Update instructions for running runtime tests on Android (#57166)
* Update instructions for running runtime tests on Android

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Juan Hoyos <[email protected]>

Co-authored-by: Juan Hoyos <[email protected]>
2021-08-11 12:13:29 -04:00
Viktor Hofer 22cee85aa0 Clean-up pkgproj leftovers in libs and apply fixes (#56899)
* Clean-up pkgproj leftovers in libs and apply fixes

Remove any pkgproj infrastructure that was only used by src/libraries
(which is the majority). Delete the packageindex *YAY*.
Update the documentation that covered the packageindex and the pkgprojs.

Avoid any incremental builds during packaging by removing
libraries-packages.proj and use src.proj for packaging instead. Make use
of the `GeneratePackageOnBuild` property to build package during the
allconfigurations without requiring a different entry target.

Fix the addition of the DocumentationFile during packaging when
`GeneratePackageOnBuid` is used by hooking onto the
`DocumentationProjectOutputGroup` that NuGet uses and replacing the
generated documentation file with the one that comes via the
intellisense package.
Also introduce a property to choose the generated documentation file
over the one from the intellisense package:
<UseIntellisenseDocumentationFile>false</UseIntellisenseDocumentationFile>

Removing a few leftover PackageDescription properties from the projects'
Directory.Build.props file.

Cleaning up properties in Directory.Build.props & Directory.Build.targets
files.

* Actually run packaging during the allconfigurations build

* Update docs

* make runtime specific pkgs non packable

* io.ports native pkg fixes
2021-08-06 12:01:36 +02:00
Chris Ross b8a9eabb16 Update windows-requirements.md (#56476) 2021-08-03 08:48:59 -06:00
Jeremy Koritzinsky 3dc99e900b Build C++/CLI tests as .NET Core C++/CLI (#56502)
* Build IJW assemblies against LKG SDK ref pack.

* Allow building against the live ref assemblies by passing `-cmakeargs -DCPP_CLI_LIVE_REF_ASSEMBLIES=1` to the test build script.

* Add test instructions

* Error handling

* Add support for the stdcall-mangled _CorDllMain entrypoint on x86 since MSVC uses it if it exists.

* Write out ref-pack path.
2021-08-02 16:53:48 +00:00
Eric Erhardt 65f04b9f29 Resolve MakeGenericType ILLink warning in DependencyInjection (#55102)
* Resolve MakeGenericType ILLink warning in DependencyInjection

Resolve the ILLink warning in DependencyInjection by adding a runtime check that is behind a new AppContext switch 'Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability'. The runtime check ensures the trimming annotations on the open generic types are compatible between the service and implementation types. The check is enabled by default when PublishTrimmed=true.

* Make VerifyOpenGenericServiceTrimmability a full feature switch
2021-07-31 08:46:27 -06:00
CW2andJuan Hoyos 0f04d34ac4 Added Visual Studio build tools (#55629) (#56234)
* Added Visual Studio build tools (#55629)

Added description of build tools (CMake, Ninja and Python) installation as Visual Studio Individual Components.
Added emphasis (bold) of Visual Studio installer sections and components (replaces previously used different styles of quotes).

* Removed Python 32-bit VS component

Python 64-bit component is enough for building x86 and x64 target architectures.

Co-authored-by: Juan Hoyos <[email protected]>
2021-07-30 22:54:03 -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
Ankit JainandLarry Ewing d953229d54 [wasm] Run Wasm.Build.Tests against workloads (#54451)
Co-authored-by: Larry Ewing <[email protected]>
2021-07-14 10:47:03 -04:00
Jeff Handley 69d67390e5 Fix the daily build links in docs (#55443)
* Fix the daily build links in docs

* Update the NuGet feed referenced
2021-07-09 22:32:23 -04:00
Tarek Mahmoud SayedandEric Erhardt 04dac7b0fe Allow restricting cultures creation with any arbitrary names in Globalization Invariant Mode (#54247)
Co-authored-by: Eric Erhardt <[email protected]>
2021-07-01 11:55:05 -07:00
Mike McLaughlin cef40a107f Move the metadata update related APIs to the MetadataUpdater class (#54590)
Move the metadata update related APIs to the MetadataUpdater class

The old APIs AssemblyExtensions.ApplyUpdate() and AssemblyExtensions.GetApplyUpdateCapabilities() will be removed
after all the references to them have been changed to the new APIs.

Add the new IsSupported API described in issue https://github.com/dotnet/runtime/issues/51159.

Change the tests to use the MetadataUpdater APIs.

Fix the ApplyUpdate qcalls and icalls

Add the ILLink substitutions for MetadataUpdater.IsSupported property

Change the old APIs to call the new ones

Update mono's MetadataUpdater.IsSupported property

Update feature switch doc

Fixed the argument checking in coreclr's MetadataUpdater.ApplyUpdate().
2021-06-24 22:54:28 -07:00
Radek DoulikandLarry Ewing 055a38a906 [wasm] Bump emscripten to 2.0.23 (#53603)
Bumps emscripten to 2.0.23

The Browser AOT tests now use `-Wl,-lto-O0` option to reduce memory usage of `wasm-ld` tool, which was in some cases going over avaiable 8GB on helix machines.

* Revert "Add ActiveIssue to the MemoryMappedFiles tests"

This reverts commit ec1ae530606ef1061680600fc046226cc1c4cbc3.

* Revert "Add ActiveIssue attr to the FileSystem tests"

This reverts commit 356b3ff2a703980ac01b9df697a594e8c341c436.

* Bump emscripten version to 2.0.23

* Use newer docker images with 2.0.23

* Update docs

* Use 2.0.23 emscripten nuget packages

* Revert "Revert "Add ActiveIssue attr to the FileSystem tests""

This reverts commit eb2f9548b08c114b359fab8d867ba50de098fe48.

The fix is not present in 2.0.23

* Revert "Revert "Add ActiveIssue to the MemoryMappedFiles tests""

This reverts commit 8be39f583499a8d8451034c65260a785330b0795.

The fix is not present in 2.0.23

* Increase timeout for AOT tests

* Add description of emscripten bump to README

* Try to get information about resources

* Get all limits

* Escape & chars

* Reduce platform matrix

* Lets try one more build with doubled timeout

* Revert "Lets try one more build with doubled timeout"

This reverts commit 67dd7754bb79218b2c6b687034162d041715093e.

* Try -Wl,-O0 on CI

To be sure it behaves the same as in local build

* Use -Wl,-lto-O0 do lower link time optimization

It looks like it reduces the memory load a lot

* Set EmccLinkOptimizationFlag for AOT tests

And reset the default value

* Escape commas

* Revert "Reduce platform matrix"

This reverts commit fec0e557208eb165824e75cd57b895a74d164de4.

* Remove resource info retrieval

* Bump emsdk versions

Co-authored-by: Larry Ewing <[email protected]>
2021-06-24 17:20:26 +02:00
Noah FalkandViktor Hofer d783a8c812 Update library testing docs page to reduce confusion (#54324)
* Add warning on unmaintained testing doc page

* Update testing.md

Some example text that seems more clear to me, but only offered as a suggestion. 
Feel free to adjust it or if you want to use it as-is please double check what I wrote is accurate : )

I think the useful elements are:
1. Being explicit about what workflow steps need to happen in total
2. Being explicit about which commands are covering the entire workflow and which ones are only covering a part of it
3. Show the simple "do-it-all" options first before showing more complex partial options. Glancing at the first example and blindly copying it should land in the pit of success.

Co-authored-by: Viktor Hofer <[email protected]>
2021-06-23 09:00:47 +02:00
xtqqczze 1cf9e342e7 Clarify Visual Studio minimum requirement (#52820) 2021-06-21 08:21:52 -07:00
Pavel Savara fb61be479e [wasm][testing] hosting echo server in xharness process (#52923)
- move tests to inner loop
- include echo middleware in xharness server
- improve doc
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53592 for lack of TRACE
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53591 for content on GET/HEAD
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53874 for HttpRequestMessage.Headers.Host
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53872 for NPE on System.Net.Http.BrowserHttpHandler
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53876
- include middleware in Helix correlation payload
2021-06-09 17:32:58 +02:00
Aaron Robinson bf008ec1ce Update feature-switches.md (#53639) 2021-06-03 19:47:07 -07:00
Radek Doulik d43b00abe0 [wasm] Bump emscripten to 2.0.21 (#52870)
* Bump emscripten version

* Rename __padding to _padding to avoid warnings

And errors as we use `-Werror`:

    error G94F6014A: identifier '__padding' is reserved because it starts with '__'

C99 and C++ standard defines indentifiers with `__` prefix as reserved.

* Fix cast warning/error

With latest emscripten we get this warning (and error as we use
 `-Werror`):

    src/libraries/Native/Unix/System.Native/pal_process.c(374,92): error G3DC5E52A: cast from 'void (*)(int, siginfo_t *, void *)' to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type]
                  void (*oldhandler)(int) = (((unsigned int)sa_old.sa_flags) & SA_SIGINFO) ? (void (*)(int))sa_old.sa_sigaction : sa_old.sa_handler;

* Add `-s DISABLE_EXCEPTION_CATCHING=0`

when building dotnet.js

* Use EMSDK_PYTHON

* Use delayed expansion

Before the `EMSDK_PYTHON` was evaluated before running
the `emsdk_env.bat` script.

* Replace deprecated EXTRA_EXPORTED_RUNTIME_METHODS

with EXPORTED_RUNTIME_METHODS

Build warning/error:

    emcc : warning : EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]

* Don't need to cast anymore

* 2.0.21 was just released, so try our luck ;-)

* Use new docker images with 2.0.21

* Use the sys includes fix on all platforms

* Remove deprecated --llvm-opts usage

Context: https://github.com/emscripten-core/emscripten/commit/0691cc68eef89fe59f66eacdba245470bea2a113

* Update emscripten version in the workload manifest

* Update emscripten versions in the docs

* Update eng/ versions

* Add ActiveIssue attr in the MemoryCacheTest

* Add ActiveIssue attr to the FileSystem tests

* Update after merge

* Resolve one more conflict

* Add ActiveIssue to the MemoryMappedFiles tests

* Revert "Fix cast warning/error"

This reverts commit 0a1aa4a88c07bc48d3d35c68369d1dca4897d849.

* Unset HAVE_FORK for Browser

* Remove active issue

Fixed by https://github.com/dotnet/runtime/commit/93cf5df65fc13bfbc29256acc8c9c0e102a1170b

* Set HAVE_FORK to 0

* Set HAVE_FORK to 0 instead if unsetting

* Remove -s DISABLE_EXCEPTION_CATCHING=0

It might not be needed anymore
2021-06-02 12:21:53 +02:00
b443b8ccce Update testing docs with x86 instructions (#48715)
* Update testing docs with x86 instructions

* Apply suggestions from code review

Co-authored-by: Santiago Fernandez Madero <[email protected]>

* add more examples

* Apply suggestions from code review

Co-authored-by: Dan Moseley <[email protected]>

* Update docs/workflow/testing/libraries/testing.md

Co-authored-by: Santiago Fernandez Madero <[email protected]>

Co-authored-by: Santiago Fernandez Madero <[email protected]>
Co-authored-by: Dan Moseley <[email protected]>
Co-authored-by: Eric StJohn <[email protected]>
2021-05-24 11:45:21 -07:00
Lakshan Fernando 6854225c09 Com trimming related work (#52940)
* COM related work and native host name changes

* FB
2021-05-21 06:12:46 -07:00
Lakshan FernandoandVitek Karas 127be4b389 Native host warnings fix (#52109)
* Native host warnings fix

Native host warnings fix

* Feedback

* Update docs/design/features/IJW-activation.md

Co-authored-by: Vitek Karas <[email protected]>

* Update src/coreclr/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.xml

Co-authored-by: Vitek Karas <[email protected]>

* Update src/coreclr/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.xml

Co-authored-by: Vitek Karas <[email protected]>

* Update docs/workflow/trimming/feature-switches.md

Co-authored-by: Vitek Karas <[email protected]>

* fixing the native host feature settings

* feedback on error code

* fb

* FB

* merge conflict

Co-authored-by: Vitek Karas <[email protected]>
2021-05-15 13:26:10 -07:00
Andrii Kurdiumov eb54d0d940 Add list of prerequisites for Gentoo (#50317) 2021-05-11 10:08:59 -07:00
Aaron Robinson 60735c6d3f NSAutoreleasePool instance should be added to all threads. (#52023)
Add an NSAutoreleasePool to all managed create threads including the Main and Finalizer.

This expands the current support where support was only added to ThreadPool threads. 

New feature switch was created and the ThreadPool one was removed.
 - System.Threading.Thread.EnableAutoreleasePool

Updated AutoReleaseTest for the new scenarios.
2021-05-10 13:31:39 -07:00
Lakshan FernandoandElinor Fung 9d46a821f2 Fixes COM warnings (#52176)
* Fixes COm warnings

* fb

* feedback

* missed one name change

* Update docs/workflow/trimming/feature-switches.md

Co-authored-by: Elinor Fung <[email protected]>

Co-authored-by: Elinor Fung <[email protected]>
2021-05-07 07:39:16 -07:00
Zoltan Varga da580beb98 [mono] Update wasm debugging docs. (#52211) 2021-05-03 16:25:13 -04:00
Steve Dunn 5d4bdeea8c Correct grammar (#52151) 2021-05-01 10:55:00 -07:00
Alexander Köplinger 94e14014a0 Fix feature switches doc about UseNativeHttpHandler (#52055)
The value actually checked in the sdk is UseNativeHttpHandler, not HttpNativeHandler.
2021-04-29 17:50:30 +02:00
Aaron RobinsonandElinor Fung 66abf41f1e corerun supports user defined properties from command line. (#51774)
* corerun supports user defined properties from command line.

* Update workflow help doc for corerun.

Co-authored-by: Elinor Fung <[email protected]>
2021-04-26 20:46:55 -07:00
SingleAccretion 11f1d82225 Fix the docs on building Mono runtime packages (#50583) 2021-04-26 11:16:09 +02:00
Andrei Faber 30b31615b2 debugging.md - fixed incorrect paths (#51577) 2021-04-24 06:36:34 -07:00
Andrei Faber 6328f7bb96 editing-and-debugging.md - fixed incorrect file name (#51741) 2021-04-23 09:53:40 -07:00
6ca3d9105d Shift Most of Wasm AOT test build to helix (#48226)
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.

## This is done by:
1. building the test assemblies on the build machine
   - the wasm part of the build is not executed on the build machine,
      because it has the AOT build part
2. Zip up the test assembly+friends, *and* any bits required to run the wasm
    app build for that on helix (eg. emsdk, wasm app targets, cross compiler etc)
3. Send all this to helix, and use a custom `aot-build.proj`
     - which recreates all the build inputs for the `WasmBuildApp` target
        using the paths for the assets on helix
     - then we can run `WasmBuildApp` for the build, resulting in a wasm app
       bundle.
4. Run the tests!

- We already have the bits required for building wasm apps on helix, supported
for `Wasm.Build.Tests`, which we can use here too.

## Trimming:

- Since, AOT can be so expensive, we use `EnableAggressiveTrimming=true`(EAT), but
   that means that we could have issues due to trimming.
- And it can sometimes be unclear whether the build/test failures are due to trimming
     or AOT.

- Because these builds+test runs are different from other builds, owing to the
   "build partially on helix" step, a normal EAT build would not be the same as 
- to help with testing this, we add two lanes to `runtime-staging`:
   - `*_Mono_AOT`: builds AOT+EAT on helix
   - `*_Mono_EAT`: builds EAT, on helix
      - this is required because we want to run almost the same kinda
         build: 1. build test assembly; *2. send to helix; 3. build wasm app;* 4. run tests

- This should effectively mean that we can see which errors might be due to EAT, and
   which are clearly because of EAT+AOT.

Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Marek Safar <[email protected]>
Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Ankit Jain <[email protected]>
2021-04-21 20:58:25 -04:00
Zoltan Varga bdf33aa9ca Add wasm runtime debugging docs. (#51623) 2021-04-21 11:04:48 -04:00
Elinor Fung 189829cbf6 Use simpler command in example for building individual coreclr test (#51364)
* Use simpler command in example for building individual coreclr test

* Remove comment about using 'dotnet msbuild'
2021-04-16 10:56:28 -07:00
Mike McLaughlinandJuan Sebastian Hoyos Ayala 79ad10cf22 Add MachO dump writer to createdump (#51150)
* Add MachO dump writer to createdump

Instead of the hacky ELF core dumps on MacOS now createdump generates true MachO dumps.

Setting the COMPlus_DbgEnableElfDumpOnMacOS environment variable is no longer needed.

Add special thread info memory region containing the OS thread ids missing from macho core dumps. This allows SOS to map the thread indexes to thread ids. The address (0x7fffffff00000000) of this special memory region is above the highest user address (0x0007FFFFFFFFF000) and below a kernel reserved address (0xffffff8000xxxxxx) which is kind of moot because dumps don't include any kernel regions. lldb seems just fine with this memory region.

The changes include ARM64 support also, but since I don't have a M1 device I can't build/test them. I'm hoping Steve can at least review them.

Add --verbose/TRACE_VERBOSE support to tone down all the macho dump generation spew.

Issue: #48664

* Fix build problem

* Update docs

* Code review feedback

Co-authored-by: Juan Sebastian Hoyos Ayala <[email protected]>
2021-04-15 21:45:55 +00:00
Ankit Jain 8d102e3fc2 [wasm][tests] Enable line numbers in stack traces (#50893) 2021-04-12 13:01:25 -04:00
Pavel Savara 8969ae68d9 make emsdk installation instructions clear on which version need to be installed (#51071)
* make emsdk installation instructions clear on which version need to be installed

* whitespace

* Radek's feedback
2021-04-12 11:17:20 -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
erhanatesoglu aa64d2e712 Fixed broken link (#50964)
The link to xunit on github has changed.
2021-04-08 17:56:01 -04:00
Elinor Fung 5ca4992150 Clarify instructions for building individual test with native dependency (#50869) 2021-04-07 13:59:03 -07:00
Ankit Jain 8a1101d2b5 [wasm][tests] Add properties to allow passing args to xharness (#50678)
* [wasm][tests] Add properties to allow passing args to xharness

New properties:
- `$(WasmXHarnessArgs)`
- `$(WasmXHarnessMonoArgs)`
- `$(WasmTestAppArgs)`

Xharness command line is built with these:

`dotnet xharness wasm test .. $(WasmXHarnessArgs) .. -- $(WasmXHarnessMonoArgs) .. --run .. $(WasmTestAppArgs)`

* [wasm][tests] extract wasm bits into tests.wasm.targets

* [wasm] set EMSDK_PATH for makefile run-tests- targets

* [wasm] Update target dependencies for wasm

* Don't overwrite RunScriptCommand, thus fixing wasm build tests

* Track property name changes
2021-04-07 13:06:55 -04:00
Jeremy Koritzinsky a211e4fed9 Clarify that Ninja is required for the default build experience. (#50809) 2021-04-06 14:20:40 -07:00
Jeremy KoritzinskyandJuan Hoyos 8c2158f9fe Make Ninja the default CMake generator on Windows for the repo (#49715)
Co-authored-by: Juan Hoyos <[email protected]>
2021-04-05 09:28:04 -07:00
Ryan Lucia 240fcec9d8 Update iOS workflow docs to clarify simulator/device os split (#50366) 2021-04-05 07:55:20 -04:00
SingleAccretion af5eae3c87 Delete missed mono/netcore from the documentation (#50557) 2021-04-01 09:27:57 -04:00
Prashanth GovindarajanandEric Erhardt 3c135c5c38 Prohibit BF unless the app opts in (#48527)
* Prohibit BF unless the app opts in

* Address feedback

* First unit test

* 2nd unit test. Checkpoint

* sq

* sq

* sq

* Address Levi's feedback

* sq

* Address nits

* Linker changes and tests

* sq

* sq

* Linker warnings ids

* Address comments

* Change trimming test so linker can detect a pattern

* sq

* Address comments

* sq

Co-authored-by: Eric Erhardt <[email protected]>
2021-03-31 13:08:23 -07:00
Fan Yang 1ce7460578 Update testing-android.md (#50484) 2021-03-31 10:03:27 -07:00
Eric Erhardt 99f4062f8e Add documentation on ILLink files (#50302)
* Add documentation on ILLink files

* Add link to ILLink-files from project-guidelines
2021-03-28 16:52:37 -05:00