Skip to content

Commit

Permalink
add test, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed May 22, 2019
1 parent b7abc44 commit dc3ac15
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Blocks of changes will separated by version increments.

## **[Unreleased]**

- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed
- [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API
- [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows
- [#447](https://github.com/wasmerio/wasmer/pull/447) Add trace macro (`--features trace`) for more verbose debug statements
Expand Down
9 changes: 9 additions & 0 deletions lib/wasi/tests/wasitests/fs_sandbox_test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#[test]
fn test_fs_sandbox_test() {
assert_wasi_output!(
"../../wasitests/fs_sandbox_test.wasm",
"fs_sandbox_test",
vec![],
"../../wasitests/fs_sandbox_test.out"
);
}
1 change: 1 addition & 0 deletions lib/wasi/tests/wasitests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
mod _common;
mod create_dir;
mod file_metadata;
mod fs_sandbox_test;
mod hello;
mod mapdir;
mod quine;
Binary file added lib/wasi/wasitests/fs_sandbox_test
Binary file not shown.
1 change: 1 addition & 0 deletions lib/wasi/wasitests/fs_sandbox_test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reading the parent directory was okay? false
10 changes: 10 additions & 0 deletions lib/wasi/wasitests/fs_sandbox_test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn main() {
#[cfg(target = "wasi")]
let result = std::fs::read_dir("..");
#[cfg(not(target = "wasi"))]
let result: Result<(), String> = Err("placeholder".to_string());
println!(
"Reading the parent directory was okay? {:?}",
result.is_ok()
);
}
Binary file added lib/wasi/wasitests/fs_sandbox_test.wasm
Binary file not shown.

0 comments on commit dc3ac15

Please sign in to comment.