nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
226 stars 50 forks source link

tests failed on Windows build #172

Closed JesseCodeBones closed 2 years ago

JesseCodeBones commented 2 years ago

currently, I tried to run tests on Windows machine, and I found two tests cannot pass. do you know the root cause or do you have plan to fix it? Environment: windows 10.0.19044. x64 Enterprise Log:

10/19 Test #10: test-filestat-set-times .............***Failed    1.36 sec
uvwasi_path_open(uvwasi=000000559CFCF4F0, dirfd=3, dirflags=1, path='./test-filestat-set-times.txt', path_len=30, o_flags=1, fs_rights_base=11534400, fs_rights_inheriting=0, fs_flags=0, fd=000000559CFCF4C4)
uvwasi_path_symlink(uvwasi=000000559CFCF4F0, old_path='./test-filestat-set-times.txt', old_path_len=30, fd=3, new_path='./symlink.txt', new_path_len=14)
Assertion failed: err == 0, file C:\workspace\wasm-generic-runtime\thirdparty\uvwasi\test\test-filestat-set-times.c, line 71
cjihrig commented 2 years ago

Hmm, we do test uvwasi on Windows in this repo and several other repos. What error code are you getting test-filestat-set-times.c, line 71? You also mentioned two failing tests. What is the other one?

JesseCodeBones commented 2 years ago

@cjihrig I just noticed I run the test without admin role, if it will affect? the other one is :


uvwasi_path_symlink(uvwasi=000000D12654F340, old_path='./path-open-create-file.txt', old_path_len=28, fd=3, new_path='./symlink.txt', new_path_len=14)
Assertion failed: err == 0, file C:\workspace\wasm-generic-runtime\thirdparty\uvwasi\test\test-basic-file-io.c, line 172``` 
JesseCodeBones commented 2 years ago

for the symlink error, I found according to the MicroSoft documentation, only developer mode can do such behavior. not sure if it will impact. https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createsymboliclinkw

cjihrig commented 2 years ago

I don't use Windows, but since the test suite passes on Windows in several projects, I'm inclined to think this is something to do with your local setup. If you can provide more information that points to a bug (or even better, send a PR) that would be welcomed.

JesseCodeBones commented 2 years ago

I will prepare an developer windows and test again, I will close this case firstly.