Skip to content

Instrumentation for OpenSSL timeouts #114252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
15 changes: 15 additions & 0 deletions src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
using System.Linq;
using System.Net.Security;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Authentication;
using System.Security.Claims;
@@ -25,6 +26,20 @@ namespace System.Net.Quic.Tests
{
using Configuration = System.Net.Test.Common.Configuration;

class AbortBeforeTimeout
{
[ModuleInitializer]
public static void Initialize()
{
if (OperatingSystem.IsBrowser())
return;

Thread t = new Thread(() => { Thread.Sleep(10 * 60 * 1000); Environment.FailFast("Early Timeout"); });
t.IsBackground = true;
t.Start();
}
}

public class CertificateSetup : IDisposable
{
public readonly X509Certificate2 serverCert;
16 changes: 16 additions & 0 deletions src/libraries/System.Net.Requests/tests/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.CompilerServices;
using System.Threading;
using Xunit;

[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Requests is not supported on Browser.")]

class AbortBeforeTimeout
{
[ModuleInitializer]
public static void Initialize()
{
if (OperatingSystem.IsBrowser())
return;

Thread t = new Thread(() => { Thread.Sleep(10 * 60 * 1000); Environment.FailFast("Early Timeout"); });
t.IsBackground = true;
t.Start();
}
}
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.CompilerServices;
using System.Threading;
using Xunit;

[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]

class AbortBeforeTimeout
{
[ModuleInitializer]
public static void Initialize()
{
if (OperatingSystem.IsBrowser())
return;

Thread t = new Thread(() => { Thread.Sleep(10 * 60 * 1000); Environment.FailFast("Early Timeout"); });
t.IsBackground = true;
t.Start();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.CompilerServices;
using System.Threading;
using Xunit;

[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]
[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]

class AbortBeforeTimeout
{
[ModuleInitializer]
public static void Initialize()
{
if (OperatingSystem.IsBrowser())
return;

Thread t = new Thread(() => { Thread.Sleep(10 * 60 * 1000); Environment.FailFast("Early Timeout"); });
t.IsBackground = true;
t.Start();
}
}
16 changes: 16 additions & 0 deletions src/libraries/System.Net.WebSockets.Client/tests/AbortTest.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Test.Common;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;

using Xunit;
using Xunit.Abstractions;

class AbortBeforeTimeout
{
[ModuleInitializer]
public static void Initialize()
{
if (OperatingSystem.IsBrowser())
return;

Thread t = new Thread(() => { Thread.Sleep(10 * 60 * 1000); Environment.FailFast("Early Timeout"); });
t.IsBackground = true;
t.Start();
}
}

namespace System.Net.WebSockets.Client.Tests
{
public sealed class InvokerAbortTest : AbortTest

Unchanged files with check annotations Beta

<Copy SourceFiles="@(_IcuArtifacts)" DestinationFolder="$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'native', '$(_BuildNativeOutConfig)'))" SkipUnchangedFiles="true" />
<Message Text="$(MSBuildThisFileDirectory)build-native.sh $(_BuildNativeUnixArgs)" Importance="High"/>
<Exec Command="&quot;$(MSBuildThisFileDirectory)build-native.sh&quot; $(_BuildNativeUnixArgs)" EnvironmentVariables="$(_BuildNativeEnvironmentVariables)" />

Check failure on line 74 in src/native/libs/build-native.proj

Azure Pipelines / runtime (Build maccatalyst-x64 Release AllSubsets_Mono)

src/native/libs/build-native.proj#L74

src/native/libs/build-native.proj(74,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/Users/runner/work/1/s/src/native/libs/build-native.sh" x64 Release outconfig net10.0-maccatalyst-Release-x64 -os maccatalyst -numproc 4 " exited with code 2.

Check failure on line 74 in src/native/libs/build-native.proj

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/native/libs/build-native.proj#L74

src/native/libs/build-native.proj(74,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/Users/runner/work/1/s/src/native/libs/build-native.sh" arm64 Release outconfig net10.0-osx-Release-arm64 -os osx -numproc 4 -cross " exited with code 2.
</Target>
<!--