Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- wasi_wasm
- wasi_wasm_win
nameSuffix: '_Smoke'
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=false /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
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
Expand Down Expand Up @@ -218,7 +218,8 @@ jobs:
platforms:
- wasi_wasm
- wasi_wasm_win
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=false /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
shouldRunSmokeOnly: true
# always run for wasm only pipelines
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/runtime-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ extends:
isExtraPlatformsBuild: ${{ variables.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ variables.isWasmOnlyBuild }}
isRollingBuild: ${{ variables.isRollingBuild }}
excludeOptional: false
2 changes: 1 addition & 1 deletion eng/testing/tests.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<BuildAOTTestsOn Condition="'$(BuildAOTTestsOn)' == ''">local</BuildAOTTestsOn>
</PropertyGroup>

<PropertyGroup Condition="'$(BuildAOTTestsOn)' == 'local'">
<PropertyGroup Condition="'$(BuildAOTTestsOn)' == 'local' and '$(TargetOS)' != 'wasi'">
<!--
When building for BuildAOTTestsOnHelix=true, the BrowserWasmApp.targets are *not* imported, because
they get instead used by the AOT proxy project on helix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public static bool IsMetadataTokenSupported
public static bool UsesMobileAppleCrypto => IsMacCatalyst || IsiOS || IstvOS;

// Changed to `true` when trimming
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot || IsAppleMobile;
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot || IsAppleMobile || IsWasi;
public static bool IsNotBuiltWithAggressiveTrimming => !IsBuiltWithAggressiveTrimming;
public static bool IsTrimmedWithILLink => IsBuiltWithAggressiveTrimming && !IsNativeAot;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public HPackTest(ITestOutputHelper output) : base(output)

