-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Runtime test suite does not always run the same number of tests #76285
Comments
Tagging subscribers to this area: @directhex Issue DetailsDescriptionWhen running the System.Runtime test suite under wasm the number of test cases executed appears to be random each time. This suggests we are not actually running the same set of tests every time on CI and this could lead to intermittent failures and bad coverage. Reproduction Steps
Expected behaviorSame number of tests run every time Actual behaviorNormal output:
Unusual output:
I've personally seen 50000 and 50005 total tests as well. Regression?No response Known WorkaroundsNo response ConfigurationSource build on Debian 10 x86-64 forked off 4e1ef10 Other informationSome other people on the team have also observed this with test counts like 50063. For me it usually is 49999 but I've seen lots of different numbers from run to run. This is probably caused by test order randomization somehow
|
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsDescriptionWhen running the System.Runtime test suite under wasm the number of test cases executed appears to be random each time. This suggests we are not actually running the same set of tests every time on CI and this could lead to intermittent failures and bad coverage. Reproduction Steps
Expected behaviorSame number of tests run every time Actual behaviorNormal output:
Unusual output:
I've personally seen 50000 and 50005 total tests as well. Regression?No response Known WorkaroundsNo response ConfigurationSource build on Debian 10 x86-64 forked off 4e1ef10 Other informationSome other people on the team have also observed this with test counts like 50063. For me it usually is 49999 but I've seen lots of different numbers from run to run. This is probably caused by test order randomization somehow
|
Comparing the results xml, the extra tests are:
|
On the same machine? The tests are fed theory inputs dynamically based on the OS:
The resulting number of tests run could legitimately differ if that theory ended up creating more or less test cases. |
This makes sense as we use |
Don't we deploy tzdb for wasm? |
Yeah. I don't see why that wouldn't be deterministic. We're bundling the timezone data from https://github.com/dotnet/runtime-assets/tree/main/src/System.Runtime.TimeZoneData into the wasm app, it doesn't read from the host. @ilonatommy would you mind checking whether this still reproduces today? |
Yes and it's frequent
|
I took a quick look at some of the files but I'm not convinced they're comparable, e.g. sometimes a test was removed/added because we're building different states of the repo. Another one is running with MonoAOT or agressive trimming and we disable some tests. Can you try running locally on a stable config and see if you can repro there, like in the original issue? |
I believe that when test is disabled, then it should be in
Sure, in 5 runs:
I didn't catch .xml for the 2nd run, I'll update when I'll get the diff of the testResults.
interestingly, additional tests in
e.g. Fixing Cleaning cache fixes it - we always get the same number of zones if we add |
|
The runtime/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs Lines 893 to 897 in aa9e4d3
And the cache is populated on the fly
So that's why. I wonder if public API |
Explanation for the current logic: runtime/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs Lines 2089 to 2095 in aa9e4d3
IIUC to force all time zones to land in cache we would need to know the IDs of these that are missing and because we can have more than one tz file, we cannot predict what IDs these would be. |
but on wasm we do know, we have just known set of TZs. |
Description
When running the System.Runtime test suite under wasm the number of test cases executed appears to be random each time. This suggests we are not actually running the same set of tests every time on CI and this could lead to intermittent failures and bad coverage.
Reproduction Steps
./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
Expected behavior
Same number of tests run every time
Actual behavior
Normal output:
Unusual output:
I've personally seen 50000 and 50005 total tests as well.
Regression?
No response
Known Workarounds
No response
Configuration
Source build on Debian 10 x86-64 forked off 4e1ef10
Other information
Some other people on the team have also observed this with test counts like 50063. For me it usually is 49999 but I've seen lots of different numbers from run to run. This is probably caused by test order randomization somehow
The text was updated successfully, but these errors were encountered: