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

Add nodefs readdir handling for directories that contain exotic entries #22925

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Contributor

Resolves #22924.

test/test_core.py Outdated Show resolved Hide resolved
test/test_core.py Outdated Show resolved Hide resolved
src/library_syscall.js Outdated Show resolved Hide resolved
test/test_core.py Outdated Show resolved Hide resolved
@sbc100
Copy link
Collaborator

sbc100 commented Nov 21, 2024

Looks like this perhaps requires a wasmfs change to match? wasmfs.test_fs_nodefs_readdir is now failing. Looks like maybe wasmfs is reporting "." and ".." but the old FS is not ? Maybe we want go back to the old way of verifying the results to avoid having to fix these decrpencies as part of this PR?

@hoodmane
Copy link
Contributor Author

Yeah maybe the best thing to do would be to grab the output and make a series of assertions that it contains or does not contain certain strings? It seems that the order is not stable but the set of lines should be.

@sbc100
Copy link
Collaborator

sbc100 commented Nov 21, 2024

Yeah maybe the best thing to do would be to grab the output and make a series of assertions that it contains or does not contain certain strings? It seems that the order is not stable but the set of lines should be.

Sure. That sounds reasonable. I was a little surprised to see who different the wasmfs output was though. I guess there is stuff we need to address there:

--- expected
+++ actual
@@ -1,12 +1,13 @@
 listing contents of dir=/
 .
 ..
+dev
 tmp
-home
-dev
-proc
 listing contents of dir=/working
+.
+..
 existing
+named_pipe
 stdout
 test_nodefs_readdir.js
 test_nodefs_readdir.wasm

Specifically it looks like wasmfs supports . and .. but the old FS doesn't? Also, the home and proc directories should match too. These are all separate issues though.

test/test_core.py Outdated Show resolved Hide resolved
test/test_core.py Outdated Show resolved Hide resolved
dev
proc
listing contents of dir=/working
existing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange that we have . and .. at the root but not in the subdirectory. I guess that just a bug.

@sbc100
Copy link
Collaborator

sbc100 commented Nov 27, 2024

Rebasing could fix the code size failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NodeFS fails on (folders with) named pipes
2 participants