Files
wasmtime/crates/test-programs
Dan Gohman c3f0471ff2 Fix the return value from wasi-common's fd_readdir.
`fd_readdir` returns a "bufused" value, which indicates the number of
bytes read into the buffer. WASI libc expects this value to be equal
to the size of the buffer if the end of the directory has not yet
been scanned.

Previously, wasi-common's `fd_readdir` was writing as many complete
entries as it could fit and then stopping, but this meant it was
returning size less than the buffer size even when the directory had
more entries. This patch makes it continue writing up until the end
of the buffer, and return that number of bytes, to let WASI libc
know that there's more to be read.

Fixes #2493.
2020-12-11 10:52:54 -08:00
..
2019-11-15 08:03:43 -08:00
2020-11-05 09:39:53 -06:00

This is the test-programs crate, which builds and runs whole programs compiled to wasm32-wasi.

To actually run these tests, the test-programs feature must be enabled, e.g.:

cargo test --features test-programs/test_programs --package test-programs