Skip to content

Commit e08f350

Browse files
Copilotrichlandertarekgh
authored
[release/10.0] Update OpenSUSE container references to 16.0 and add test compatibility fixes (#122373)
main PR #122371 # Description Updates OpenSUSE container version from 15.6 to 16.0 in Helix pipeline configuration for Linux x64 CoreCLR extra-platforms testing, and includes necessary test fixes to ensure compatibility with OpenSUSE 16.0. **Infrastructure Changes:** - **`eng/pipelines/libraries/helix-queues-setup.yml`**: Updated queue name and container image from `openSUSE.15.6` to `openSUSE.16.0` **Test Compatibility Fixes (backported from main PR #122371):** 1. **Platform Detection**: Added `IsOpenSUSE16` property to `PlatformDetection.Unix.cs` to detect OpenSUSE 16.0 and OpenSUSE Leap 16.0 2. **Networking Tests**: Added `ActiveIssue` attribute to skip `Package_Unsupported_NTLM` test on OpenSUSE 16, which ships with broken gss-ntlmssp 1.2 (similar to Ubuntu 24 and 26) 3. **Globalization Tests**: - Added Unicode 17.0 IDNA test data and test infrastructure for ICU 78+ compatibility - Updated test data factory to use appropriate Unicode version based on ICU version **Note:** Japanese calendar changes were intentionally excluded from this PR as they constitute a breaking change that requires servicing approval. The existing test fix from commit ff082da is sufficient for OpenSUSE 16.0 compatibility. # Customer Impact None. Infrastructure-only change for CI/CD pipeline testing with test compatibility fixes to ensure test suite passes on the new platform. # Regression No. This is a container version update to align with current OpenSUSE releases, with corresponding test fixes to handle platform-specific behavior differences. # Testing CI/CD pipeline validation through runtime-extra-platforms workflow. Test fixes ensure that the existing test suite works correctly on OpenSUSE 16.0 by: - Skipping tests that fail due to known platform limitations - Updating test data to match newer ICU versions # Risk Low. Changes include: 1. Single line container version reference update in pipeline configuration 2. Platform-specific test skips and data updates that don't affect runtime behavior 3. All changes are test-only fixes that ensure compatibility without modifying production code 4. Japanese calendar breaking changes were reverted to maintain servicing policy compliance # Package authoring no longer needed in .NET 9 IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. Keep in mind that we still need package authoring in .NET 8 and older versions. <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > Please update opensuse container references to 16.0, such as in this file https://github.com/dotnet/runtime/blob/release/10.0/eng/pipelines/libraries/helix-queues-setup.yml </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: richlander <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]>
1 parent f8d2bbf commit e08f350

File tree

11 files changed

+6624
-6
lines changed

11 files changed

+6624
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
# extra-platforms CoreCLR (inner loop only)
6464
- (Debian.13.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-13-helix-amd64
6565
- (Fedora.43.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:fedora-43-helix-amd64
66-
- (openSUSE.15.6.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:opensuse-15.6-helix-amd64
66+
- (openSUSE.16.0.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:opensuse-16.0-helix-amd64
6767
- (Ubuntu.2604.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-26.04-helix-amd64
6868

6969
- ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static partial class PlatformDetection
1717

1818
public static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
1919
public static bool IsOpenSUSE => IsDistroAndVersion("opensuse");
20+
public static bool IsOpenSUSE16 => IsDistroAndVersion("opensuse", 16) || IsDistroAndVersion("opensuse-leap", 16);
2021
public static bool IsUbuntu => IsDistroAndVersion("ubuntu");
2122
public static bool IsUbuntu24 => IsDistroAndVersion("ubuntu", 24);
2223
public static bool IsUbuntu24OrHigher => IsDistroAndVersionOrHigher("ubuntu", 24);

src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public void Package_Supported_NTLM()
8686

8787
[ConditionalFact(nameof(IsNtlmUnavailable))]
8888
[ActiveIssue("https://github.com/dotnet/runtime/issues/111639", typeof(PlatformDetection), nameof(PlatformDetection.IsUbuntu24OrHigher))]
89+
[ActiveIssue("https://github.com/dotnet/runtime/issues/111639", typeof(PlatformDetection), nameof(PlatformDetection.IsOpenSUSE16))]
8990
public void Package_Unsupported_NTLM()
9091
{
9192
NegotiateAuthenticationClientOptions clientOptions = new NegotiateAuthenticationClientOptions { Package = "NTLM", Credential = s_testCredentialRight, TargetName = "HTTP/foo" };

src/libraries/System.Runtime/tests/System.Globalization.Calendars.Tests/System/Globalization/CalendarTestBase.cs

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

44
using System.Collections.Generic;
5+
using System.Globalization;
6+
using System.Reflection;
57
using Xunit;
68

79
namespace System.Globalization.Tests
@@ -71,7 +73,24 @@ public enum DataType
7173
Day = 8
7274
}
7375

74-
private static int MinEra(Calendar calendar) => calendar.GetEra(calendar.MinSupportedDateTime);
76+
// ICU have introduced a breaking change regarding the Japanese Meiji era: the start date has been updated from 1868-09-08 to 1868-10-23.
77+
// Additional details are available in the relevant CLDR issue https://unicode-org.atlassian.net/browse/CLDR-11375 and CLDR pull request https://github.com/unicode-org/cldr/pull/4610.
78+
// This means the hardcoded MinSupportedDateTime for JapaneseCalendar (1868-09-08) is no longer valid on ICU and results in various tests failing.
79+
// We have fixed the issue in .NET 11 through the PR https://github.com/dotnet/runtime/pull/122480, we can consider porting the fix to earlier versions if requested by users.
80+
// For now, we are using reflection to get the correct MinSupportedDateTime for JapaneseCalendar on ICU and use that for testing.
81+
private static DateTime JapaneseCalendaraMinSupportedDateTime { get; } = new Func<DateTime>(() =>
82+
{
83+
JapaneseCalendar calendar = new JapaneseCalendar();
84+
object[] eraInfo = (object[])calendar.GetType().GetMethod("GetEraInfo", BindingFlags.NonPublic | BindingFlags.Static)!.Invoke(null, null)!;
85+
long minTicks = (long)eraInfo[eraInfo.Length - 1].GetType().GetField("ticks", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(eraInfo[eraInfo.Length - 1])!;
86+
return new DateTime(minTicks);
87+
})();
88+
89+
private static DateTime GetCalendarMinSupportedDateTime(Calendar calendar) =>
90+
PlatformDetection.IsIcuGlobalization && calendar is JapaneseCalendar ? JapaneseCalendaraMinSupportedDateTime : calendar.MinSupportedDateTime;
91+
92+
private static int MinEra(Calendar calendar) => calendar.GetEra(GetCalendarMinSupportedDateTime(calendar));
93+
7594
private static int MaxEra(Calendar calendar) => calendar.GetEra(calendar.MaxSupportedDateTime);
7695

7796
private static int MaxCalendarYearInEra(Calendar calendar, int era)
@@ -132,7 +151,7 @@ private static int MinCalendarYearInEra(Calendar calendar, int era)
132151
Assert.InRange(era, 0, eras[0]);
133152
if (eras.Length == 1 || era == eras[eras.Length - 1] || era == 0)
134153
{
135-
return calendar.GetYear(calendar.MinSupportedDateTime);
154+
return calendar.GetYear(GetCalendarMinSupportedDateTime(calendar));
136155
}
137156
return calendar.GetYear(calendar.ToDateTime(1, 1, 1, 0, 0, 0, 0, era));
138157
}
@@ -386,7 +405,7 @@ public void ToDateTime_Invalid_ThrowsArgumentOutOfRangeException()
386405
Assert.Throws<ArgumentOutOfRangeException>(() => calendar.ToDateTime(calendar.GetYear(calendar.MaxSupportedDateTime), month, day, hour, minute, second, millisecond, MaxEra(calendar) + 1));
387406

388407
// New date is out of range
389-
DateTime minDateTime = calendar.MinSupportedDateTime;
408+
DateTime minDateTime = GetCalendarMinSupportedDateTime(calendar);
390409
int minEra = calendar.GetEra(minDateTime);
391410
int minYear = calendar.GetYear(minDateTime);
392411

src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/Data/Factory.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ private static Stream GetIdnaTestTxt()
2929
// some exception for Windows which released ICU 72.1.0.4 which using Unicode 15.1.
3030

3131
string fileName = null;
32-
if (PlatformDetection.ICUVersion >= new Version(76, 0))
32+
if (PlatformDetection.ICUVersion >= new Version(78, 0))
33+
fileName = "IdnaTest_17.txt";
34+
else if (PlatformDetection.ICUVersion >= new Version(76, 0))
3335
fileName = "IdnaTest_16.txt";
3436
else if (PlatformDetection.ICUVersion >= new Version(72, 1, 0, 4))
3537
fileName = "IdnaTest_15_1.txt";
@@ -70,7 +72,9 @@ private static IEnumerable<IConformanceIdnaTest> ParseFile(Stream stream, Func<s
7072

7173
private static IConformanceIdnaTest GetConformanceIdnaTest(string line, int lineCount)
7274
{
73-
if (PlatformDetection.ICUVersion >= new Version(76, 0))
75+
if (PlatformDetection.ICUVersion >= new Version(78, 0))
76+
return new Unicode_17_0_IdnaTest(line, lineCount);
77+
else if (PlatformDetection.ICUVersion >= new Version(76, 0))
7478
return new Unicode_16_0_IdnaTest(line, lineCount);
7579
else if (PlatformDetection.ICUVersion >= new Version(72, 1, 0, 4))
7680
return new Unicode_15_1_IdnaTest(line, lineCount);

0 commit comments

Comments
 (0)