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

[mono] Tests failed on windows: System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStream/FileStreamUnix #34493

Closed
MaximLipnin opened this issue Apr 3, 2020 · 5 comments
Labels

Comments

@MaximLipnin
Copy link
Contributor

System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStream and System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStreamUnix are disabled in Mono's CoreFX.issues_windows.rsp file and after enabling they still fail locally with the following output:

System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStream [FAIL]
System.PlatformNotSupportedException : This API is specific to the way in which Windows handles asynchronous I/O, and is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs(25,0): at System.Threading.ThreadPoolBoundHandle.BindHandle(SafeHandle handle)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.Windows.cs(92,0): at System.IO.FileStream.Init(FileMode mode, FileShare share, String originalPath)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs(253,0): at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs(183,0): at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
    _\src\libraries\System.Reflection.Metadata\tests\Utilities\AbstractMemoryBlockTests.cs(152,0): at System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStream()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(360,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStreamUnix [FAIL]
System.PlatformNotSupportedException : This API is specific to the way in which Windows handles asynchronous I/O, and is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs(25,0): at System.Threading.ThreadPoolBoundHandle.BindHandle(SafeHandle handle)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.Windows.cs(92,0): at System.IO.FileStream.Init(FileMode mode, FileShare share, String originalPath)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs(253,0): at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
    _\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs(183,0): at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
    _\src\libraries\System.Reflection.Metadata\tests\Utilities\AbstractMemoryBlockTests.cs(152,0): at System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStream()
    _\src\libraries\System.Reflection.Metadata\tests\Utilities\AbstractMemoryBlockTests.cs(128,0): at System.Reflection.Internal.Tests.AbstractMemoryBlockTests.FileStreamUnix()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(360,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

These tests will be marked with ActiveIssue in #32592.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.IO untriaged New issue has not been triaged by the area owner labels Apr 3, 2020
@ghost
Copy link

ghost commented Apr 3, 2020

Tagging @carlossanlop as an area owner

@carlossanlop
Copy link
Member

@MaximLipnin can you please point me to the right instructions to run this unit test in mono, so I can try to repro the issue?

@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Apr 3, 2020
@MaximLipnin
Copy link
Contributor Author

@carlossanlop There are some instructions, but actually I do the following steps:

  1. in the root folder run build.cmd -subsetcategory mono-libraries -c Release -runtimeconfiguration Release /p:RuntimeFlavor=mono
  2. after build completes, run cd src\libraries\System.Reflection.Metadata\tests
  3. run dotnet build /t:Test /p:RuntimeFlavor=mono /p:Configuration=Release

@danmoseley danmoseley added runtime-mono specific to the Mono runtime os-windows labels Apr 10, 2020
@ericstj
Copy link
Member

ericstj commented Apr 10, 2020

ThreadPoolBoundHandle, see #34582

@danmoseley
Copy link
Member

Let's just track it all with #34582 and if/when fixing that, they can enable tests from linked issues like this.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants