Skip to content

Commit 380cfc9

Browse files
authored
Add linux mariner to rolling builds for libraries tests (#57322)
* Add linux mariner to rolling builds for libraries tests * Adjust ChasChaPoly crypto test for mariner * Disable tests failing on mono
1 parent 44b1cd6 commit 380cfc9

File tree

14 files changed

+27
-0
lines changed

14 files changed

+27
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
- (Fedora.34.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210728124700-4f64125
7373
- (Ubuntu.1910.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.10-helix-amd64-cfcfd50-20191030180623
7474
- (Debian.10.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-bfcd90a-20200121150006
75+
- (Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
7576
- ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}:
7677
- (Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
7778
- RedHat.7.Amd64.Open

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public static partial class PlatformDetection
2828
public static bool IsUbuntu1710OrHigher => IsDistroAndVersionOrHigher("ubuntu", 17, 10);
2929
public static bool IsUbuntu1804 => IsDistroAndVersion("ubuntu", 18, 04);
3030
public static bool IsUbuntu1810OrHigher => IsDistroAndVersionOrHigher("ubuntu", 18, 10);
31+
public static bool IsMariner => IsDistroAndVersion("mariner");
3132
public static bool IsSLES => IsDistroAndVersion("sles");
3233
public static bool IsTizen => IsDistroAndVersion("tizen");
3334
public static bool IsFedora => IsDistroAndVersion("fedora");

src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ namespace System.Net.Tests
2424
{
2525
using Configuration = System.Net.Test.Common.Configuration;
2626

27+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
2728
public sealed class HttpWebRequestTest_Async : HttpWebRequestTest
2829
{
2930
public HttpWebRequestTest_Async(ITestOutputHelper output) : base(output) { }
3031
protected override Task<WebResponse> GetResponseAsync(HttpWebRequest request) => request.GetResponseAsync();
3132
}
3233

34+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
3335
public sealed class HttpWebRequestTest_Sync : HttpWebRequestTest
3436
{
3537
public HttpWebRequestTest_Sync(ITestOutputHelper output) : base(output) { }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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 Xunit;
56

67
[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
8+
[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
79
[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]

src/libraries/System.Security.Cryptography.Algorithms/tests/ChaCha20Poly1305Tests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ public static void CheckIsSupported()
453453
// Android with API Level 28 is the minimum API Level support for ChaChaPoly1305.
454454
expectedIsSupported = OperatingSystem.IsAndroidVersionAtLeast(28);
455455
}
456+
else if (PlatformDetection.IsMariner)
457+
{
458+
// OpenSSL is present, and a high enough version,
459+
// but the distro build options turned off ChaCha/Poly.
460+
}
456461
else if (PlatformDetection.OpenSslPresentOnSystem &&
457462
(PlatformDetection.IsOSX || PlatformDetection.IsOpenSslSupported))
458463
{
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
5+
using Xunit;
6+
7+
[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]

src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Link="CommonTest\System\Security\Cryptography\ByteUtils.cs" />
99
<Compile Include="$(CommonTestPath)System\Security\Cryptography\PlatformSupport.cs"
1010
Link="CommonTest\System\Security\Cryptography\PlatformSupport.cs" />
11+
<Compile Include="AssemblyInfo.cs" />
1112
<Compile Include="Certificates.cs" />
1213
<Compile Include="CertLoader.cs" />
1314
<Compile Include="CertLoader.Settings.cs" />

src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs

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

88
namespace System.Security.Cryptography.X509Certificates.Tests.CertificateCreation
99
{
10+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
1011
public static class CertificateRequestChainTests
1112
{
1213
public static bool PlatformSupportsPss { get; } = DetectPssSupport();

src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs

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

1212
namespace System.Security.Cryptography.X509Certificates.Tests
1313
{
14+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
1415
public static class ChainTests
1516
{
1617
private static bool TrustsMicrosoftDotComRoot

src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ public static void X509CertificateCollectionCopyTo()
884884
}
885885

886886
[Fact]
887+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
887888
public static void X509ChainElementCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeException()
888889
{
889890
using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes))
@@ -1293,6 +1294,7 @@ public static void X509Certificate2CollectionGetHashCode()
12931294
}
12941295

12951296
[Fact]
1297+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
12961298
public static void X509ChainElementCollection_IndexerVsEnumerator()
12971299
{
12981300
using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes))

src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs

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

1111
namespace System.Security.Cryptography.X509Certificates.Tests
1212
{
13+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
1314
public static class DynamicChainTests
1415
{
1516
private static X509Extension BasicConstraintsCA => new X509BasicConstraintsExtension(

src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public static void FindByValidThumbprint_ValidOnly(bool validOnly)
231231
}
232232

233233
[Fact]
234+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
234235
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "Root certificate store is not accessible")]
235236
public static void FindByValidThumbprint_RootCert()
236237
{

src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs

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

99
namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests
1010
{
11+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
1112
[SkipOnPlatform(TestPlatforms.Android, "Android does not support AIA fetching")]
1213
public static class AiaTests
1314
{

src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ public static void OpenMachineRootStore_Permissions(OpenFlags permissions, bool
428428
}
429429

430430
[Fact]
431+
[ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
431432
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "Root certificate store is not accessible")]
432433
public static void MachineRootStore_NonEmpty()
433434
{

0 commit comments

Comments
 (0)