8000 Support for short read/write pread/pwrite should be tested more · Issue #376 · mirage/index · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support for short read/write pread/pwrite should be tested more #376

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

Open
tomjridge opened this issue Nov 17, 2021 · 4 comments
Open

Support for short read/write pread/pwrite should be tested more #376

tomjridge opened this issue Nov 17, 2021 · 4 comments

Comments

@tomjridge
Copy link
Contributor

Support for short read/write pread/pwrite should be tested more.

I vaguely recall a FUSE filesystem that could make all read/write calls into short read/write calls, and could also do various other kinds of filesystem-allowed-but-rarely-tested behaviours. Would be good to find this and use it in testing.

@tomjridge
Copy link
Contributor Author

(And this issue could also be made for Irmin)

@Ngoguey42
Copy link

Could be related to mirage/irmin#1197

@tomjridge
Copy link
Contributor Author

Possibly also related to #256

@tomjridge
Copy link
Contributor Author

I have been attempting to encourage the filesystem to return "short" reads and writes, so we can test these behaviours easily.

One thing I tried was to use "max_read" and "max_write" FUSE options with a passthrough FUSE filesystem. Unfortunately (at least for the fusexmp from ocamlfuse) these options do not seem to be respected.

Other possibly-related bugs appeared on WSL running a 9p FS. I tried to reproduce on Linux using diod (a 9p server/client). However, the tests all passed (unfortunately). So, in terms of trying to elicit errors, diod is worse than WSL 9p.

Effectively all we want is for read/write (or pread/pwrite) to return short read/writes. I researched quite a lot on the web because I thought there was a tool that could do this. Unfortunately I couldn't find one. So I will spend another hour or so coding a FUSE passthrough FS with this "short read/write" behaviour. If the tests still pass then at least we have confidence that our code is well tested under this scenario.

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

No branches or pull requests

2 participants
0