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

feat(vfs) Update Metadata.len when updating the file buffer #2550

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Sep 2, 2021

Description

This patch updates wasmer_vfs::mem_fs to handle Metadata.len correctly. The len value is updated when something is written in the file buffer. len is also updated when the file is truncated (with open options) or when the file is update with set_len.

It helps to fix one test in #2546.

@Hywan Hywan added 🎉 enhancement New feature! 📦 lib-vfs About wasmer-vfs labels Sep 2, 2021
@Hywan Hywan self-assigned this Sep 2, 2021
@Hywan
Copy link
Contributor Author

Hywan commented Sep 3, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 3, 2021

@bors bors bot merged commit 3f084fc into wasmerio:master Sep 3, 2021
bors bot added a commit that referenced this pull request Sep 3, 2021
2546: test(wasi) Running all WASI tests with `wasmer_vfs::mem_fs` too r=Hywan a=Hywan

# Description

This WIP PR updates our WASI test framework to specifically test with `wasmer_vfs::host_fs` (the default, as of now) _and_ with `wasmer_vfs::mem_fs` (🆕!).

Bug trophies:

* #2545
* #2550
* #2551

# Review

- [ ] Add a short description of the change to the CHANGELOG.md file


Co-authored-by: Ivan Enderlin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-vfs About wasmer-vfs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants