Skip to content

Commit 903321a

Browse files
authored
[HTTP/SSL] Fix stress (#93135)
* Fix stress docker images and ignore file * Fix msquic build to use openssl3 * Fix SSL stress version * SSL stress fixes
1 parent 4001e07 commit 903321a

File tree

11 files changed

+21
-23
lines changed

11 files changed

+21
-23
lines changed

.dockerignore

-3
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,3 @@
332332

333333
# performance testing sandbox
334334
**/sandbox
335-
336-
#IL linker for testing
337-
**/linker

eng/docker/libraries-sdk.linux.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Builds and copies library artifacts into target dotnet sdk image
22
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
3-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
3+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0
44

55
FROM $BUILD_BASE_IMAGE as corefxbuild
66

@@ -12,7 +12,7 @@ RUN ./build.sh clr+libs -runtimeconfiguration Release -configuration $CONFIGURAT
1212

1313
FROM $SDK_BASE_IMAGE as target
1414

15-
ARG VERSION=8.0
15+
ARG VERSION=9.0
1616
ARG CONFIGURATION=Release
1717
ENV _DOTNET_INSTALL_CHANNEL="$VERSION.1xx"
1818

eng/docker/libraries-sdk.windows.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# escape=`
22
# Simple Dockerfile which copies clr and library build artifacts into target dotnet sdk image
3-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-nanoserver-ltsc2022
3+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
44
FROM $SDK_BASE_IMAGE as target
55

66
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
77

8-
ARG VERSION=8.0
8+
ARG VERSION=9.0
99
ENV _DOTNET_INSTALL_CHANNEL="$VERSION.1xx"
1010
ARG CONFIGURATION=Release
1111

src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
1+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0
22
FROM $SDK_BASE_IMAGE
33

44
# Build latest msquic locally
@@ -10,7 +10,7 @@ RUN apt-get update -y && \
1010
RUN git clone --recursive https://github.com/dotnet/msquic
1111
RUN cd msquic/src/msquic && \
1212
mkdir build && \
13-
cmake -B build -DCMAKE_BUILD_TYPE=Release -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off && \
13+
cmake -B build -DCMAKE_BUILD_TYPE=Release -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off -DQUIC_TLS=openssl3 && \
1414
cd build && \
1515
cmake --build . --config Release
1616
RUN cd msquic/src/msquic/build/bin/Release && \
@@ -20,7 +20,7 @@ RUN cd msquic/src/msquic/build/bin/Release && \
2020
$( ls ./* | cut -d "/" -f 2 | sed -r "s/(.*)/\1=\/usr\/lib\/\1/g" ) && \
2121
dpkg -i libmsquic_*.deb
2222

23-
ARG VERSION=8.0
23+
ARG VERSION=9.0
2424
ARG CONFIGURATION=Release
2525

2626
# Build the stress server

src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ private static async Task<ExitCode> Run(Configuration config)
162162

163163
string GetAssemblyInfo(Assembly assembly) => $"{assembly.Location}, modified {new FileInfo(assembly.Location).LastWriteTime}";
164164

165-
Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic");
166-
string msQuicLibraryVersion = (string)msQuicApiType.GetProperty("MsQuicLibraryVersion", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty<object?>());
165+
Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic")!;
166+
string msQuicLibraryVersion = (string)msQuicApiType.GetProperty("MsQuicLibraryVersion", BindingFlags.NonPublic | BindingFlags.Static)!.GetGetMethod(true)!.Invoke(null, Array.Empty<object?>())!;
167167

168168
Console.WriteLine(" .NET Core: " + GetAssemblyInfo(typeof(object).Assembly));
169169
Console.WriteLine(" ASP.NET Core: " + GetAssemblyInfo(typeof(WebHost).Assembly));
@@ -192,8 +192,8 @@ private static async Task<ExitCode> Run(Configuration config)
192192
{
193193
// If the system gets overloaded, MsQuic has a tendency to drop incoming connections, see https://github.com/dotnet/runtime/issues/55979.
194194
// So in case we're running H/3 stress test, we're using the same hack as for System.Net.Quic tests, which increases the time limit for pending operations in MsQuic thread pool.
195-
object msQuicApiInstance = msQuicApiType.GetProperty("Api", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty<object?>());
196-
QUIC_API_TABLE* apiTable = (QUIC_API_TABLE*)(Pointer.Unbox(msQuicApiType.GetProperty("ApiTable").GetGetMethod().Invoke(msQuicApiInstance, Array.Empty<object?>())));
195+
object msQuicApiInstance = msQuicApiType.GetProperty("Api", BindingFlags.NonPublic | BindingFlags.Static)!.GetGetMethod(true)!.Invoke(null, Array.Empty<object?>())!;
196+
QUIC_API_TABLE* apiTable = (QUIC_API_TABLE*)(Pointer.Unbox(msQuicApiType.GetProperty("ApiTable")!.GetGetMethod()!.Invoke(msQuicApiInstance, Array.Empty<object?>())!));
197197
QUIC_SETTINGS settings = default(QUIC_SETTINGS);
198198
settings.IsSet.MaxWorkerQueueDelayUs = 1;
199199
settings.MaxWorkerQueueDelayUs = 2_500_000u; // 2.5s, 10x the default

src/libraries/System.Net.Http/tests/StressTests/HttpStress/windows.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# escape=`
2-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-nanoserver-ltsc2022
2+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
33
FROM $SDK_BASE_IMAGE
44

55
# Use powershell as the default shell
@@ -8,7 +8,7 @@ SHELL ["pwsh", "-Command"]
88
WORKDIR /app
99
COPY . .
1010

11-
ARG VERSION=8.0
11+
ARG VERSION=9.0
1212
ARG CONFIGURATION=Release
1313

1414
RUN dotnet build -c $env:CONFIGURATION `

src/libraries/System.Net.Security/tests/StressTests/SslStress/Build-Local.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# In SslStress it's a thin utility to generate a runscript for running the app with the live-built testhost.
88
# The main reason to use an equivalent solution in SslStress is consistency with HttpStress.
99

10-
$Version="8.0"
10+
$Version="9.0"
1111
$RepoRoot="$(git rev-parse --show-toplevel)"
1212
$DailyDotnetRoot= "./.dotnet-daily"
1313

src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
Define this here because the SDK resets it
77
unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
88
-->
9-
<NETCoreAppMaximumVersion>8.0</NETCoreAppMaximumVersion>
9+
<NETCoreAppMaximumVersion>9.0</NETCoreAppMaximumVersion>
1010
</PropertyGroup>
1111
</Project>

src/libraries/System.Net.Security/tests/StressTests/SslStress/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
1+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0
22
FROM $SDK_BASE_IMAGE
33

44
WORKDIR /app
55
COPY . .
66
WORKDIR /app/System.Net.Security/tests/StressTests/SslStress
77

8-
ARG VERSION=8.0
8+
ARG VERSION=9.0
99
ARG CONFIGURATION=Release
1010

1111
RUN dotnet build -c $CONFIGURATION \

src/libraries/System.Net.Security/tests/StressTests/SslStress/build-local.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
# In SslStress it's a thin utility to generate a runscript for running the app with the live-built testhost.
99
# The main reason to use an equivalent solution in SslStress is consistency with HttpStress.
1010

11-
version=8.0
11+
version=9.0
1212
repo_root=$(git rev-parse --show-toplevel)
13+
daily_dotnet_root=./.dotnet-daily
1314

1415
stress_configuration="Release"
1516
if [ "$1" != "" ]; then

src/libraries/System.Net.Security/tests/StressTests/SslStress/windows.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# escape=`
2-
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-nanoserver-1809
2+
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
33
FROM $SDK_BASE_IMAGE
44

55
# Use powershell as the default shell
@@ -9,7 +9,7 @@ WORKDIR /app
99
COPY . .
1010
WORKDIR /app/System.Net.Security/tests/StressTests/SslStress
1111

12-
ARG VERSION=8.0
12+
ARG VERSION=9.0
1313
ARG CONFIGURATION=Release
1414

1515
RUN dotnet build -c $env:CONFIGURATION `

0 commit comments

Comments
 (0)