[Theory]
[MemberData(nameof(HeaderEncodingTestData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public async Task HPack_HeaderEncoding(string headerName, string expectedValue, byte[] expectedEncoding)
{
await Http2LoopbackServer.CreateClientAndServerAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public HttpClientHandler_Connect_Test(ITestOutputHelper output) : base(output) {
[InlineData(HttpStatusCode.Created)]
[InlineData(HttpStatusCode.Accepted)]
[InlineData(HttpStatusCode.NoContent)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task ConnectMethod_Success(HttpStatusCode statusCode)
{
await LoopbackServer.CreateServerAsync(async (server, url) =>
Expand Down Expand Up @@ -79,7 +79,7 @@ await server.AcceptConnectionAsync(async connection =>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task ConnectMethod_Fails()
{
await LoopbackServer.CreateServerAsync(async (server, url) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public HttpClientHandlerTest_Http1(ITestOutputHelper output) : base(output) { }

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNodeJS))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/101115", typeof(PlatformDetection), nameof(PlatformDetection.IsFirefox))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public async Task SendAsync_HostHeader_First()
{
// RFC 7230 3.2.2. Field Order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public async Task GetContentAsync_ErrorStatusCode_ExpectedExceptionThrown(bool w

[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "Socket is not supported on Browser")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public async Task GetContentAsync_WhenCannotConnect_ExceptionContainsHostInfo()
{
const string Host = "localhost:1234";
Expand Down Expand Up @@ -766,7 +766,7 @@ public void Dispose_UseAfterDispose_Throws()
[InlineData(false)]
[InlineData(true)]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public void CancelAllPending_AllPendingOperationsCanceled(bool withInfiniteTimeout)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
Expand All @@ -785,7 +785,7 @@ public void CancelAllPending_AllPendingOperationsCanceled(bool withInfiniteTimeo
[InlineData(HttpCompletionOption.ResponseContentRead)]
[InlineData(HttpCompletionOption.ResponseHeadersRead)]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public void Timeout_TooShort_AllPendingOperationsCanceled(HttpCompletionOption completionOption)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
Expand Down Expand Up @@ -823,7 +823,7 @@ public async Task Timeout_CallerCanceledTokenAfterTimeout_TimeoutIsNotDetected(H
[InlineData(HttpCompletionOption.ResponseContentRead)]
[InlineData(HttpCompletionOption.ResponseHeadersRead)]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public void Timeout_CallerCanceledTokenBeforeTimeout_TimeoutIsNotDetected(HttpCompletionOption completionOption)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
Expand Down Expand Up @@ -1663,7 +1663,7 @@ public HttpResponseMessage PublicSend(HttpRequestMessage request, CancellationTo

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[SkipOnPlatform(TestPlatforms.Android, "The Send method is not implemented on mobile platforms")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public void Send_NullRequest_ThrowsException()
{
using var client = new CustomHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static IEnumerable<object[]> KeyComponents()
}

[Theory, MemberData(nameof(KeyComponents))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi))]
public void Equals_DifferentParameters_ReturnsTrueIfAllEqual(string kindString, string host, int port, string sslHostName, Uri proxyUri, string identity, bool expected)
{
Type connectionKindType = Type.GetType("System.Net.Http.HttpConnectionKind, System.Net.Http");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ await LoopbackServer.CreateClientAndServerAsync(
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task LoadIntoBufferAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts()
{
await LoopbackServer.CreateClientAndServerAsync(
Expand Down Expand Up @@ -821,7 +821,7 @@ await LoopbackServer.CreateClientAndServerAsync(

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts()
{
await LoopbackServer.CreateClientAndServerAsync(
Expand Down Expand Up @@ -903,7 +903,7 @@ await LoopbackServer.CreateClientAndServerAsync(

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts()
{
await LoopbackServer.CreateClientAndServerAsync(
Expand Down
24 changes: 12 additions & 12 deletions src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public HttpMetricsTest(ITestOutputHelper output) : base(output)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public Task ActiveRequests_Success_Recorded()
{
return LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Expand Down Expand Up @@ -332,7 +332,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNodeJSOrFirefox))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
[InlineData("GET", HttpStatusCode.OK)]
[InlineData("PUT", HttpStatusCode.Created)]
public Task RequestDuration_Success_Recorded(string method, HttpStatusCode statusCode)
Expand Down Expand Up @@ -434,7 +434,7 @@ await RemoteExecutor.Invoke(static testClass =>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public Task RequestDuration_CustomTags_Recorded()
{
return LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Expand All @@ -461,7 +461,7 @@ public Task RequestDuration_CustomTags_Recorded()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public Task RequestDuration_MultipleCallbacksPerRequest_AllCalledInOrder()
{
return LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Expand Down Expand Up @@ -578,7 +578,7 @@ public enum ResponseContentType
}

[Theory]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
[InlineData(HttpCompletionOption.ResponseContentRead, ResponseContentType.Empty)]
[InlineData(HttpCompletionOption.ResponseContentRead, ResponseContentType.ContentLength)]
[InlineData(HttpCompletionOption.ResponseContentRead, ResponseContentType.TransferEncodingChunked)]
Expand Down Expand Up @@ -702,7 +702,7 @@ public Task ActiveRequests_Redirect_RecordedForEachHttpSpan(int credentialsMode)

[Theory]
[PlatformSpecific(~TestPlatforms.Browser)] // BrowserHttpHandler supports only a limited set of methods.
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
[MemberData(nameof(MethodData))]
public async Task RequestMetrics_EmitNormalizedMethodTags(string method, string expectedMethodTag)
{
Expand Down Expand Up @@ -807,7 +807,7 @@ await server.AcceptConnectionAsync(async connection =>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task RequestDuration_RequestCancelled_ErrorReasonIsExceptionType()
{
TaskCompletionSource clientCompleted = new(TaskCreationOptions.RunContinuationsAsynchronously);
Expand Down Expand Up @@ -852,7 +852,7 @@ await server.AcceptConnectionAsync(async connection =>
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task RequestDuration_ConnectionError_LogsExpectedErrorReason()
{
if (UseVersion.Major == 3)
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public HttpMetricsTest_Http11(ITestOutputHelper output) : base(output)
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNodeJSOrFirefox))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task RequestDuration_EnrichmentHandler_ContentLengthError_Recorded()
{
await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Expand Down Expand Up @@ -1058,7 +1058,7 @@ await Assert.ThrowsAsync<HttpRequestException>(async () =>
}

[Theory]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
[InlineData(400)]
[InlineData(404)]
[InlineData(599)]
Expand All @@ -1083,7 +1083,7 @@ public Task RequestDuration_ErrorStatus_ErrorTypeRecorded(int statusCode)

[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "Browser is relaxed about validating HTTP headers")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task RequestDuration_ConnectionClosedWhileReceivingHeaders_Recorded()
{
using CancellationTokenSource cancelServerCts = new CancellationTokenSource();
Expand Down Expand Up @@ -1116,7 +1116,7 @@ await IgnoreExceptions(async () =>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public Task DurationHistograms_HaveBucketSizeHints()
{
return LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ public SocketsHttpHandler_PostScenarioTest(ITestOutputHelper output) : base(outp
[Theory]
[InlineData(false)]
[InlineData(true)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98957", TestPlatforms.Wasi)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", TestPlatforms.Wasi)]
public async Task DisposeTargetStream_ThrowsObjectDisposedException(bool knownLength)
{
var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Net.Mail/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<!-- WASI until https://github.com/dotnet/runtime/issues/98957 -->
<!-- WASI until https://github.com/dotnet/runtime/issues/129223 -->
<UnsupportedOSPlatforms>wasi</UnsupportedOSPlatforms>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3153,6 +3153,7 @@ public static void DCJS_MyPersonSurrogate()
}

[Fact]
[SkipOnPlatform(TestPlatforms.Wasi, "/tmp is not preopened in the wasmtime '--dir .' sandbox, so temp files cannot be created.")]
Comment thread
pavelsavara marked this conversation as resolved.
public static void DCJS_FileStreamSurrogate()
{
using (var testFile = TempFile.Create())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4221,6 +4221,7 @@ public static void DCS_MyPersonSurrogate()
}

[Fact]
[SkipOnPlatform(TestPlatforms.Wasi, "/tmp is not preopened in the wasmtime '--dir .' sandbox, so temp files cannot be created.")]
public static void DCS_FileStreamSurrogate()
{
using (var testFile = TempFile.Create())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static IEnumerable<object[]> NativeDigitTestData()
: new string[] { "\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9" }};
}

public static bool FullICUPlatform => PlatformDetection.ICUVersion.Major >= 66 && PlatformDetection.IsNotBrowser;
public static bool FullICUPlatform => PlatformDetection.ICUVersion.Major >= 66 && !PlatformDetection.IsWasm;

[ConditionalTheory(typeof(NumberFormatInfoMiscTests), nameof(FullICUPlatform))]
[MemberData(nameof(NativeDigitTestData))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void CreateInstanceT_StructWithPublicDefaultConstructor_InvokesConstructo
Assert.True(Activator.CreateInstance<StructWithPublicDefaultConstructor>().ConstructorInvoked);

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51912", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/129223", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsWasm))]
public void CreateInstanceT_StructWithPrivateDefaultConstructor_ThrowsMissingMethodException() =>
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance<StructWithPrivateDefaultConstructor>());

Expand Down
Loading
Loading