[browser][file system] Tests System.IO.FileSystem#39768
[browser][file system] Tests System.IO.FileSystem#39768mdh1418 merged 50 commits intodotnet:masterfrom kjpou1:wasm-filesystem-tests
Conversation
| { | ||
| protected static int geteuid() | ||
| { | ||
| throw new PlatformNotSupportedException(); |
There was a problem hiding this comment.
What do you think about returning 0 here and eliminating the platform checks?
There was a problem hiding this comment.
By doing that and modifying the places that use geteuid the tests fail with:
[FAIL] System.IO.Tests.File_AppendAllLinesAsync.WriteToReadOnlyFile
�[40m�[37mdbug�[39m�[22m�[49m: test[0]
System.UnauthorizedAccessException : Access to the path '/tmp/File_AppendAllLinesAsync_mqajhnoo.uqp/WriteToReadOnlyFile_105_93d848c1' is denied.
�[40m�[37mdbug�[39m�[22m�[49m: test[0]
---- System.IO.IOException : Permission denied
There was a problem hiding this comment.
The pal uses sendFile and emscripten's implementation doesn't seem too friendly w/ read only files. The error message refers to not being able to write to the destination file.
If you skip this block
runtime/src/libraries/Native/Unix/System.Native/pal_io.c
Lines 1152 to 1191 in 05f17e3
There was a problem hiding this comment.
I have gone through the build and it looks like this code block is already being skipped in the native pal.
There was a problem hiding this comment.
You're right. I was looking at the wrong place thinking it was included.
We should trace to see what call is bad.
|
You also need to remove the test suite from |
| #region UniversalTests | ||
|
|
||
| [Fact] | ||
| [PlatformSpecific(~TestPlatforms.Browser)] |
Thanks Maxim was just waiting for PR #39763 because it would have failed anyway |
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs
Outdated
Show resolved
Hide resolved
…filesystem-tests
src/libraries/System.IO.FileSystem/tests/FileStream/ReadWriteSpan.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs
Outdated
Show resolved
Hide resolved
- WebAssembly (BROWSER) has dirent d_type but is not identifying correctly but by returning UNKNOWN the managed code properly stats the file to detect if entry is directory or not.
|
There were a few places in |
Could you check the files that are in the PR. I thought I got all of them. |
…filesystem-tests
…filesystem-tests
- PR #40310 works around the issue for now while waiting for fix emscripten-core/emscripten#11804 / emscripten-core/emscripten#11812
|
Currently the results are: |
MaximLipnin
left a comment
There was a problem hiding this comment.
lgtm, just a couple of minor comments
Added 45
[PlatformSpecific(~TestPlatforms.Browser)]checks to tests.Directory.CreateDirectory.cs
DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsExceptionfor Browser platform.DirectoryWithComponentLongerThanMaxComponentAsPath_BrowserDoesNotThrowsExceptionfor Browser platform in case this check is added in the future.Error number:#39955 - ResolvedFile locking not supported: #40065
A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the file system by calling mkfifo(). Pipes are not supported on WebAssembly. Platform specific skip for browser in the following tests.
File rename issue reporting wrong error:#40305PR #40310 works around the issue for now while waiting for fix emscripten-core/emscripten#11804 / emscripten-core/emscripten#11812
Depends on PR: #39763- merged