Skip to content

Commit 4974c12

Browse files
richlandertarekgh
andauthored
Add Ubuntu 24.10 image (#111504)
* Add Ubuntu 24.10 image * Fix TimeZone tests to avoid failures because of deprecated zone names * Update eng/pipelines/libraries/helix-queues-setup.yml Co-authored-by: Rich Lander <[email protected]> * DIsable System.Net.Security failing test --------- Co-authored-by: Tarek Mahmoud Sayed <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]>
1 parent 22c04fc commit 4974c12

File tree

4 files changed

+55
-19
lines changed

4 files changed

+55
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
# Linux arm64
3636
- ${{ if eq(parameters.platform, 'linux_arm64') }}:
37-
- (Ubuntu.2204.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
37+
- (Ubuntu.2410.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-24.10-helix-arm64v8
3838
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
3939
- (Debian.12.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:debian-12-helix-arm64v8
4040

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public static partial class PlatformDetection
1919
public static bool IsOpenSUSE => IsDistroAndVersion("opensuse");
2020
public static bool IsUbuntu => IsDistroAndVersion("ubuntu");
2121
public static bool IsUbuntu2004 => IsDistroAndVersion("ubuntu", 20, 4);
22+
public static bool IsUbuntu24 => IsDistroAndVersion("ubuntu", 24);
2223
public static bool IsDebian => IsDistroAndVersion("debian");
2324
public static bool IsAlpine => IsDistroAndVersion("alpine");
2425
public static bool IsRaspbian10 => IsDistroAndVersion("raspbian", 10);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public void Package_Supported_NTLM()
8585
}
8686

8787
[ConditionalFact(nameof(IsNtlmUnavailable))]
88+
[ActiveIssue("https://github.com/dotnet/runtime/issues/111639", typeof(PlatformDetection), nameof(PlatformDetection.IsUbuntu24))]
8889
public void Package_Unsupported_NTLM()
8990
{
9091
NegotiateAuthenticationClientOptions clientOptions = new NegotiateAuthenticationClientOptions { Package = "NTLM", Credential = s_testCredentialRight, TargetName = "HTTP/foo" };
@@ -274,7 +275,7 @@ public void NtlmSignatureTest()
274275
fakeNtlmServer.Unwrap(output.WrittenSpan, temp);
275276
Assert.Equal(s_Hello, temp);
276277

277-
// Test creating signature on server side and decoding it with VerifySignature on client side
278+
// Test creating signature on server side and decoding it with VerifySignature on client side
278279
byte[] serverSignedMessage = new byte[16 + s_Hello.Length];
279280
fakeNtlmServer.Wrap(s_Hello, serverSignedMessage);
280281
output.Clear();

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,12 +2434,31 @@ public static IEnumerable<object[]> SystemTimeZonesTestData()
24342434
}
24352435
}
24362436

2437+
// In recent Linux distros like Ubuntu 24.04, removed the legacy Time Zone names and not mapping it any more. User can still have a way to install it if they need to.
2438+
// UCT is one of the legacy aliases for UTC which we use here to detect if the legacy names is support at the runtime.
2439+
// https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-tzdata-package-split
2440+
private static bool SupportLegacyTimeZoneNames { get; } = IsSupportedLegacyTimeZones();
2441+
private static bool IsSupportedLegacyTimeZones()
2442+
{
2443+
try
2444+
{
2445+
TimeZoneInfo.FindSystemTimeZoneById("UCT");
2446+
}
2447+
catch (TimeZoneNotFoundException)
2448+
{
2449+
return false;
2450+
}
2451+
2452+
return true;
2453+
}
2454+
24372455
[GeneratedRegex(@"^(?:[A-Z][A-Za-z]+|[+-]\d{2}|[+-]\d{4})$")]
24382456
private static partial Regex IanaAbbreviationRegex { get; }
24392457

24402458
// UTC aliases per https://github.com/unicode-org/cldr/blob/master/common/bcp47/timezone.xml
24412459
// (This list is not likely to change.)
2442-
private static readonly string[] s_UtcAliases = new[] {
2460+
private static readonly string[] s_UtcAliases = SupportLegacyTimeZoneNames ?
2461+
[
24432462
"Etc/UTC",
24442463
"Etc/UCT",
24452464
"Etc/Universal",
@@ -2448,7 +2467,13 @@ public static IEnumerable<object[]> SystemTimeZonesTestData()
24482467
"UTC",
24492468
"Universal",
24502469
"Zulu"
2451-
};
2470+
] : [
2471+
"Etc/UTC",
2472+
"Etc/UCT",
2473+
"Etc/Universal",
2474+
"Etc/Zulu",
2475+
"UTC"
2476+
];
24522477

24532478
// On Android GMT, GMT+0, and GMT-0 are values
24542479
private static readonly string[] s_GMTAliases = new[] {
@@ -2849,22 +2874,31 @@ public static void EnsureUtcObjectSingleton()
28492874
Assert.True(ReferenceEquals(tz, TimeZoneInfo.Utc));
28502875
}
28512876

2877+
public static IEnumerable<object[]> AlternativeName_TestData()
2878+
{
2879+
yield return new object[] { "Pacific Standard Time", "America/Los_Angeles" };
2880+
yield return new object[] { "AUS Eastern Standard Time", "Australia/Sydney" };
2881+
yield return new object[] { "GMT Standard Time", "Europe/London" };
2882+
yield return new object[] { "Tonga Standard Time", "Pacific/Tongatapu" };
2883+
yield return new object[] { "W. Australia Standard Time", "Australia/Perth" };
2884+
yield return new object[] { "E. South America Standard Time", "America/Sao_Paulo" };
2885+
yield return new object[] { "E. Africa Standard Time", "Africa/Nairobi" };
2886+
yield return new object[] { "W. Europe Standard Time", "Europe/Berlin" };
2887+
yield return new object[] { "Russian Standard Time", "Europe/Moscow" };
2888+
yield return new object[] { "Libya Standard Time", "Africa/Tripoli" };
2889+
yield return new object[] { "South Africa Standard Time", "Africa/Johannesburg" };
2890+
yield return new object[] { "Morocco Standard Time", "Africa/Casablanca" };
2891+
yield return new object[] { "Newfoundland Standard Time", "America/St_Johns" };
2892+
yield return new object[] { "Iran Standard Time", "Asia/Tehran" };
2893+
2894+
if (SupportLegacyTimeZoneNames)
2895+
{
2896+
yield return new object[] { "Argentina Standard Time", "America/Argentina/Catamarca" };
2897+
}
2898+
}
2899+
28522900
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
2853-
[InlineData("Pacific Standard Time", "America/Los_Angeles")]
2854-
[InlineData("AUS Eastern Standard Time", "Australia/Sydney")]
2855-
[InlineData("GMT Standard Time", "Europe/London")]
2856-
[InlineData("Tonga Standard Time", "Pacific/Tongatapu")]
2857-
[InlineData("W. Australia Standard Time", "Australia/Perth")]
2858-
[InlineData("E. South America Standard Time", "America/Sao_Paulo")]
2859-
[InlineData("E. Africa Standard Time", "Africa/Nairobi")]
2860-
[InlineData("W. Europe Standard Time", "Europe/Berlin")]
2861-
[InlineData("Russian Standard Time", "Europe/Moscow")]
2862-
[InlineData("Libya Standard Time", "Africa/Tripoli")]
2863-
[InlineData("South Africa Standard Time", "Africa/Johannesburg")]
2864-
[InlineData("Morocco Standard Time", "Africa/Casablanca")]
2865-
[InlineData("Argentina Standard Time", "America/Argentina/Catamarca")]
2866-
[InlineData("Newfoundland Standard Time", "America/St_Johns")]
2867-
[InlineData("Iran Standard Time", "Asia/Tehran")]
2901+
[MemberData(nameof(AlternativeName_TestData))]
28682902
public static void UsingAlternativeTimeZoneIdsTest(string windowsId, string ianaId)
28692903
{
28702904
if (PlatformDetection.ICUVersion.Major >= 52 && !PlatformDetection.IsiOS && !PlatformDetection.IstvOS)

0 commit comments

Comments
 (0)