From 0b6b28d1678e93630c2786284f1b4a2e7da476a4 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 23 Feb 2023 17:10:38 -0500 Subject: [PATCH 1/7] [wasi] CI: Enable assert messages on CI --- .../extra-platforms/runtime-extra-platforms-wasm.yml | 4 ++-- eng/pipelines/runtime.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml index 444c2862bad825..a8a25edcc1493b 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml @@ -184,7 +184,7 @@ jobs: - wasi_wasm - wasi_wasm_win nameSuffix: '_Smoke' - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true shouldRunSmokeOnly: true # ignore test failures for runtime-extra-platforms, but not when this # is run as part of a wasm specific pipeline like runtime-wasm @@ -257,7 +257,7 @@ jobs: platforms: - wasi_wasm - wasi_wasm_win - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true # always run for wasm only pipelines alwaysRun: ${{ parameters.isWasmOnlyBuild }} isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }} diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 8ca973341eb907..b63ddaa2d50f44 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -504,7 +504,7 @@ extends: - wasi_wasm - wasi_wasm_win nameSuffix: '_Smoke' - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true shouldContinueOnError: true shouldRunSmokeOnly: true alwaysRun: ${{ variables.isRollingBuild }} From 2fc0e22375d6870ccf1fe0e6526d7a41989252f5 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 23 Feb 2023 22:23:06 +0000 Subject: [PATCH 2/7] Correctly set rid for ilproj on wasi --- Directory.Build.props | 6 +++--- .../System.Runtime/tests/System.Runtime.Tests.csproj | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 155df6caf76e24..7d3052b6942f0f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -223,9 +223,9 @@ <_toolsRID Condition="'$(_toolsRID)' == ''">$(_runtimeOS)-$(_hostArch) - <_toolsRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64 - <_toolsRID Condition="'$(_runtimeOS)' == 'browser' and '$(HostOS)' == 'windows'">win-x64 - <_toolsRID Condition="'$(_runtimeOS)' == 'browser' and '$(HostOS)' == 'osx'">osx-x64 + <_toolsRID Condition="'$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'wasi'">linux-x64 + <_toolsRID Condition="('$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'wasi') and '$(HostOS)' == 'windows'">win-x64 + <_toolsRID Condition="('$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'wasi') and '$(HostOS)' == 'osx'">osx-x64 <_toolsRID Condition="'$(_runtimeOS)' == 'android' or '$(_runtimeOS)' == 'linux-bionic'">linux-x64 diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj index 8be0ce5839a3c8..12f8820bef3775 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj @@ -338,11 +338,11 @@ - + - - + + From 874c994ff595a75210b25bc2d6f7f3e9e17f035a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 24 Feb 2023 06:49:18 +0000 Subject: [PATCH 3/7] Enable assert messages for wasi --- src/mono/mono.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index d6a4a8fbdee567..2ff33c14763b7d 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -55,6 +55,7 @@ false true true + true From 9b48e73b2482abf0f3894dfc56a1200f5c59d47c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 24 Feb 2023 05:29:42 +0000 Subject: [PATCH 4/7] [wasi] Disable `System.Formats.Cbor.Tests.CborWriterTests` - crypto not .. supported. ``` [00:52:00] fail: [FAIL] System.Formats.Cbor.Tests.CborWriterTests.CoseKeyHelpers_ECDsaExportCosePublicKey_HappyPath(expectedHexEncoding: "a501020326200121582065eda5a12577c2bae829437fe33870"..., hexQx: "65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de1"..., hexQy: "1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7"..., hashAlgorithmName: "SHA256", curveFriendlyName: "ECDSA_P256") [00:52:00] info: System.PlatformNotSupportedException : System.Security.Cryptography is not supported on this platform. [00:52:00] info: at System.Security.Cryptography.HashAlgorithmName..ctor(String name) [00:52:00] info: at System.Formats.Cbor.Tests.CborWriterTests.CoseKeyHelpers_ECDsaExportCosePublicKey_HappyPath(String expectedHexEncoding, String hexQx, String hexQy, String hashAlgorithmName, String curveFriendlyName) [00:52:00] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args) [00:52:00] info: at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) ``` --- .../System.Formats.Cbor/tests/Writer/CborWriterTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Cbor/tests/Writer/CborWriterTests.cs b/src/libraries/System.Formats.Cbor/tests/Writer/CborWriterTests.cs index d0eb7f5fb876bb..28faa0ecddc4cd 100644 --- a/src/libraries/System.Formats.Cbor/tests/Writer/CborWriterTests.cs +++ b/src/libraries/System.Formats.Cbor/tests/Writer/CborWriterTests.cs @@ -339,7 +339,7 @@ public static void InvalidConformanceMode_ShouldThrowArgumentOutOfRangeException public static IEnumerable EncodedValueBadInputs => CborReaderTests.InvalidCborValues.Select(x => new[] { x }); [Theory] - [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser | TestPlatforms.Wasi)] [InlineData("a501020326200121582065eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de108de439c08551d2258201e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e9eecd0084d19c", "65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de108de439c08551d", "1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e9eecd0084d19c", From 03a62c98ef2ef37601bf364efadb7bcee4c4480c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 24 Feb 2023 06:52:53 +0000 Subject: [PATCH 5/7] [wasi] Disable crypto tests - https://github.com/dotnet/runtime/issues/37669 --- src/libraries/tests.proj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 4fd91574273a9a..15c1c226ab8878 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -345,6 +345,11 @@ + + + + + @@ -356,9 +361,6 @@ - - - From 603a432093c9511e5d0afb609e96108a89c05f2a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 24 Feb 2023 15:07:36 -0500 Subject: [PATCH 6/7] Revert "[wasi] CI: Enable assert messages on CI" This reverts commit 0b6b28d1678e93630c2786284f1b4a2e7da476a4. --- .../extra-platforms/runtime-extra-platforms-wasm.yml | 4 ++-- eng/pipelines/runtime.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml index a8a25edcc1493b..444c2862bad825 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml @@ -184,7 +184,7 @@ jobs: - wasi_wasm - wasi_wasm_win nameSuffix: '_Smoke' - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true shouldRunSmokeOnly: true # ignore test failures for runtime-extra-platforms, but not when this # is run as part of a wasm specific pipeline like runtime-wasm @@ -257,7 +257,7 @@ jobs: platforms: - wasi_wasm - wasi_wasm_win - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true # always run for wasm only pipelines alwaysRun: ${{ parameters.isWasmOnlyBuild }} isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }} diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index b63ddaa2d50f44..8ca973341eb907 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -504,7 +504,7 @@ extends: - wasi_wasm - wasi_wasm_win nameSuffix: '_Smoke' - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:MonoEnableAssertMessages=true + extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true shouldContinueOnError: true shouldRunSmokeOnly: true alwaysRun: ${{ variables.isRollingBuild }} From 39e18ad1665e2bb081bc353ddd52a7b7be138f05 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 24 Feb 2023 15:11:44 -0500 Subject: [PATCH 7/7] Disable crypto tests for browser too - status quo --- src/libraries/tests.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 15c1c226ab8878..b9896f104b24cc 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -349,7 +349,7 @@ - +