Skip to content

Commit 2118a1a

Browse files
richlanderartl93jeffhandleywfurtyurai007
authored
[8.0] Update CI OSes (#115502)
Related: - #115415 - #115501 - #115503 --------- Co-authored-by: Art Leonard <artl93@users.noreply.github.com> Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com> Co-authored-by: yurai007 <dawid_jurek@vp.pl> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
1 parent fde6eef commit 2118a1a

7 files changed

Lines changed: 84 additions & 66 deletions

File tree

eng/pipelines/common/templates/pipeline-with-resources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ extends:
7474

7575
# We use a CentOS Stream 9 image here to test building from source on CentOS Stream 9.
7676
SourceBuild_centos_x64:
77-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
77+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64
7878

7979
# AlmaLinux 8 is a RHEL 8 rebuild, so we use it to test building from source on RHEL 8.
8080
SourceBuild_linux_x64:
81-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build
81+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-9-source-build-amd64
8282

8383
linux_s390x:
8484
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-s390x
@@ -99,7 +99,7 @@ extends:
9999
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc13-amd64
100100

101101
linux_x64_llvmaot:
102-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
102+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64
103103

104104
browser_wasm:
105105
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-webassembly-amd64

eng/pipelines/coreclr/templates/helix-queues-setup.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
# Browser wasm
5454
- ${{ if eq(parameters.platform, 'browser_wasm') }}:
55-
- (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
55+
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
5656

5757
# iOS devices
5858
- ${{ if in(parameters.platform, 'ios_arm64') }}:
@@ -65,44 +65,44 @@ jobs:
6565
# Linux arm
6666
- ${{ if eq(parameters.platform, 'linux_arm') }}:
6767
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
68-
- (Ubuntu.2204.Arm32.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm32v7
68+
- (Ubuntu.2204.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm32v7
6969
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
70-
- (Ubuntu.2204.Arm32)Ubuntu.2204.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm32v7
70+
- (Ubuntu.2204.Arm32)AzureLinux.3.Arm64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm32v7
7171

7272
# Linux arm64
7373
- ${{ if eq(parameters.platform, 'linux_arm64') }}:
7474
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
75-
- (Ubuntu.2204.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
75+
- (Ubuntu.2204.Arm64.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
7676
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
77-
- (Ubuntu.2204.Arm64)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
77+
- (Ubuntu.2204.Arm64)AzureLinux.3.Arm64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
7878

7979
# Linux musl x64
8080
- ${{ if eq(parameters.platform, 'linux_musl_x64') }}:
8181
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
82-
- (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64
82+
- (Alpine.323.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-amd64
8383
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
84-
- (Alpine.321.Amd64)Ubuntu.2204.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64
84+
- (Alpine.323.Amd64)AzureLinux.3.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-amd64
8585

8686
# Linux musl arm32
8787
- ${{ if eq(parameters.platform, 'linux_musl_arm') }}:
8888
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
89-
- (Alpine.321.Arm32.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-arm32v7
89+
- (Alpine.323.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm32v7
9090
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
91-
- (Alpine.321.Arm32)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-arm32v7
91+
- (Alpine.323.Arm32)AzureLinux.3.Arm64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm32v7
9292

9393
# Linux musl arm64
9494
- ${{ if eq(parameters.platform, 'linux_musl_arm64') }}:
9595
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
96-
- (Alpine.320.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8
96+
- (Alpine.323.Arm64.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm64v8
9797
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
98-
- (Alpine.320.Arm64)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8
98+
- (Alpine.323.Arm64)AzureLinux.3.Arm64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm64v8
9999

100100
# Linux x64
101101
- ${{ if eq(parameters.platform, 'linux_x64') }}:
102102
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
103-
- Ubuntu.2004.Amd64.Open
103+
- AzureLinux.3.Amd64.Open
104104
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
105-
- Ubuntu.2004.Amd64
105+
- AzureLinux.3.Amd64
106106

107107
# OSX arm64
108108
- ${{ if eq(parameters.platform, 'osx_arm64') }}:

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,58 +28,51 @@ jobs:
2828
# Linux arm
2929
- ${{ if eq(parameters.platform, 'linux_arm') }}:
3030
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
31-
- (Debian.12.Arm32.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
32-
33-
# Linux armv6
34-
- ${{ if eq(parameters.platform, 'linux_armv6') }}:
35-
# - ${{ if eq(parameters.jobParameters.isFullMatrix, true) }}:
36-
- (Raspbian.10.Armv6.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:raspbian-10-helix-arm32v6
31+
- (Debian.12.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
3732

3833
# Linux arm64
3934
- ${{ if eq(parameters.platform, 'linux_arm64') }}:
40-
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
41-
- (Ubuntu.2204.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
42-
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
43-
- (Ubuntu.2204.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
44-
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
45-
- (Debian.12.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm64v8
46-
35+
- ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
36+
- (Ubuntu.2204.ArmArch.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
37+
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
38+
- (AzureLinux.3.ArmArch.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-arm64v8
39+
4740
# Linux musl x64
4841
- ${{ if eq(parameters.platform, 'linux_musl_x64') }}:
49-
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
50-
- (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64
51-
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
52-
- (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64
42+
- (Alpine.323.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-amd64
5343

5444
# Linux musl arm64
55-
- ${{ if and(eq(parameters.platform, 'linux_musl_arm64'), or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true))) }}:
56-
- (Alpine.320.Arm64.Open)ubuntu.2204.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8
57-
45+
- ${{ if eq(parameters.platform, 'linux_musl_arm64') }}:
46+
- ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
47+
- (Alpine.323.Arm64.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.23-helix-arm64v8
48+
5849
# Linux x64
5950
- ${{ if eq(parameters.platform, 'linux_x64') }}:
60-
- ${{ if and(eq(parameters.jobParameters.interpreter, ''), ne(parameters.jobParameters.isSingleFile, true)) }}:
61-
- ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
62-
- SLES.15.Amd64.Open
63-
- (Centos.9.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix
64-
- (Fedora.41.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix
65-
- (Ubuntu.2204.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64
66-
- (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
67-
- ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
68-
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
69-
- SLES.15.Amd64.Open
70-
- (Fedora.41.Amd64.Open)Ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix
71-
- Ubuntu.2204.Amd64.Open
72-
- (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
73-
- (Mariner.2.0.Amd64.Open)Ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64
74-
- (AzureLinux.3.0.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-amd64
75-
- (openSUSE.15.6.Amd64.Open)Ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.6-helix-amd64
76-
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
77-
- (Centos.9.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix
78-
- (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
79-
- Ubuntu.2004.Amd64.Open
8051
- ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}:
8152
# Limiting interp runs as we don't need as much coverage.
82-
- (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
53+
- (Debian.12.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
54+
55+
- ${{ else }}:
56+
- ${{ if eq(parameters.jobParameters.runtimeFlavor, 'mono') }}:
57+
# Mono path - test minimal scenario
58+
- (Ubuntu.2204.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64
59+
- ${{ else }}:
60+
# CoreCLR path
61+
- ${{ if and(eq(parameters.jobParameters.isExtraPlatformsBuild, true), ne(parameters.jobParameters.testScope, 'outerloop'))}}:
62+
# extra-platforms CoreCLR (inner loop only)
63+
- AzureLinux.3.Amd64.Open
64+
- (Debian.12.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
65+
- (Mariner.2.0.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64
66+
67+
- ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}:
68+
# outerloop only CoreCLR
69+
- AzureLinux.3.Amd64.Open
70+
71+
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true))}}:
72+
# inner and outer loop CoreCLR (general set)
73+
- Ubuntu.2204.Amd64.Open
74+
- (AzureLinux.3.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-amd64
75+
- (Centos.10.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-helix-amd64
8376

8477
# OSX arm64
8578
- ${{ if eq(parameters.platform, 'osx_arm64') }}:
@@ -162,15 +155,15 @@ jobs:
162155

163156
# WASI
164157
- ${{ if eq(parameters.platform, 'wasi_wasm') }}:
165-
- (Ubuntu.2004.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-wasm-amd64
158+
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly-amd64
166159

167160
# Browser WebAssembly
168161
- ${{ if eq(parameters.platform, 'browser_wasm') }}:
169-
- (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
162+
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
170163

171164
# Browser WebAssembly Firefox
172165
- ${{ if eq(parameters.platform, 'browser_wasm_firefox') }}:
173-
- (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
166+
- (Ubuntu.2204.Amd64)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly
174167

175168
# Browser WebAssembly windows
176169
- ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}:

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using System.IO;
56
using System.Runtime.InteropServices;
67

@@ -32,6 +33,8 @@ public static partial class PlatformDetection
3233
public static bool IsMonoLinuxArm64 => IsMonoRuntime && IsLinux && IsArm64Process;
3334
public static bool IsNotMonoLinuxArm64 => !IsMonoLinuxArm64;
3435
public static bool IsNotAzureLinux => !IsAzureLinux;
36+
public static bool IsQemuLinux => IsLinux && Environment.GetEnvironmentVariable("DOTNET_RUNNING_UNDER_QEMU") != null;
37+
public static bool IsNotQemuLinux => !IsQemuLinux;
3538

3639
// OSX family
3740
public static bool IsOSXLike => IsOSX || IsiOS || IstvOS || IsMacCatalyst;

src/libraries/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Collections.Generic;
77
using System.Threading;
88
using System.Threading.Tasks;
9-
9+
using Microsoft.DotNet.XUnitExtensions;
1010
using Xunit;
1111

1212
namespace System.Net.Sockets.Tests
@@ -792,14 +792,19 @@ await Task.WhenAll(
792792
}
793793
}
794794

795-
[Theory]
795+
[ConditionalTheory]
796796
[PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix
797797
[InlineData(0)]
798798
[InlineData(1)]
799799
public void Connect_ConnectTwice_NotSupported(int invalidatingAction)
800800
{
801801
using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
802802
{
803+
if (PlatformDetection.IsQemuLinux && invalidatingAction == 1)
804+
{
805+
throw new SkipTestException("Skip on Qemu due to [ActiveIssue(https://github.com/dotnet/runtime/issues/104542)]");
806+
}
807+
803808
switch (invalidatingAction)
804809
{
805810
case 0:
@@ -823,7 +828,7 @@ public void Connect_ConnectTwice_NotSupported(int invalidatingAction)
823828
}
824829
}
825830

826-
[Theory]
831+
[ConditionalTheory]
827832
[PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix
828833
[InlineData(0)]
829834
[InlineData(1)]
@@ -833,6 +838,11 @@ public void ConnectAsync_ConnectTwice_NotSupported(int invalidatingAction)
833838

834839
using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
835840
{
841+
if (PlatformDetection.IsQemuLinux && invalidatingAction == 1)
842+
{
843+
throw new SkipTestException("Skip on Qemu due to [ActiveIssue(https://github.com/dotnet/runtime/issues/104542)]");
844+
}
845+
836846
switch (invalidatingAction)
837847
{
838848
case 0:

src/libraries/System.Net.Sockets/tests/FunctionalTests/KeepAliveTest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Runtime.InteropServices;
5+
using Microsoft.DotNet.XUnitExtensions;
56
using Xunit;
67

78
namespace System.Net.Sockets.Tests
@@ -122,6 +123,7 @@ public void Socket_KeepAlive_Interval_And_Time()
122123
}
123124

124125
[Fact]
126+
[ActiveIssue("https://github.com/dotnet/runtime/issues/104545", typeof(PlatformDetection), nameof(PlatformDetection.IsQemuLinux))]
125127
public void Socket_Get_KeepAlive_Time_AsByteArray_OptionLengthZero_Failure()
126128
{
127129
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
@@ -138,12 +140,17 @@ public void Socket_Get_KeepAlive_Time_AsByteArray_OptionLengthZero_Failure()
138140
}
139141
}
140142

141-
[Theory]
143+
[ConditionalTheory]
142144
[InlineData(null)]
143145
[InlineData(new byte[0])]
144146
[InlineData(new byte[3] { 0, 0, 0 })]
145147
public void Socket_Get_KeepAlive_Time_AsByteArray_BufferNullOrTooSmall_Failure(byte[] buffer)
146148
{
149+
if (PlatformDetection.IsQemuLinux && (buffer == null || buffer.Length == 0))
150+
{
151+
throw new SkipTestException("Skip on Qemu due to [ActiveIssue(https://github.com/dotnet/runtime/issues/104545)]");
152+
}
153+
147154
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
148155
{
149156
if (PlatformDetection.IsWindows)

0 commit comments

Comments
 (0)