Skip to content

Commit e57a1dc

Browse files
committed
[wasi] Fix up System.Text.Encoding tests on WASI
- Root Castle/Moq for trimmed builds with the shared Castle descriptor. - Quarantine TranscodingStream APM tests (dotnet#134955) and skip the blocking AsyncComms test. - Quarantine the ASCII FromUtf16 test that needs cryptography (dotnet#99126). Co-authored-by: Copilot App <[email protected]>
1 parent a922bb8 commit e57a1dc

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/libraries/System.Runtime/tests/System.Text.Encoding.Tests/Ascii/FromUtf16Tests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public static void AllAsciiInput()
5454
}
5555

5656
[Fact]
57+
[ActiveIssue("https://github.com/dotnet/runtime/issues/99126", TestPlatforms.Wasi)]
5758
public static void SomeNonAsciiInput()
5859
{
5960
using BoundedMemory<char> utf16Mem = BoundedMemory.Allocate<char>(256);

‎src/libraries/System.Runtime/tests/System.Text.Encoding.Tests/Encoding/TranscodingStreamTests.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ void RunOneTestIteration(int stringLength)
399399

400400
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
401401
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
402+
[ActiveIssue("https://github.com/dotnet/runtime/issues/134955", TestPlatforms.Wasi)]
402403
public Task ReadApm()
403404
{
404405
// Tests TranscodingStream.BeginRead / EndRead
@@ -480,6 +481,7 @@ await RunReadTestAsync(async (transcodingStream, cancellationToken, sink) =>
480481
}
481482

482483
[Fact]
484+
[SkipOnPlatform(TestPlatforms.Wasi, "AsyncComms feeds the pipe from a worker that blocks, which needs a second thread.")]
483485
public async Task ReadAsync_LoopsWhenPartialDataReceived()
484486
{
485487
// Validates that the TranscodingStream will loop instead of returning 0
@@ -895,6 +897,7 @@ public void WriteAsync_WithInvalidArgs_Throws()
895897
// Moq heavily utilizes RefEmit, which does not work on most aot workloads
896898
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
897899
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
900+
[ActiveIssue("https://github.com/dotnet/runtime/issues/134955", TestPlatforms.Wasi)]
898901
public void WriteApm()
899902
{
900903
// Arrange

‎src/libraries/System.Runtime/tests/System.Text.Encoding.Tests/System.Text.Encoding.Tests.csproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797

9898
<ItemGroup>
9999
<PackageReference Include="Moq" Version="$(MoqVersion)" />
100+
<TrimmerRootDescriptor Include="$(ILLinkDescriptorsPath)ILLink.Descriptors.Castle.xml" />
100101
</ItemGroup>
101102

102103
<ItemGroup>

0 commit comments

Comments
 (0)