Skip to content

Commit

Permalink
Skip deeply-recursive test in `System.Runtime.Serialization.Xml.Refle…
Browse files Browse the repository at this point in the history
…ctionOnly.Tests` if doing random OSR (#106335)
  • Loading branch information
amanasifkhalid authored Aug 14, 2024
1 parent 527ab8f commit 6093112
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4477,8 +4477,11 @@ public static void DCS_TypeWithPrimitiveKnownTypes()
Assert.NotNull(actual);
}

// Random OSR might cause a stack overflow on Windows x64
private static bool IsNotWindowsRandomOSR => !PlatformDetection.IsWindows || (Environment.GetEnvironmentVariable("DOTNET_JitRandomOnStackReplacement") == null);

[SkipOnPlatform(TestPlatforms.Browser, "Causes a stack overflow")]
[Fact]
[ConditionalFact(nameof(IsNotWindowsRandomOSR))]
public static void DCS_DeeplyLinkedData()
{
TypeWithLinkedProperty head = new TypeWithLinkedProperty();
Expand Down

0 comments on commit 6093112

Please sign in to comment.