dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.25k stars 4.73k forks source link

[wasi] mkstemp and mkdtemp not supported by libc #85690

Open radical opened 1 year ago

radical commented 1 year ago

Root cause https://github.com/WebAssembly/wasi-libc/issues/229

Log. System.Runtime.Serialization.Xml.ReflectionOnly.Tests, and System.Runtime.Serialization.Xml.Tests:

[22:09:22] fail: [FAIL] DataContractSerializerTests.DCS_FileStreamSurrogate
[22:09:22] info: System.IO.DirectoryNotFoundException : Could not find a part of the path '/tmp/q5vucmkj.caj_DCS_FileStreamSurrogate_4046'.
[22:09:22] info:    at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean )
[22:09:22] info:    at Interop.CheckIo(Error , String , Boolean )
[22:09:22] info:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 )
[22:09:22] info:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 )
[22:09:22] info:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 )
[22:09:22] info:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 )
[22:09:22] info:    at System.IO.Strategies.UnixFileStreamStrategy..ctor(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 )
[22:09:22] info:    at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 )
[22:09:22] info:    at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream , String , FileMode , FileAccess , FileShare , Int32 , FileOptions , Int64 , Nullable`1 )
[22:09:22] info:    at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , FileOptions , Int64 )
[22:09:22] info:    at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , FileOptions )
[22:09:22] info:    at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , Boolean )
[22:09:22] info:    at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare )
[22:09:22] info:    at MyFileStream..ctor(String fileName)
[22:09:22] info:    at DataContractSerializerTests.DCS_FileStreamSurrogate()
[22:09:22] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , IntPtr* )
[22:09:22] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )

Fails consistently.

ghost commented 1 year ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
[Log](https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-85681-merge-1a634b5df2d94cb68e/System.Runtime.Serialization.Xml.ReflectionOnly.Tests/1/console.af5f9bef.log?helixlogtype=result). `System.Runtime.Serialization.Xml.ReflectionOnly.Tests`, and `System.Runtime.Serialization.Xml.Tests`: ``` [22:09:22] fail: [FAIL] DataContractSerializerTests.DCS_FileStreamSurrogate [22:09:22] info: System.IO.DirectoryNotFoundException : Could not find a part of the path '/tmp/q5vucmkj.caj_DCS_FileStreamSurrogate_4046'. [22:09:22] info: at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean ) [22:09:22] info: at Interop.CheckIo(Error , String , Boolean ) [22:09:22] info: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 ) [22:09:22] info: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 ) [22:09:22] info: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 ) [22:09:22] info: at System.IO.Strategies.OSFileStreamStrategy..ctor(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 ) [22:09:22] info: at System.IO.Strategies.UnixFileStreamStrategy..ctor(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 ) [22:09:22] info: at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 ) [22:09:22] info: at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream , String , FileMode , FileAccess , FileShare , Int32 , FileOptions , Int64 , Nullable`1 ) [22:09:22] info: at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , FileOptions , Int64 ) [22:09:22] info: at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , FileOptions ) [22:09:22] info: at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare , Int32 , Boolean ) [22:09:22] info: at System.IO.FileStream..ctor(String , FileMode , FileAccess , FileShare ) [22:09:22] info: at MyFileStream..ctor(String fileName) [22:09:22] info: at DataContractSerializerTests.DCS_FileStreamSurrogate() [22:09:22] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , IntPtr* ) [22:09:22] info: at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags ) ``` Fails consistently.
Author: radical
Assignees: -
Labels: `arch-wasm`, `area-System.IO`, `test-failure`, `os-wasi`
Milestone: -
radical commented 1 year ago

mkstemp, and mkdtemp not supported

ilonatommy commented 4 months ago

Still failing, tracking issue for the missing support: https://github.com/WebAssembly/wasi-libc/issues/229