Skip to content
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

Test failure System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives #62119

Closed
VincentBu opened this issue Nov 29, 2021 · 5 comments · Fixed by #62134
Closed

Test failure System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives #62119

VincentBu opened this issue Nov 29, 2021 · 5 comments · Fixed by #62134
Assignees
Labels
area-System.IO os-windows test-bug Problem in test source code (most likely)

Comments

@VincentBu
Copy link
Contributor

Run: runtime-coreclr libraries-jitstress 20211127.1

Failed test:

net7.0-windows-Release-x86-CoreCLR_checked-jitstress1_tiered-Windows.10.Amd64.Open

- System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives

Error message:

Assert.Contains() Failure
Not found: 'F'
In value:  <GetValidDriveLettersOnMachine>d__15 ['C', 'D', 'E']


Stack trace
   at System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives() in /_/src/libraries/System.IO.FileSystem.DriveInfo/tests/DriveInfo.Windows.Tests.cs:line 66
@VincentBu VincentBu added arch-x86 area-System.IO os-windows JitStress CLR JIT issues involving JIT internal stress modes labels Nov 29, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Nov 29, 2021
@ghost
Copy link

ghost commented Nov 29, 2021

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Run: runtime-coreclr libraries-jitstress 20211127.1

Failed test:

net7.0-windows-Release-x86-CoreCLR_checked-jitstress1_tiered-Windows.10.Amd64.Open

- System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives

Error message:

Assert.Contains() Failure
Not found: 'F'
In value:  <GetValidDriveLettersOnMachine>d__15 ['C', 'D', 'E']


Stack trace
   at System.IO.FileSystem.Tests.DriveInfoWindowsTests.TestGetDrives() in /_/src/libraries/System.IO.FileSystem.DriveInfo/tests/DriveInfo.Windows.Tests.cs:line 66
Author: VincentBu
Assignees: -
Labels:

arch-x86, area-System.IO, os-windows, JitStress

Milestone: -

@danmoseley
Copy link
Member

This test is essentially verifying that this code
https://github.com/danmoseley/runtime/blob/8e143ac4f87a2055b21f7f479a3fd7ce695bc580/src/libraries/System.IO.FileSystem.DriveInfo/tests/DriveInfo.Windows.Tests.cs#L269
does the same thing as this code
https://github.com/danmoseley/runtime/blob/8e143ac4f87a2055b21f7f479a3fd7ce695bc580/src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs#L11

Eyeballing it, it does. So my guesses are either

  1. A drive was concurrently removed/unmapped, possibly by another test running concurrently.
  2. Windows is returning flaky results
  3. JIT stress is doing something.

I'm guessing 1.

@danmoseley
Copy link
Member

danmoseley commented Nov 29, 2021

Looks like this was (re)introduced by #59850

@carlossanlop what is preventing SetVolumeLabel_OnVirtualDrive_Throws and the tests in DriveInfoWindowsTests from running concurrently? if only DriveInfoWindowsTests would be affected, we can simply move this test into that class.

@danmoseley danmoseley removed arch-x86 JitStress CLR JIT issues involving JIT internal stress modes labels Nov 29, 2021
@jkotas jkotas added the test-bug Problem in test source code (most likely) label Nov 29, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 29, 2021
@adamsitnik adamsitnik self-assigned this Nov 29, 2021
@adamsitnik adamsitnik removed the untriaged New issue has not been triaged by the area owner label Nov 29, 2021
@adamsitnik
Copy link
Member

what is preventing SetVolumeLabel_OnVirtualDrive_Throws and the tests in DriveInfoWindowsTests from running concurrently

It's more or less:

test1: gets list of drives
test2: add/remove temp drive
test1: gets list of drives and compares it against list from step 1

I've sent #62134 to disable the parallelization for this test project.

@danmoseley
Copy link
Member

Right it was a rhetorical question 🙂

adamsitnik added a commit that referenced this issue Dec 1, 2021
* don't run the System.IO.FileSystem.DriveInfo in parallel, fixes #62119

* unify disabling test parallelization per assembly
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO os-windows test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants