bytecodealliance / bytecodealliance/wasmtime
wasip3: unexpected error for mkdirat("")
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
Consider this test for an open `Descriptor` on a directory, `dirfd`:
```rust
assert_eq!(dirfd.create_directory_at("".to_string()).await,
Err(ErrorCode::Invalid));
```
I think `Invalid` is the right error. However instead the error is `NoEntry`, which corresponds to [this `statx` documentation](https://man7.org/linux/man-pages/man2/statx.2.html#ERRORS):
```
ENOENT A component of pathname does not exist, or pathname is an empty string and AT_EMPTY_PATH was not specified in flags.
```
I think that these "at" WASI interfaces should instead avoid syscalling for `""`, and instead return `Invalid`.
Contributor guide
Assessment
This issue has not been assessed yet.