Question for directory_seek test

Open
#61 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust, wasm

Research direction

Start with testsuite-base/tests/rust/src/bin/directory_seek.rs and the related wasi-filesystem issue #746. Resolve the expected directory fd_seek rights and error behavior, then document the decided rule so the test behavior and intended workaround are clear.

Written by the indexing model from the issue text.

Description

According to this test, it seems that using fd_seek on a directory is forbidden, though I can call lseek on a directory fd in POSIX. Also, we shouldn't set the fd_seek bits on a directory despite explicitly setting it in path_open.

I can't find any document or discussion related to this behavior which is unsetting the rights that are explicitly set in path_open for the directory.

My question is:

  • I'm wondering whether unsetting the rights is a good choice compare to returning ISDIR error while using the function.
  • Which right should be disabled if the file is a directory?

I believe this should be documented.

It seems that the rights system may be removed. Getting a workaround to pass the test is what I intended to do.

A related issue in wasi-filesystem: https://github.com/WebAssembly/WASI/issues/746

Thanks in advance!

Dominant language
Rust
Stars
88
Forks
50
Avg merge
8d 21h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/wasi-testsuite

All issues in WebAssembly/wasi-testsuite

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.