Skip to content

[NRBF] skip the most time-consuming test case for non-Release builds to avoid timeouts for checked builds - #110550

Merged
jkotas merged 5 commits into
dotnet:mainfrom
adamsitnik:nrbfTimeouts
Dec 12, 2024
Merged

[NRBF] skip the most time-consuming test case for non-Release builds to avoid timeouts for checked builds#110550
jkotas merged 5 commits into
dotnet:mainfrom
adamsitnik:nrbfTimeouts

Conversation

@adamsitnik

@adamsitnikadamsitnik commented Dec 9, 2024

Copy link
Copy Markdown
Member

I was not able to reproduce a timeout, but I was able to notice that it takes a LOT of time to run (more than 10 minutes on a really beefy PC). I've attached a profiler and found the test case which was executing the worst case scenario (non-seekable stream from which we read 512k bytes one by one).

The command I've used after building the repo:

cmd.exe /C start /affinity F "D:\projects\runtime\artifacts\bin\testhost\net10.0-windows-Debug-x86\dotnet.exe" exec --runtimeconfig System.Formats.Nrbf.Tests.runtimeconfig.json --depsfile System.Formats.Nrbf.Tests.deps.json C:\Users\adsitnik\.nuget\packages\microsoft.dotnet.xunitconsolerunner\2.9.2-beta.24605.1\build\..\tools\net\xunit.console.dll System.Formats.Nrbf.Tests.dll -xml testResults.xml -nologo -notrait category=OuterLoop -notrait category=failing
 Discovering: System.Formats.Nrbf.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Formats.Nrbf.Tests (found 150 test cases)
Starting: System.Formats.Nrbf.Tests (parallel test collections = on [4 threads], stop on fail = off)
System.Formats.Nrbf.Tests.EdgeCaseTests.CanReadArrayOfAnySize [SKIP]
Condition(s) not met: "Is64BitProcess"

fixes#110285

public static IEnumerable<object[]> GetCanReadArrayOfAnySizeArgs()
{
foreach (int size in new[] { 1, 127, 128, 512_001, 512_001 })
foreach (int size in new[] { 1, 127, 128, 512_001 })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 512_001 particularly interesting value to test for some reason?

Would it be simpler to just change 512_001 to something smaller, like 20_001?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing in particular, I am going to apply your suggestion.

@jkotasjkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas
jkotas merged commit c646425 into dotnet:mainDec 12, 2024
hez2010 pushed a commit to hez2010/runtime that referenced this pull request Dec 14, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jan 11, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Formats.Nrbf.Tests timeouts

2 participants

@adamsitnik@jkotas