Repository navigation
Implement rmdir with wasmfs - #18952
Conversation
|
I think this error may be because some of my earlier instructions were not correct (edit: sorry about that!) Instead, undo the changes to |
tlively
left a comment
There was a problem hiding this comment.
The code looks good so far, but it will need a test as well. If there are existing tests that use FS.rmdir that can be run with WasmFS as well, then reusing those would be great. Otherwise we will need a new test.
This reverts commit 939e34b.
|
I have addressed the two issues in a new commit. However, I noticed that there are currently no tests for rmdir. To add tests for rmdir, I'm wondering whether I should create a new pull request specifically for the tests or work on them within this existing pull request. What do you recommend? |
|
It would be best to add the tests in this PR so we can make sure all the code we merge is tested. |
|
I applied the diff locally and confirmed I was able to reproduce the error: Then I passed That gives this error: Looking at line 1747 in the test_dir.js that Emscripten produced, we can see that it is the call to |
|
If you have native exports that take pointers we currently have a hardcoded list in |
|
@sbc100 I didn't even know about that 😆. Is there some way we could use source annotations for that instead? |
I have a TODO in that function, but I don't really have any concrete ideas on how to fix it. I guess for functions that our part of our standard library we could do something similar to the auto-sig-generation I just landed... but that would not extend to user exports. For the But we should at least make it easy for user to tag certain functions/arguments are being pointers so we can create these wrappers for them, |
|
@tlively, just wanted to update you on the PR. We added test cases and fixed all the errors, and all Circle CI tests are passing, so I think it's ready to be merged. Also, I wanted to thank you for walking me through the debugging process - it was really helpful! |
tlively
left a comment
There was a problem hiding this comment.
LGTM besides those last two comments.
Done. |
Hi @tlively @kripken,
I've completed the implementation for rmdir on my branch and tested it locally, but when running the tests with ./test/runner.py test_fs_*, I'm getting an error(mentioned below).
I'm also working on implementing mount on another branch and encountering the same error there. I'm currently using Ubuntu 22.04.2LTS as my OS.
Here is the error I am getting
Any guidance you can offer on how to debug the error would be greatly appreciated. Thank you!