Skip to content

Commit

Permalink
Slightly reduce the Depth3Test that often times out on Linux (#90777)
Browse files Browse the repository at this point in the history
* Slightly reduce the Depth3Test that often times out on Linux

This is one of the regression tests I introduced as part of
implementing protection against infinite generic recursion in
Crossgen2. Turns out that on the relatively slow Helix Linux
VMs the test often times out due to compilation time exceeding
10 minutes. I propose slightly trimming down the test so that
it uses less time in Helix.

Thanks

Tomas

* Remove issues.targets exclusion for the Depth3Test
  • Loading branch information
trylek committed Aug 22, 2023
1 parent c59aef7 commit d7138f3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_82535/Runtime_82535/*">
<Issue>https://github.com/dotnet/runtime/issues/89585</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/readytorun/GenericCycleDetection/Depth3Test/*">
<Issue>https://github.com/dotnet/runtime/issues/88586</Issue>
</ExcludeList>
</ItemGroup>

<!-- All Unix targets on all runtimes -->
Expand Down
2 changes: 0 additions & 2 deletions src/tests/readytorun/GenericCycleDetection/Depth3Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ public static long TypeNestedFactorial(int count)
if (result < count) result = Depth1<Depth2<T>>.TypeNestedFactorial(count - 1);
if (result < count) result = Depth1<Depth3<T>>.TypeNestedFactorial(count - 1);
if (result < count) result = Depth1<Depth4<T>>.TypeNestedFactorial(count - 1);
if (result < count) result = Depth1<Depth5<T>>.TypeNestedFactorial(count - 1);
return count * result;
}
}

private struct Depth2<T> {}
private struct Depth3<T> {}
private struct Depth4<T> {}
private struct Depth5<T> {}

[Fact]
public static int DepthTest()
Expand Down

0 comments on commit d7138f3

Please sign in to comment.