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 text and tests for a rule around "." and ".." entries in directory listings #90

Closed
codefromthecrypt opened this issue Feb 4, 2023 · 0 comments · Fixed by #93
Closed

Comments

@codefromthecrypt
Copy link

The recently added rust tests include tests that summarize as directory listings MUST return "." and ".." entires https://github.com/WebAssembly/wasi-testsuite/blob/main/tests/rust/src/bin/fd_readdir.rs#L150-L153

I think this should be backed by specification about why and also edge cases. For example, should a pre-open return ".." at any time? Should it return ".." if its pre-open name is "/"? What about if the pre-open name is ".."?

This is particularly of interest with virtual filesystems, which may not have a ".." notion at all. Meanwhile at least zig and go guests filter out "." and ".." from listings, but to synthetically produce ".." based on the above cases is not only extra state but also futile when they are discarded.

I understand this is a different topic vs the current interpretation of snapshot-01, so raising it here. However, whatever decision here doesn't really satisfy the issue I raised despite it being within your right to close it anyway WebAssembly/wasi-testsuite#52

sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this issue Feb 6, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes WebAssembly#90.
sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this issue Feb 6, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes WebAssembly#90.
sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this issue Feb 6, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes WebAssembly#90.
sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this issue Feb 10, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes WebAssembly#90.
sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this issue Feb 10, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes WebAssembly#90.
sunfishcode added a commit that referenced this issue Feb 13, 2023
Add text excluding `.` and `..` from `readdir` directory iteration. In
most use cases, they act as navigational mechanisms rather than
meaningful contents of directories.

Wasi-libc will be expected to re-add `.` and `..` when implementing the
POSIX `readdir` interface.

Fixes #90.
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 a pull request may close this issue.

1 participant