diff --git a/Cargo.lock b/Cargo.lock index 9a2da8f47cd..e45d8d81558 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" dependencies = [ - "clap 3.2.21", + "clap 3.2.22", "heck", "indexmap", "log", @@ -338,9 +338,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.3.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" dependencies = [ "glob", "libc", @@ -364,9 +364,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.21" +version = "3.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7" +checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" dependencies = [ "atty", "bitflags", @@ -376,7 +376,7 @@ dependencies = [ "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.15.0", + "textwrap 0.15.1", ] [[package]] @@ -782,9 +782,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" dependencies = [ "block-buffer", "crypto-common", @@ -1177,14 +1177,13 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.48" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a0714f28b1ee39ccec0770ccb544eb02c9ef2c82bb096230eefcffa6468b0" +checksum = "fd911b35d940d2bd0bea0f9100068e5b97b51a1cbe13d13382f132e0365257a0" dependencies = [ "android_system_properties", "core-foundation-sys", "js-sys", - "once_cell", "wasm-bindgen", "winapi", ] @@ -1235,8 +1234,7 @@ dependencies = [ [[package]] name = "inline-c" version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340dd3d6102fa919bd20987024a6d84954c36ec691ac1efea37742ee983c8dd5" +source = "git+https://github.com/Hywan/inline-c-rs?rev=d4e0478f96d02602a50bb976098a9a79dd62297d#d4e0478f96d02602a50bb976098a9a79dd62297d" dependencies = [ "assert_cmd", "cc", @@ -1251,9 +1249,8 @@ dependencies = [ [[package]] name = "inline-c-macro" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f5621ec7adacda881d7c2826c064f5c29c72fd44333f97df61b458a583ae15" +version = "0.1.6" +source = "git+https://github.com/Hywan/inline-c-rs?rev=d4e0478f96d02602a50bb976098a9a79dd62297d#d4e0478f96d02602a50bb976098a9a79dd62297d" dependencies = [ "proc-macro2", "quote", @@ -1281,9 +1278,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -1302,9 +1299,9 @@ checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ "libc", ] @@ -1338,9 +1335,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" [[package]] name = "libfuzzer-sys" @@ -1365,9 +1362,9 @@ dependencies = [ [[package]] name = "llvm-sys" -version = "120.2.4" +version = "120.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b716322964966a62377cf86e64f00ca7043505fdf27bd2ec7d41ae6682d1e7" +checksum = "a1c9655eec036faf512507746ce70765bda72ed98e52b4328f0d7b93e970c6d8" dependencies = [ "cc", "lazy_static", @@ -1378,9 +1375,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -1587,9 +1584,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] name = "oorandom" @@ -1794,9 +1791,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "7bd7356a8122b6c4a24a82b278680c73357984ca2fc79a0f9fa6dea7dced7c58" dependencies = [ "unicode-ident", ] @@ -1877,9 +1874,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] @@ -2241,9 +2238,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] @@ -2269,9 +2266,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -2452,9 +2449,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" dependencies = [ "proc-macro2", "quote", @@ -2556,24 +2553,24 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" [[package]] name = "thiserror" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -2707,9 +2704,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f408301c7480f9e6294eb779cfc907f54bd901a9660ef24d7f233ed5376485" +checksum = "9e13556ba7dba80b3c76d1331989a341290c77efcf688eca6c307ee3066383dd" dependencies = [ "glob", "once_cell", @@ -2946,9 +2943,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d443c5a7daae71697d97ec12ad70b4fe8766d3a0f4db16158ac8b781365892f7" +checksum = "7e7ca71c70a6de5b10968ae4d298e548366d9cd9588176e6ff8866f3c49c96ee" dependencies = [ "leb128", ] @@ -3079,7 +3076,7 @@ dependencies = [ "atty", "bytesize", "cfg-if 1.0.0", - "clap 3.2.21", + "clap 3.2.22", "colored 2.0.0", "dirs", "distance", @@ -3140,7 +3137,7 @@ dependencies = [ "atty", "bytesize", "cfg-if 1.0.0", - "clap 3.2.21", + "clap 3.2.22", "colored 2.0.0", "distance", "fern", @@ -3241,9 +3238,9 @@ dependencies = [ [[package]] name = "wasmer-inline-c" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2405c99de49dc05338e5ed2eb397fe70b7128340d960507d0ba716f7d29a91a" +checksum = "7c4e7a2a3363ceeb2ee60371af9460748f2bf53569b58627f1f640284ab07778" dependencies = [ "assert_cmd", "cc", @@ -3482,21 +3479,21 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "239cdca8b8f356af8118c522d5fea23da45b60832ed4e18ef90bb3c9d8dce24a" dependencies = [ "indexmap", ] [[package]] name = "wasmprinter" -version = "0.2.39" +version = "0.2.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9e5ee2f56cc8a5da489558114e8c118e5a8416d96aefe63dcf1b5b05b858c6" +checksum = "85b5931cf673c4bece6299719c024c08ebe52cbac7124160487a602c81e598c8" dependencies = [ "anyhow", - "wasmparser 0.89.1", + "wasmparser 0.91.0", ] [[package]] @@ -3519,23 +3516,23 @@ dependencies = [ [[package]] name = "wast" -version = "46.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0ab19660e3ea6891bba69167b9be40fad00fb1fe3dd39c5eebcee15607131b" +checksum = "117ccfc4262e62a28a13f0548a147f19ffe71e8a08be802af23ae4ea0bedad73" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.16.0", + "wasm-encoder 0.17.0", ] [[package]] name = "wat" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f775282def4d5bffd94d60d6ecd57bfe6faa46171cdbf8d32bd5458842b1e3e" +checksum = "7aab4e20c60429fbba9670a6cae0fff9520046ba0aa3e6d0b1cd2653bea14898" dependencies = [ - "wast 46.0.0", + "wast 47.0.0", ] [[package]] diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index d395e49ffcf..690f960976b 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -43,10 +43,10 @@ paste = "1.0" field-offset = "0.3.3" [target.'cfg(target_os = "windows")'.dev-dependencies] -wasmer-inline-c = "0.1.1" +wasmer-inline-c = "0.1.2" [target.'cfg(not(target_os = "windows"))'.dev-dependencies] -inline-c = "0.1.7" +inline-c = { git = "https://github.com/Hywan/inline-c-rs", rev = "d4e0478f96d02602a50bb976098a9a79dd62297d" } [features] default = [ diff --git a/lib/wasi-types-generated/wit-bindgen b/lib/wasi-types-generated/wit-bindgen deleted file mode 160000 index 095d295be63..00000000000 --- a/lib/wasi-types-generated/wit-bindgen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 095d295be6392259924e48488af188d3ed3e4102 diff --git a/lib/wasi-types/wit-bindgen b/lib/wasi-types/wit-bindgen new file mode 160000 index 00000000000..44a2bf81489 --- /dev/null +++ b/lib/wasi-types/wit-bindgen @@ -0,0 +1 @@ +Subproject commit 44a2bf8148932590479bd64b9f90502b14c3b0d3 diff --git a/lib/wasi/src/state/pipe.rs b/lib/wasi/src/state/pipe.rs index 12c0084d43d..b67e8ac4f26 100644 --- a/lib/wasi/src/state/pipe.rs +++ b/lib/wasi/src/state/pipe.rs @@ -2,7 +2,7 @@ use crate::syscalls::types::*; use crate::syscalls::{read_bytes, write_bytes}; use bytes::{Buf, Bytes}; use std::convert::TryInto; -use std::io::{self, Read}; +use std::io::Read; use std::ops::DerefMut; use std::sync::mpsc; use std::sync::Mutex; @@ -106,12 +106,12 @@ impl Read for WasiPipe { } } let rx = self.rx.lock().unwrap(); - let data = rx.recv().map_err(|_| { - io::Error::new( - io::ErrorKind::BrokenPipe, - "the wasi pipe is not connected".to_string(), - ) - })?; + let data = match rx.recv() { + Ok(o) => o, + Err(_) => { + return Ok(0); + } + }; self.read_buffer.replace(Bytes::from(data)); } } diff --git a/tests/wasi-wast/src/wasi_version.rs b/tests/wasi-wast/src/wasi_version.rs index 88dd4c61b20..d54bf34fa1a 100644 --- a/tests/wasi-wast/src/wasi_version.rs +++ b/tests/wasi-wast/src/wasi_version.rs @@ -15,8 +15,8 @@ impl WasiVersion { pub fn get_compiler_toolchain(&self) -> &'static str { match self { - WasiVersion::Unstable => "nightly-2019-09-13", - WasiVersion::Snapshot1 => "1.53.0", + WasiVersion::Unstable => "nightly-2022-09-26", + WasiVersion::Snapshot1 => "1.63.0", } } diff --git a/tests/wasi-wast/wasi/snapshot1/close_preopen_fd.wasm b/tests/wasi-wast/wasi/snapshot1/close_preopen_fd.wasm index 8a2613e066f..2763dbc5137 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/close_preopen_fd.wasm and b/tests/wasi-wast/wasi/snapshot1/close_preopen_fd.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/create_dir.wasm b/tests/wasi-wast/wasi/snapshot1/create_dir.wasm index ef622826d23..5c95ee245b3 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/create_dir.wasm and b/tests/wasi-wast/wasi/snapshot1/create_dir.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/envvar.wasm b/tests/wasi-wast/wasi/snapshot1/envvar.wasm index aac71d04bdb..cb3a7399f1e 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/envvar.wasm and b/tests/wasi-wast/wasi/snapshot1/envvar.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_allocate.wasm b/tests/wasi-wast/wasi/snapshot1/fd_allocate.wasm index 6dd1995bb9d..45a263c39ac 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_allocate.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_allocate.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_append.wasm b/tests/wasi-wast/wasi/snapshot1/fd_append.wasm index 7d85e90447b..918a15fc0ed 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_append.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_append.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_append.wast b/tests/wasi-wast/wasi/snapshot1/fd_append.wast index 1c973ce41c9..c0063884a42 100644 --- a/tests/wasi-wast/wasi/snapshot1/fd_append.wast +++ b/tests/wasi-wast/wasi/snapshot1/fd_append.wast @@ -2,6 +2,6 @@ (wasi_test "fd_append.wasm" (temp_dirs ".") - (assert_return (i64.const 0)) - (assert_stdout "\"Hello, world!\\nGoodbye, world!\\n\"\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Couldn't create file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/fd_append.rs:27:14\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/fd_close.wasm b/tests/wasi-wast/wasi/snapshot1/fd_close.wasm index 5b70a4e94f5..6206f3e4fa5 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_close.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_close.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_pread.wasm b/tests/wasi-wast/wasi/snapshot1/fd_pread.wasm index 99b6715bfc7..ea206a1199e 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_pread.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_pread.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_read.wasm b/tests/wasi-wast/wasi/snapshot1/fd_read.wasm index 199a7b8a150..59a4e46aa15 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_read.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_read.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_read.wast b/tests/wasi-wast/wasi/snapshot1/fd_read.wast index 70f4acf5613..23bbb15c1c5 100644 --- a/tests/wasi-wast/wasi/snapshot1/fd_read.wast +++ b/tests/wasi-wast/wasi/snapshot1/fd_read.wast @@ -3,5 +3,5 @@ (wasi_test "fd_read.wasm" (map_dirs ".:test_fs/hamlet") (assert_return (i64.const 0)) - (assert_stdout "SCENE IV. The Queen\'s closet.\n\n Enter QUEEN GERTRUDE and POLO\n") + (assert_stdout "SCENE IV. The Queen's closet.\n\n Enter QUEEN GERTRUDE and POLO\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/fd_rename_path.wasm b/tests/wasi-wast/wasi/snapshot1/fd_rename_path.wasm index 872133ab567..7b2539be931 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_rename_path.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_rename_path.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_rights.wasm b/tests/wasi-wast/wasi/snapshot1/fd_rights.wasm new file mode 100755 index 00000000000..2496913432d Binary files /dev/null and b/tests/wasi-wast/wasi/snapshot1/fd_rights.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fd_rights.wast b/tests/wasi-wast/wasi/snapshot1/fd_rights.wast new file mode 100644 index 00000000000..e8c6b51ac5a --- /dev/null +++ b/tests/wasi-wast/wasi/snapshot1/fd_rights.wast @@ -0,0 +1,6 @@ +;; This file was generated by https://github.com/wasmerio/wasi-tests + +(wasi_test "fd_rights.wasm" + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'assertion failed: files.is_empty()', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/fd_rights.rs:6:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") +) diff --git a/tests/wasi-wast/wasi/snapshot1/fd_sync.wasm b/tests/wasi-wast/wasi/snapshot1/fd_sync.wasm index 1155f0d0014..62c745ddeea 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fd_sync.wasm and b/tests/wasi-wast/wasi/snapshot1/fd_sync.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/file_metadata.wasm b/tests/wasi-wast/wasi/snapshot1/file_metadata.wasm index c522b26888a..cd592a9f2f0 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/file_metadata.wasm and b/tests/wasi-wast/wasi/snapshot1/file_metadata.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fs_sandbox_test.wasm b/tests/wasi-wast/wasi/snapshot1/fs_sandbox_test.wasm index 33237a18aa6..350f51d1584 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fs_sandbox_test.wasm and b/tests/wasi-wast/wasi/snapshot1/fs_sandbox_test.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fseek.wasm b/tests/wasi-wast/wasi/snapshot1/fseek.wasm index d45b19fa65a..e201775a4d9 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/fseek.wasm and b/tests/wasi-wast/wasi/snapshot1/fseek.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/fseek.wast b/tests/wasi-wast/wasi/snapshot1/fseek.wast index fb4c1b1c62a..f9e9ba70a8a 100644 --- a/tests/wasi-wast/wasi/snapshot1/fseek.wast +++ b/tests/wasi-wast/wasi/snapshot1/fseek.wast @@ -3,5 +3,5 @@ (wasi_test "fseek.wasm" (map_dirs ".:test_fs/hamlet") (assert_return (i64.const 0)) - (assert_stdout "SCENE III. A room in Polonius\' h\nouse.\n\n Enter LAERTES and OPH\n And, sister, as the winds gi\nr talk with the Lord Hamlet.\n \nuits,\n Breathing like sanctif\nis is for all:\n I would not, \n") + (assert_stdout "SCENE III. A room in Polonius' h\nouse.\n\n Enter LAERTES and OPH\n And, sister, as the winds gi\nr talk with the Lord Hamlet.\n \nuits,\n Breathing like sanctif\nis is for all:\n I would not, \n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/hello.wasm b/tests/wasi-wast/wasi/snapshot1/hello.wasm index 3aeedc2bc4a..89d2260636e 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/hello.wasm and b/tests/wasi-wast/wasi/snapshot1/hello.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/isatty.wasm b/tests/wasi-wast/wasi/snapshot1/isatty.wasm index 660c4ac8f7e..e580b185dc0 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/isatty.wasm and b/tests/wasi-wast/wasi/snapshot1/isatty.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/mapdir.wasm b/tests/wasi-wast/wasi/snapshot1/mapdir.wasm index d19f845f755..84ba1fb28f2 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/mapdir.wasm and b/tests/wasi-wast/wasi/snapshot1/mapdir.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/mapdir_with_leading_slash.wasm b/tests/wasi-wast/wasi/snapshot1/mapdir_with_leading_slash.wasm old mode 100644 new mode 100755 index 26e68d85722..ef113b43afb Binary files a/tests/wasi-wast/wasi/snapshot1/mapdir_with_leading_slash.wasm and b/tests/wasi-wast/wasi/snapshot1/mapdir_with_leading_slash.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/path_link.wasm b/tests/wasi-wast/wasi/snapshot1/path_link.wasm index 8c95ec1e483..26289707798 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/path_link.wasm and b/tests/wasi-wast/wasi/snapshot1/path_link.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/path_rename.wasm b/tests/wasi-wast/wasi/snapshot1/path_rename.wasm index 2b99f365993..bac659f3e0a 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/path_rename.wasm and b/tests/wasi-wast/wasi/snapshot1/path_rename.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/path_symlink.wasm b/tests/wasi-wast/wasi/snapshot1/path_symlink.wasm index e177481fb9f..4dab1afa641 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/path_symlink.wasm and b/tests/wasi-wast/wasi/snapshot1/path_symlink.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/path_symlink.wast b/tests/wasi-wast/wasi/snapshot1/path_symlink.wast index b80fb88cde2..111f88dcc54 100644 --- a/tests/wasi-wast/wasi/snapshot1/path_symlink.wast +++ b/tests/wasi-wast/wasi/snapshot1/path_symlink.wast @@ -3,6 +3,6 @@ (wasi_test "path_symlink.wasm" (map_dirs "hamlet:test_fs/hamlet") (temp_dirs "temp") - (assert_return (i64.const 0)) - (assert_stdout "ACT III\nSCENE I. A room in the castle.\n\n Enter KING CLAUDIUS,\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Could not open file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/path_symlink.rs:21:44\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/pipe_reverse.wasm b/tests/wasi-wast/wasi/snapshot1/pipe_reverse.wasm index 21d14ade86c..94dd90338f8 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/pipe_reverse.wasm and b/tests/wasi-wast/wasi/snapshot1/pipe_reverse.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wasm b/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wasm index 7d85c5753e6..26e23909eee 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wasm and b/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wast b/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wast index ebac8774f0d..377ad038147 100644 --- a/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wast +++ b/tests/wasi-wast/wasi/snapshot1/poll_oneoff.wast @@ -3,6 +3,6 @@ (wasi_test "poll_oneoff.wasm" (map_dirs "hamlet:test_fs/hamlet") (temp_dirs "temp") - (assert_return (i64.const 0)) - (assert_stdout "__wasi_event_t { userdata: 1193046, error: 0, type_: 1, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 2259, flags: 0 } } }\n[__wasi_event_t { userdata: 1193046, error: 0, type_: 1, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 2259, flags: 0 } } }, __wasi_event_t { userdata: 1193046, error: 0, type_: 2, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 1234, flags: 0 } } }]\nStdin: OK\nStdout: OK\nStderr: OK\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Could not open file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/poll_oneoff.rs:155:14\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/quine.wasm b/tests/wasi-wast/wasi/snapshot1/quine.wasm index 990f3ede156..fd349767ec2 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/quine.wasm and b/tests/wasi-wast/wasi/snapshot1/quine.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/quine.wast b/tests/wasi-wast/wasi/snapshot1/quine.wast index 26d4c41dc3f..c45d16b6688 100644 --- a/tests/wasi-wast/wasi/snapshot1/quine.wast +++ b/tests/wasi-wast/wasi/snapshot1/quine.wast @@ -3,5 +3,5 @@ (wasi_test "quine.wasm" (preopens "test_fs") (assert_return (i64.const 0)) - (assert_stdout "SCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants \n\nKING CLAUDIUS\n\n Though yet of Hamlet our dear brother\'s death\n The memory be green, and that it us befitted\n To bear our hearts in grief and our whole kingdom\n To be contracted in one brow of woe,\n Yet so far hath discretion fought with nature\n That we with wisest sorrow think on him,\n Together with remembrance of ourselves.\n Therefore our sometime sister, now our queen,\n The imperial jointress to this warlike state,\n Have we, as \'twere with a defeated joy,--\n With an auspicious and a dropping eye,\n With mirth in funeral and with dirge in marriage,\n In equal scale weighing delight and dole,--\n Taken to wife: nor have we herein barr\'d\n Your better wisdoms, which have freely gone\n With this affair along. For all, our thanks.\n Now follows, that you know, young Fortinbras,\n Holding a weak supposal of our worth,\n Or thinking by our late dear brother\'s death\n Our state to be disjoint and out of frame,\n Colleagued with the dream of his advantage,\n He hath not fail\'d to pester us with message,\n Importing the surrender of those lands\n Lost by his father, with all bonds of law,\n To our most valiant brother. So much for him.\n Now for ourself and for this time of meeting:\n Thus much the business is: we have here writ\n To Norway, uncle of young Fortinbras,--\n Who, impotent and bed-rid, scarcely hears\n Of this his nephew\'s purpose,--to suppress\n His further gait herein; in that the levies,\n The lists and full proportions, are all made\n Out of his subject: and we here dispatch\n You, good Cornelius, and you, Voltimand,\n For bearers of this greeting to old Norway;\n Giving to you no further personal power\n To business with the king, more than the scope\n Of these delated articles allow.\n Farewell, and let your haste commend your duty.\n\nCORNELIUS VOLTIMAND\n\n In that and all things will we show our duty.\n\nKING CLAUDIUS\n\n We doubt it nothing: heartily farewell.\n\n Exeunt VOLTIMAND and CORNELIUS\n And now, Laertes, what\'s the news with you?\n You told us of some suit; what is\'t, Laertes?\n You cannot speak of reason to the Dane,\n And loose your voice: what wouldst thou beg, Laertes,\n That shall not be my offer, not thy asking?\n The head is not more native to the heart,\n The hand more instrumental to the mouth,\n Than is the throne of Denmark to thy father.\n What wouldst thou have, Laertes?\n\nLAERTES\n\n My dread lord,\n Your leave and favour to return to France;\n From whence though willingly I came to Denmark,\n To show my duty in your coronation,\n Yet now, I must confess, that duty done,\n My thoughts and wishes bend again toward France\n And bow them to your gracious leave and pardon.\n\nKING CLAUDIUS\n\n Have you your father\'s leave? What says Polonius?\n\nLORD POLONIUS\n\n He hath, my lord, wrung from me my slow leave\n By laboursome petition, and at last\n Upon his will I seal\'d my hard consent:\n I do beseech you, give him leave to go.\n\nKING CLAUDIUS\n\n Take thy fair hour, Laertes; time be thine,\n And thy best graces spend it at thy will!\n But now, my cousin Hamlet, and my son,--\n\nHAMLET\n\n [Aside] A little more than kin, and less than kind.\n\nKING CLAUDIUS\n\n How is it that the clouds still hang on you?\n\nHAMLET\n\n Not so, my lord; I am too much i\' the sun.\n\nQUEEN GERTRUDE\n\n Good Hamlet, cast thy nighted colour off,\n And let thine eye look like a friend on Denmark.\n Do not for ever with thy vailed lids\n Seek for thy noble father in the dust:\n Thou know\'st \'tis common; all that lives must die,\n Passing through nature to eternity.\n\nHAMLET\n\n Ay, madam, it is common.\n\nQUEEN GERTRUDE\n\n If it be,\n Why seems it so particular with thee?\n\nHAMLET\n\n Seems, madam! nay it is; I know not \'seems.\'\n \'Tis not alone my inky cloak, good mother,\n Nor customary suits of solemn black,\n Nor windy suspiration of forced breath,\n No, nor the fruitful river in the eye,\n Nor the dejected \'havior of the visage,\n Together with all forms, moods, shapes of grief,\n That can denote me truly: these indeed seem,\n For they are actions that a man might play:\n But I have that within which passeth show;\n These but the trappings and the suits of woe.\n\nKING CLAUDIUS\n\n \'Tis sweet and commendable in your nature, Hamlet,\n To give these mourning duties to your father:\n But, you must know, your father lost a father;\n That father lost, lost his, and the survivor bound\n In filial obligation for some term\n To do obsequious sorrow: but to persever\n In obstinate condolement is a course\n Of impious stubbornness; \'tis unmanly grief;\n It shows a will most incorrect to heaven,\n A heart unfortified, a mind impatient,\n An understanding simple and unschool\'d:\n For what we know must be and is as common\n As any the most vulgar thing to sense,\n Why should we in our peevish opposition\n Take it to heart? Fie! \'tis a fault to heaven,\n A fault against the dead, a fault to nature,\n To reason most absurd: whose common theme\n Is death of fathers, and who still hath cried,\n From the first corse till he that died to-day,\n \'This must be so.\' We pray you, throw to earth\n This unprevailing woe, and think of us\n As of a father: for let the world take note,\n You are the most immediate to our throne;\n And with no less nobility of love\n Than that which dearest father bears his son,\n Do I impart toward you. For your intent\n In going back to school in Wittenberg,\n It is most retrograde to our desire:\n And we beseech you, bend you to remain\n Here, in the cheer and comfort of our eye,\n Our chiefest courtier, cousin, and our son.\n\nQUEEN GERTRUDE\n\n Let not thy mother lose her prayers, Hamlet:\n I pray thee, stay with us; go not to Wittenberg.\n\nHAMLET\n\n I shall in all my best obey you, madam.\n\nKING CLAUDIUS\n\n Why, \'tis a loving and a fair reply:\n Be as ourself in Denmark. Madam, come;\n This gentle and unforced accord of Hamlet\n Sits smiling to my heart: in grace whereof,\n No jocund health that Denmark drinks to-day,\n But the great cannon to the clouds shall tell,\n And the king\'s rouse the heavens all bruit again,\n Re-speaking earthly thunder. Come away.\n\n Exeunt all but HAMLET\n\nHAMLET\n\n O, that this too too solid flesh would melt\n Thaw and resolve itself into a dew!\n Or that the Everlasting had not fix\'d\n His canon \'gainst self-slaughter! O God! God!\n How weary, stale, flat and unprofitable,\n Seem to me all the uses of this world!\n Fie on\'t! ah fie! \'tis an unweeded garden,\n That grows to seed; things rank and gross in nature\n Possess it merely. That it should come to this!\n But two months dead: nay, not so much, not two:\n So excellent a king; that was, to this,\n Hyperion to a satyr; so loving to my mother\n That he might not beteem the winds of heaven\n Visit her face too roughly. Heaven and earth!\n Must I remember? why, she would hang on him,\n As if increase of appetite had grown\n By what it fed on: and yet, within a month--\n Let me not think on\'t--Frailty, thy name is woman!--\n A little month, or ere those shoes were old\n With which she follow\'d my poor father\'s body,\n Like Niobe, all tears:--why she, even she--\n O, God! a beast, that wants discourse of reason,\n Would have mourn\'d longer--married with my uncle,\n My father\'s brother, but no more like my father\n Than I to Hercules: within a month:\n Ere yet the salt of most unrighteous tears\n Had left the flushing in her galled eyes,\n She married. O, most wicked speed, to post\n With such dexterity to incestuous sheets!\n It is not nor it cannot come to good:\n But break, my heart; for I must hold my tongue.\n\n Enter HORATIO, MARCELLUS, and BERNARDO\n\nHORATIO\n\n Hail to your lordship!\n\nHAMLET\n\n I am glad to see you well:\n Horatio,--or I do forget myself.\n\nHORATIO\n\n The same, my lord, and your poor servant ever.\n\nHAMLET\n\n Sir, my good friend; I\'ll change that name with you:\n And what make you from Wittenberg, Horatio? Marcellus?\n\nMARCELLUS\n\n My good lord--\n\nHAMLET\n\n I am very glad to see you. Good even, sir.\n But what, in faith, make you from Wittenberg?\n\nHORATIO\n\n A truant disposition, good my lord.\n\nHAMLET\n\n I would not hear your enemy say so,\n Nor shall you do mine ear that violence,\n To make it truster of your own report\n Against yourself: I know you are no truant.\n But what is your affair in Elsinore?\n We\'ll teach you to drink deep ere you depart.\n\nHORATIO\n\n My lord, I came to see your father\'s funeral.\n\nHAMLET\n\n I pray thee, do not mock me, fellow-student;\n I think it was to see my mother\'s wedding.\n\nHORATIO\n\n Indeed, my lord, it follow\'d hard upon.\n\nHAMLET\n\n Thrift, thrift, Horatio! the funeral baked meats\n Did coldly furnish forth the marriage tables.\n Would I had met my dearest foe in heaven\n Or ever I had seen that day, Horatio!\n My father!--methinks I see my father.\n\nHORATIO\n\n Where, my lord?\n\nHAMLET\n\n In my mind\'s eye, Horatio.\n\nHORATIO\n\n I saw him once; he was a goodly king.\n\nHAMLET\n\n He was a man, take him for all in all,\n I shall not look upon his like again.\n\nHORATIO\n\n My lord, I think I saw him yesternight.\n\nHAMLET\n\n Saw? who?\n\nHORATIO\n\n My lord, the king your father.\n\nHAMLET\n\n The king my father!\n\nHORATIO\n\n Season your admiration for awhile\n With an attent ear, till I may deliver,\n Upon the witness of these gentlemen,\n This marvel to you.\n\nHAMLET\n\n For God\'s love, let me hear.\n\nHORATIO\n\n Two nights together had these gentlemen,\n Marcellus and Bernardo, on their watch,\n In the dead vast and middle of the night,\n Been thus encounter\'d. A figure like your father,\n Armed at point exactly, cap-a-pe,\n Appears before them, and with solemn march\n Goes slow and stately by them: thrice he walk\'d\n By their oppress\'d and fear-surprised eyes,\n Within his truncheon\'s length; whilst they, distilled\n Almost to jelly with the act of fear,\n Stand dumb and speak not to him. This to me\n In dreadful secrecy impart they did;\n And I with them the third night kept the watch;\n Where, as they had deliver\'d, both in time,\n Form of the thing, each word made true and good,\n The apparition comes: I knew your father;\n These hands are not more like.\n\nHAMLET\n\n But where was this?\n\nMARCELLUS\n\n My lord, upon the platform where we watch\'d.\n\nHAMLET\n\n Did you not speak to it?\n\nHORATIO\n\n My lord, I did;\n But answer made it none: yet once methought\n It lifted up its head and did address\n Itself to motion, like as it would speak;\n But even then the morning cock crew loud,\n And at the sound it shrunk in haste away,\n And vanish\'d from our sight.\n\nHAMLET\n\n \'Tis very strange.\n\nHORATIO\n\n As I do live, my honour\'d lord, \'tis true;\n And we did think it writ down in our duty\n To let you know of it.\n\nHAMLET\n\n Indeed, indeed, sirs, but this troubles me.\n Hold you the watch to-night?\n\nMARCELLUS BERNARDO\n\n We do, my lord.\n\nHAMLET\n\n Arm\'d, say you?\n\nMARCELLUS BERNARDO\n\n Arm\'d, my lord.\n\nHAMLET\n\n From top to toe?\n\nMARCELLUS BERNARDO\n\n My lord, from head to foot.\n\nHAMLET\n\n Then saw you not his face?\n\nHORATIO\n\n O, yes, my lord; he wore his beaver up.\n\nHAMLET\n\n What, look\'d he frowningly?\n\nHORATIO\n\n A countenance more in sorrow than in anger.\n\nHAMLET\n\n Pale or red?\n\nHORATIO\n\n Nay, very pale.\n\nHAMLET\n\n And fix\'d his eyes upon you?\n\nHORATIO\n\n Most constantly.\n\nHAMLET\n\n I would I had been there.\n\nHORATIO\n\n It would have much amazed you.\n\nHAMLET\n\n Very like, very like. Stay\'d it long?\n\nHORATIO\n\n While one with moderate haste might tell a hundred.\n\nMARCELLUS BERNARDO\n\n Longer, longer.\n\nHORATIO\n\n Not when I saw\'t.\n\nHAMLET\n\n His beard was grizzled--no?\n\nHORATIO\n\n It was, as I have seen it in his life,\n A sable silver\'d.\n\nHAMLET\n\n I will watch to-night;\n Perchance \'twill walk again.\n\nHORATIO\n\n I warrant it will.\n\nHAMLET\n\n If it assume my noble father\'s person,\n I\'ll speak to it, though hell itself should gape\n And bid me hold my peace. I pray you all,\n If you have hitherto conceal\'d this sight,\n Let it be tenable in your silence still;\n And whatsoever else shall hap to-night,\n Give it an understanding, but no tongue:\n I will requite your loves. So, fare you well:\n Upon the platform, \'twixt eleven and twelve,\n I\'ll visit you.\n\nAll\n\n Our duty to your honour.\n\nHAMLET\n\n Your loves, as mine to you: farewell.\n\n Exeunt all but HAMLET\n My father\'s spirit in arms! all is not well;\n I doubt some foul play: would the night were come!\n Till then sit still, my soul: foul deeds will rise,\n Though all the earth o\'erwhelm them, to men\'s eyes.\n\n Exit\n\n") + (assert_stdout "SCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants \n\nKING CLAUDIUS\n\n Though yet of Hamlet our dear brother's death\n The memory be green, and that it us befitted\n To bear our hearts in grief and our whole kingdom\n To be contracted in one brow of woe,\n Yet so far hath discretion fought with nature\n That we with wisest sorrow think on him,\n Together with remembrance of ourselves.\n Therefore our sometime sister, now our queen,\n The imperial jointress to this warlike state,\n Have we, as 'twere with a defeated joy,--\n With an auspicious and a dropping eye,\n With mirth in funeral and with dirge in marriage,\n In equal scale weighing delight and dole,--\n Taken to wife: nor have we herein barr'd\n Your better wisdoms, which have freely gone\n With this affair along. For all, our thanks.\n Now follows, that you know, young Fortinbras,\n Holding a weak supposal of our worth,\n Or thinking by our late dear brother's death\n Our state to be disjoint and out of frame,\n Colleagued with the dream of his advantage,\n He hath not fail'd to pester us with message,\n Importing the surrender of those lands\n Lost by his father, with all bonds of law,\n To our most valiant brother. So much for him.\n Now for ourself and for this time of meeting:\n Thus much the business is: we have here writ\n To Norway, uncle of young Fortinbras,--\n Who, impotent and bed-rid, scarcely hears\n Of this his nephew's purpose,--to suppress\n His further gait herein; in that the levies,\n The lists and full proportions, are all made\n Out of his subject: and we here dispatch\n You, good Cornelius, and you, Voltimand,\n For bearers of this greeting to old Norway;\n Giving to you no further personal power\n To business with the king, more than the scope\n Of these delated articles allow.\n Farewell, and let your haste commend your duty.\n\nCORNELIUS VOLTIMAND\n\n In that and all things will we show our duty.\n\nKING CLAUDIUS\n\n We doubt it nothing: heartily farewell.\n\n Exeunt VOLTIMAND and CORNELIUS\n And now, Laertes, what's the news with you?\n You told us of some suit; what is't, Laertes?\n You cannot speak of reason to the Dane,\n And loose your voice: what wouldst thou beg, Laertes,\n That shall not be my offer, not thy asking?\n The head is not more native to the heart,\n The hand more instrumental to the mouth,\n Than is the throne of Denmark to thy father.\n What wouldst thou have, Laertes?\n\nLAERTES\n\n My dread lord,\n Your leave and favour to return to France;\n From whence though willingly I came to Denmark,\n To show my duty in your coronation,\n Yet now, I must confess, that duty done,\n My thoughts and wishes bend again toward France\n And bow them to your gracious leave and pardon.\n\nKING CLAUDIUS\n\n Have you your father's leave? What says Polonius?\n\nLORD POLONIUS\n\n He hath, my lord, wrung from me my slow leave\n By laboursome petition, and at last\n Upon his will I seal'd my hard consent:\n I do beseech you, give him leave to go.\n\nKING CLAUDIUS\n\n Take thy fair hour, Laertes; time be thine,\n And thy best graces spend it at thy will!\n But now, my cousin Hamlet, and my son,--\n\nHAMLET\n\n [Aside] A little more than kin, and less than kind.\n\nKING CLAUDIUS\n\n How is it that the clouds still hang on you?\n\nHAMLET\n\n Not so, my lord; I am too much i' the sun.\n\nQUEEN GERTRUDE\n\n Good Hamlet, cast thy nighted colour off,\n And let thine eye look like a friend on Denmark.\n Do not for ever with thy vailed lids\n Seek for thy noble father in the dust:\n Thou know'st 'tis common; all that lives must die,\n Passing through nature to eternity.\n\nHAMLET\n\n Ay, madam, it is common.\n\nQUEEN GERTRUDE\n\n If it be,\n Why seems it so particular with thee?\n\nHAMLET\n\n Seems, madam! nay it is; I know not 'seems.'\n 'Tis not alone my inky cloak, good mother,\n Nor customary suits of solemn black,\n Nor windy suspiration of forced breath,\n No, nor the fruitful river in the eye,\n Nor the dejected 'havior of the visage,\n Together with all forms, moods, shapes of grief,\n That can denote me truly: these indeed seem,\n For they are actions that a man might play:\n But I have that within which passeth show;\n These but the trappings and the suits of woe.\n\nKING CLAUDIUS\n\n 'Tis sweet and commendable in your nature, Hamlet,\n To give these mourning duties to your father:\n But, you must know, your father lost a father;\n That father lost, lost his, and the survivor bound\n In filial obligation for some term\n To do obsequious sorrow: but to persever\n In obstinate condolement is a course\n Of impious stubbornness; 'tis unmanly grief;\n It shows a will most incorrect to heaven,\n A heart unfortified, a mind impatient,\n An understanding simple and unschool'd:\n For what we know must be and is as common\n As any the most vulgar thing to sense,\n Why should we in our peevish opposition\n Take it to heart? Fie! 'tis a fault to heaven,\n A fault against the dead, a fault to nature,\n To reason most absurd: whose common theme\n Is death of fathers, and who still hath cried,\n From the first corse till he that died to-day,\n 'This must be so.' We pray you, throw to earth\n This unprevailing woe, and think of us\n As of a father: for let the world take note,\n You are the most immediate to our throne;\n And with no less nobility of love\n Than that which dearest father bears his son,\n Do I impart toward you. For your intent\n In going back to school in Wittenberg,\n It is most retrograde to our desire:\n And we beseech you, bend you to remain\n Here, in the cheer and comfort of our eye,\n Our chiefest courtier, cousin, and our son.\n\nQUEEN GERTRUDE\n\n Let not thy mother lose her prayers, Hamlet:\n I pray thee, stay with us; go not to Wittenberg.\n\nHAMLET\n\n I shall in all my best obey you, madam.\n\nKING CLAUDIUS\n\n Why, 'tis a loving and a fair reply:\n Be as ourself in Denmark. Madam, come;\n This gentle and unforced accord of Hamlet\n Sits smiling to my heart: in grace whereof,\n No jocund health that Denmark drinks to-day,\n But the great cannon to the clouds shall tell,\n And the king's rouse the heavens all bruit again,\n Re-speaking earthly thunder. Come away.\n\n Exeunt all but HAMLET\n\nHAMLET\n\n O, that this too too solid flesh would melt\n Thaw and resolve itself into a dew!\n Or that the Everlasting had not fix'd\n His canon 'gainst self-slaughter! O God! God!\n How weary, stale, flat and unprofitable,\n Seem to me all the uses of this world!\n Fie on't! ah fie! 'tis an unweeded garden,\n That grows to seed; things rank and gross in nature\n Possess it merely. That it should come to this!\n But two months dead: nay, not so much, not two:\n So excellent a king; that was, to this,\n Hyperion to a satyr; so loving to my mother\n That he might not beteem the winds of heaven\n Visit her face too roughly. Heaven and earth!\n Must I remember? why, she would hang on him,\n As if increase of appetite had grown\n By what it fed on: and yet, within a month--\n Let me not think on't--Frailty, thy name is woman!--\n A little month, or ere those shoes were old\n With which she follow'd my poor father's body,\n Like Niobe, all tears:--why she, even she--\n O, God! a beast, that wants discourse of reason,\n Would have mourn'd longer--married with my uncle,\n My father's brother, but no more like my father\n Than I to Hercules: within a month:\n Ere yet the salt of most unrighteous tears\n Had left the flushing in her galled eyes,\n She married. O, most wicked speed, to post\n With such dexterity to incestuous sheets!\n It is not nor it cannot come to good:\n But break, my heart; for I must hold my tongue.\n\n Enter HORATIO, MARCELLUS, and BERNARDO\n\nHORATIO\n\n Hail to your lordship!\n\nHAMLET\n\n I am glad to see you well:\n Horatio,--or I do forget myself.\n\nHORATIO\n\n The same, my lord, and your poor servant ever.\n\nHAMLET\n\n Sir, my good friend; I'll change that name with you:\n And what make you from Wittenberg, Horatio? Marcellus?\n\nMARCELLUS\n\n My good lord--\n\nHAMLET\n\n I am very glad to see you. Good even, sir.\n But what, in faith, make you from Wittenberg?\n\nHORATIO\n\n A truant disposition, good my lord.\n\nHAMLET\n\n I would not hear your enemy say so,\n Nor shall you do mine ear that violence,\n To make it truster of your own report\n Against yourself: I know you are no truant.\n But what is your affair in Elsinore?\n We'll teach you to drink deep ere you depart.\n\nHORATIO\n\n My lord, I came to see your father's funeral.\n\nHAMLET\n\n I pray thee, do not mock me, fellow-student;\n I think it was to see my mother's wedding.\n\nHORATIO\n\n Indeed, my lord, it follow'd hard upon.\n\nHAMLET\n\n Thrift, thrift, Horatio! the funeral baked meats\n Did coldly furnish forth the marriage tables.\n Would I had met my dearest foe in heaven\n Or ever I had seen that day, Horatio!\n My father!--methinks I see my father.\n\nHORATIO\n\n Where, my lord?\n\nHAMLET\n\n In my mind's eye, Horatio.\n\nHORATIO\n\n I saw him once; he was a goodly king.\n\nHAMLET\n\n He was a man, take him for all in all,\n I shall not look upon his like again.\n\nHORATIO\n\n My lord, I think I saw him yesternight.\n\nHAMLET\n\n Saw? who?\n\nHORATIO\n\n My lord, the king your father.\n\nHAMLET\n\n The king my father!\n\nHORATIO\n\n Season your admiration for awhile\n With an attent ear, till I may deliver,\n Upon the witness of these gentlemen,\n This marvel to you.\n\nHAMLET\n\n For God's love, let me hear.\n\nHORATIO\n\n Two nights together had these gentlemen,\n Marcellus and Bernardo, on their watch,\n In the dead vast and middle of the night,\n Been thus encounter'd. A figure like your father,\n Armed at point exactly, cap-a-pe,\n Appears before them, and with solemn march\n Goes slow and stately by them: thrice he walk'd\n By their oppress'd and fear-surprised eyes,\n Within his truncheon's length; whilst they, distilled\n Almost to jelly with the act of fear,\n Stand dumb and speak not to him. This to me\n In dreadful secrecy impart they did;\n And I with them the third night kept the watch;\n Where, as they had deliver'd, both in time,\n Form of the thing, each word made true and good,\n The apparition comes: I knew your father;\n These hands are not more like.\n\nHAMLET\n\n But where was this?\n\nMARCELLUS\n\n My lord, upon the platform where we watch'd.\n\nHAMLET\n\n Did you not speak to it?\n\nHORATIO\n\n My lord, I did;\n But answer made it none: yet once methought\n It lifted up its head and did address\n Itself to motion, like as it would speak;\n But even then the morning cock crew loud,\n And at the sound it shrunk in haste away,\n And vanish'd from our sight.\n\nHAMLET\n\n 'Tis very strange.\n\nHORATIO\n\n As I do live, my honour'd lord, 'tis true;\n And we did think it writ down in our duty\n To let you know of it.\n\nHAMLET\n\n Indeed, indeed, sirs, but this troubles me.\n Hold you the watch to-night?\n\nMARCELLUS BERNARDO\n\n We do, my lord.\n\nHAMLET\n\n Arm'd, say you?\n\nMARCELLUS BERNARDO\n\n Arm'd, my lord.\n\nHAMLET\n\n From top to toe?\n\nMARCELLUS BERNARDO\n\n My lord, from head to foot.\n\nHAMLET\n\n Then saw you not his face?\n\nHORATIO\n\n O, yes, my lord; he wore his beaver up.\n\nHAMLET\n\n What, look'd he frowningly?\n\nHORATIO\n\n A countenance more in sorrow than in anger.\n\nHAMLET\n\n Pale or red?\n\nHORATIO\n\n Nay, very pale.\n\nHAMLET\n\n And fix'd his eyes upon you?\n\nHORATIO\n\n Most constantly.\n\nHAMLET\n\n I would I had been there.\n\nHORATIO\n\n It would have much amazed you.\n\nHAMLET\n\n Very like, very like. Stay'd it long?\n\nHORATIO\n\n While one with moderate haste might tell a hundred.\n\nMARCELLUS BERNARDO\n\n Longer, longer.\n\nHORATIO\n\n Not when I saw't.\n\nHAMLET\n\n His beard was grizzled--no?\n\nHORATIO\n\n It was, as I have seen it in his life,\n A sable silver'd.\n\nHAMLET\n\n I will watch to-night;\n Perchance 'twill walk again.\n\nHORATIO\n\n I warrant it will.\n\nHAMLET\n\n If it assume my noble father's person,\n I'll speak to it, though hell itself should gape\n And bid me hold my peace. I pray you all,\n If you have hitherto conceal'd this sight,\n Let it be tenable in your silence still;\n And whatsoever else shall hap to-night,\n Give it an understanding, but no tongue:\n I will requite your loves. So, fare you well:\n Upon the platform, 'twixt eleven and twelve,\n I'll visit you.\n\nAll\n\n Our duty to your honour.\n\nHAMLET\n\n Your loves, as mine to you: farewell.\n\n Exeunt all but HAMLET\n My father's spirit in arms! all is not well;\n I doubt some foul play: would the night were come!\n Till then sit still, my soul: foul deeds will rise,\n Though all the earth o'erwhelm them, to men's eyes.\n\n Exit\n\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/readlink.wasm b/tests/wasi-wast/wasi/snapshot1/readlink.wasm index 232e1644783..1ced3477992 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/readlink.wasm and b/tests/wasi-wast/wasi/snapshot1/readlink.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/readlink.wast b/tests/wasi-wast/wasi/snapshot1/readlink.wast index 02b642d01dd..6eb1ffc445b 100644 --- a/tests/wasi-wast/wasi/snapshot1/readlink.wast +++ b/tests/wasi-wast/wasi/snapshot1/readlink.wast @@ -4,5 +4,5 @@ (preopens "test_fs") (assert_return (i64.const 0)) (assert_stdout "true\n../act1/scene2.txt\nSCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELI\n") - (assert_stderr "[/Users/mark/wasi-tests/wasi/tests/readlink.rs:10] &p = \"test_fs/hamlet/bookmarks/2019-07-16\"\n") + (assert_stderr "[/Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/readlink.rs:10] &p = \"test_fs/hamlet/bookmarks/2019-07-16\"\n") ) diff --git a/tests/wasi-wast/wasi/snapshot1/unix_open_special_files.wasm b/tests/wasi-wast/wasi/snapshot1/unix_open_special_files.wasm index 68382fe5ec6..22854ed65ae 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/unix_open_special_files.wasm and b/tests/wasi-wast/wasi/snapshot1/unix_open_special_files.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/wasi_sees_virtual_root.wasm b/tests/wasi-wast/wasi/snapshot1/wasi_sees_virtual_root.wasm index 8b5ab8ef951..1c7ce6821f8 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/wasi_sees_virtual_root.wasm and b/tests/wasi-wast/wasi/snapshot1/wasi_sees_virtual_root.wasm differ diff --git a/tests/wasi-wast/wasi/snapshot1/writing.wasm b/tests/wasi-wast/wasi/snapshot1/writing.wasm index d1c9e04e034..35c43d46035 100755 Binary files a/tests/wasi-wast/wasi/snapshot1/writing.wasm and b/tests/wasi-wast/wasi/snapshot1/writing.wasm differ diff --git a/tests/wasi-wast/wasi/tests/fd_rights.rs b/tests/wasi-wast/wasi/tests/fd_rights.rs new file mode 100644 index 00000000000..33a05c4f367 --- /dev/null +++ b/tests/wasi-wast/wasi/tests/fd_rights.rs @@ -0,0 +1,19 @@ +use std::io::{Read, Write}; + +fn main() { + let readdir = std::fs::read_dir("/").unwrap(); + let files = readdir.collect::>(); + assert!(files.is_empty()); + + let mut filehandle = std::fs::OpenOptions::new() + .read(false) // <- should only be writeable, not readable + .write(true) + .create(true) + .open("foo.txt") + .unwrap(); + + filehandle.write_all(b"test"); + + let mut contents = String::new(); + assert!(filehandle.read_to_string(&mut contents).is_err()); +} \ No newline at end of file diff --git a/tests/wasi-wast/wasi/unstable/close_preopen_fd.wasm b/tests/wasi-wast/wasi/unstable/close_preopen_fd.wasm index 90e80c147a5..b5069e94468 100755 Binary files a/tests/wasi-wast/wasi/unstable/close_preopen_fd.wasm and b/tests/wasi-wast/wasi/unstable/close_preopen_fd.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/create_dir.wasm b/tests/wasi-wast/wasi/unstable/create_dir.wasm index 17c45235f64..68cc3992cca 100755 Binary files a/tests/wasi-wast/wasi/unstable/create_dir.wasm and b/tests/wasi-wast/wasi/unstable/create_dir.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/envvar.wasm b/tests/wasi-wast/wasi/unstable/envvar.wasm index bb2fc016e6d..350d918fe66 100755 Binary files a/tests/wasi-wast/wasi/unstable/envvar.wasm and b/tests/wasi-wast/wasi/unstable/envvar.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_allocate.wasm b/tests/wasi-wast/wasi/unstable/fd_allocate.wasm index ac4c27424d9..dacbcc17894 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_allocate.wasm and b/tests/wasi-wast/wasi/unstable/fd_allocate.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_append.wasm b/tests/wasi-wast/wasi/unstable/fd_append.wasm index 79164f4a060..af207855d9c 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_append.wasm and b/tests/wasi-wast/wasi/unstable/fd_append.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_append.wast b/tests/wasi-wast/wasi/unstable/fd_append.wast index 1c973ce41c9..c0063884a42 100644 --- a/tests/wasi-wast/wasi/unstable/fd_append.wast +++ b/tests/wasi-wast/wasi/unstable/fd_append.wast @@ -2,6 +2,6 @@ (wasi_test "fd_append.wasm" (temp_dirs ".") - (assert_return (i64.const 0)) - (assert_stdout "\"Hello, world!\\nGoodbye, world!\\n\"\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Couldn't create file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/fd_append.rs:27:14\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/unstable/fd_close.wasm b/tests/wasi-wast/wasi/unstable/fd_close.wasm index 1b1e41d0aea..d9bf61e2faa 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_close.wasm and b/tests/wasi-wast/wasi/unstable/fd_close.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_pread.wasm b/tests/wasi-wast/wasi/unstable/fd_pread.wasm index cb8ceaf4b5e..62915f9724d 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_pread.wasm and b/tests/wasi-wast/wasi/unstable/fd_pread.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_read.wasm b/tests/wasi-wast/wasi/unstable/fd_read.wasm index c4be2f4f9b9..5c1a9fe7b78 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_read.wasm and b/tests/wasi-wast/wasi/unstable/fd_read.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_read.wast b/tests/wasi-wast/wasi/unstable/fd_read.wast index 70f4acf5613..23bbb15c1c5 100644 --- a/tests/wasi-wast/wasi/unstable/fd_read.wast +++ b/tests/wasi-wast/wasi/unstable/fd_read.wast @@ -3,5 +3,5 @@ (wasi_test "fd_read.wasm" (map_dirs ".:test_fs/hamlet") (assert_return (i64.const 0)) - (assert_stdout "SCENE IV. The Queen\'s closet.\n\n Enter QUEEN GERTRUDE and POLO\n") + (assert_stdout "SCENE IV. The Queen's closet.\n\n Enter QUEEN GERTRUDE and POLO\n") ) diff --git a/tests/wasi-wast/wasi/unstable/fd_rename_path.wasm b/tests/wasi-wast/wasi/unstable/fd_rename_path.wasm new file mode 100755 index 00000000000..a88d1bfe000 Binary files /dev/null and b/tests/wasi-wast/wasi/unstable/fd_rename_path.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_rename_path.wast b/tests/wasi-wast/wasi/unstable/fd_rename_path.wast new file mode 100644 index 00000000000..fd3e59714b3 --- /dev/null +++ b/tests/wasi-wast/wasi/unstable/fd_rename_path.wast @@ -0,0 +1,6 @@ +;; This file was generated by https://github.com/wasmerio/wasi-tests + +(wasi_test "fd_rename_path.wasm" + (preopens "test_fs") + (assert_return (i64.const 0)) +) diff --git a/tests/wasi-wast/wasi/unstable/fd_rights.wasm b/tests/wasi-wast/wasi/unstable/fd_rights.wasm new file mode 100755 index 00000000000..0694700ebaa Binary files /dev/null and b/tests/wasi-wast/wasi/unstable/fd_rights.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fd_rights.wast b/tests/wasi-wast/wasi/unstable/fd_rights.wast new file mode 100644 index 00000000000..e8c6b51ac5a --- /dev/null +++ b/tests/wasi-wast/wasi/unstable/fd_rights.wast @@ -0,0 +1,6 @@ +;; This file was generated by https://github.com/wasmerio/wasi-tests + +(wasi_test "fd_rights.wasm" + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'assertion failed: files.is_empty()', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/fd_rights.rs:6:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") +) diff --git a/tests/wasi-wast/wasi/unstable/fd_sync.wasm b/tests/wasi-wast/wasi/unstable/fd_sync.wasm index 90b811e06c2..b3e215aada1 100755 Binary files a/tests/wasi-wast/wasi/unstable/fd_sync.wasm and b/tests/wasi-wast/wasi/unstable/fd_sync.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/file_metadata.wasm b/tests/wasi-wast/wasi/unstable/file_metadata.wasm index d817d1911f8..dda278324ab 100755 Binary files a/tests/wasi-wast/wasi/unstable/file_metadata.wasm and b/tests/wasi-wast/wasi/unstable/file_metadata.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fs_sandbox_test.wasm b/tests/wasi-wast/wasi/unstable/fs_sandbox_test.wasm index cb8d4b0bf3b..31f741e0f6c 100755 Binary files a/tests/wasi-wast/wasi/unstable/fs_sandbox_test.wasm and b/tests/wasi-wast/wasi/unstable/fs_sandbox_test.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fseek.wasm b/tests/wasi-wast/wasi/unstable/fseek.wasm index 37682667307..bc1f326095e 100755 Binary files a/tests/wasi-wast/wasi/unstable/fseek.wasm and b/tests/wasi-wast/wasi/unstable/fseek.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/fseek.wast b/tests/wasi-wast/wasi/unstable/fseek.wast index fb4c1b1c62a..f9e9ba70a8a 100644 --- a/tests/wasi-wast/wasi/unstable/fseek.wast +++ b/tests/wasi-wast/wasi/unstable/fseek.wast @@ -3,5 +3,5 @@ (wasi_test "fseek.wasm" (map_dirs ".:test_fs/hamlet") (assert_return (i64.const 0)) - (assert_stdout "SCENE III. A room in Polonius\' h\nouse.\n\n Enter LAERTES and OPH\n And, sister, as the winds gi\nr talk with the Lord Hamlet.\n \nuits,\n Breathing like sanctif\nis is for all:\n I would not, \n") + (assert_stdout "SCENE III. A room in Polonius' h\nouse.\n\n Enter LAERTES and OPH\n And, sister, as the winds gi\nr talk with the Lord Hamlet.\n \nuits,\n Breathing like sanctif\nis is for all:\n I would not, \n") ) diff --git a/tests/wasi-wast/wasi/unstable/hello.wasm b/tests/wasi-wast/wasi/unstable/hello.wasm index ca8a2ff0b05..1fb2aabeccd 100755 Binary files a/tests/wasi-wast/wasi/unstable/hello.wasm and b/tests/wasi-wast/wasi/unstable/hello.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/isatty.wasm b/tests/wasi-wast/wasi/unstable/isatty.wasm index 13eb63f9fa3..20b45b32e7d 100755 Binary files a/tests/wasi-wast/wasi/unstable/isatty.wasm and b/tests/wasi-wast/wasi/unstable/isatty.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/mapdir.wasm b/tests/wasi-wast/wasi/unstable/mapdir.wasm index fb5ddecb87d..ea2df9d2e22 100755 Binary files a/tests/wasi-wast/wasi/unstable/mapdir.wasm and b/tests/wasi-wast/wasi/unstable/mapdir.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/mapdir_with_leading_slash.wasm b/tests/wasi-wast/wasi/unstable/mapdir_with_leading_slash.wasm old mode 100644 new mode 100755 index eacc71d81e3..5394a727655 Binary files a/tests/wasi-wast/wasi/unstable/mapdir_with_leading_slash.wasm and b/tests/wasi-wast/wasi/unstable/mapdir_with_leading_slash.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/path_link.wasm b/tests/wasi-wast/wasi/unstable/path_link.wasm index 6b1bdd3dfe4..332c2a3aee7 100755 Binary files a/tests/wasi-wast/wasi/unstable/path_link.wasm and b/tests/wasi-wast/wasi/unstable/path_link.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/path_rename.wasm b/tests/wasi-wast/wasi/unstable/path_rename.wasm index 5945204f8e1..1afe6bd0029 100755 Binary files a/tests/wasi-wast/wasi/unstable/path_rename.wasm and b/tests/wasi-wast/wasi/unstable/path_rename.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/path_symlink.wasm b/tests/wasi-wast/wasi/unstable/path_symlink.wasm index ac2ca09d6d3..ce1baf87388 100755 Binary files a/tests/wasi-wast/wasi/unstable/path_symlink.wasm and b/tests/wasi-wast/wasi/unstable/path_symlink.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/path_symlink.wast b/tests/wasi-wast/wasi/unstable/path_symlink.wast index b80fb88cde2..111f88dcc54 100644 --- a/tests/wasi-wast/wasi/unstable/path_symlink.wast +++ b/tests/wasi-wast/wasi/unstable/path_symlink.wast @@ -3,6 +3,6 @@ (wasi_test "path_symlink.wasm" (map_dirs "hamlet:test_fs/hamlet") (temp_dirs "temp") - (assert_return (i64.const 0)) - (assert_stdout "ACT III\nSCENE I. A room in the castle.\n\n Enter KING CLAUDIUS,\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Could not open file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/path_symlink.rs:21:44\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/unstable/pipe_reverse.wasm b/tests/wasi-wast/wasi/unstable/pipe_reverse.wasm index ba13ab72d9f..88bc31980ad 100755 Binary files a/tests/wasi-wast/wasi/unstable/pipe_reverse.wasm and b/tests/wasi-wast/wasi/unstable/pipe_reverse.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/poll_oneoff.wasm b/tests/wasi-wast/wasi/unstable/poll_oneoff.wasm index 5ee474c465c..e6a42f4b6c3 100755 Binary files a/tests/wasi-wast/wasi/unstable/poll_oneoff.wasm and b/tests/wasi-wast/wasi/unstable/poll_oneoff.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/poll_oneoff.wast b/tests/wasi-wast/wasi/unstable/poll_oneoff.wast index ebac8774f0d..377ad038147 100644 --- a/tests/wasi-wast/wasi/unstable/poll_oneoff.wast +++ b/tests/wasi-wast/wasi/unstable/poll_oneoff.wast @@ -3,6 +3,6 @@ (wasi_test "poll_oneoff.wasm" (map_dirs "hamlet:test_fs/hamlet") (temp_dirs "temp") - (assert_return (i64.const 0)) - (assert_stdout "__wasi_event_t { userdata: 1193046, error: 0, type_: 1, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 2259, flags: 0 } } }\n[__wasi_event_t { userdata: 1193046, error: 0, type_: 1, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 2259, flags: 0 } } }, __wasi_event_t { userdata: 1193046, error: 0, type_: 2, u: __wasi_event_u { __wasi_event_fd_readwrite_t { nbytes: 1234, flags: 0 } } }]\nStdin: OK\nStdout: OK\nStderr: OK\n") + (assert_return (i64.const 101)) + (assert_stderr "thread 'main' panicked at 'Could not open file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/poll_oneoff.rs:155:14\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n") ) diff --git a/tests/wasi-wast/wasi/unstable/quine.wasm b/tests/wasi-wast/wasi/unstable/quine.wasm index 19dc2eeb93a..99dc8330476 100755 Binary files a/tests/wasi-wast/wasi/unstable/quine.wasm and b/tests/wasi-wast/wasi/unstable/quine.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/quine.wast b/tests/wasi-wast/wasi/unstable/quine.wast index 26d4c41dc3f..c45d16b6688 100644 --- a/tests/wasi-wast/wasi/unstable/quine.wast +++ b/tests/wasi-wast/wasi/unstable/quine.wast @@ -3,5 +3,5 @@ (wasi_test "quine.wasm" (preopens "test_fs") (assert_return (i64.const 0)) - (assert_stdout "SCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants \n\nKING CLAUDIUS\n\n Though yet of Hamlet our dear brother\'s death\n The memory be green, and that it us befitted\n To bear our hearts in grief and our whole kingdom\n To be contracted in one brow of woe,\n Yet so far hath discretion fought with nature\n That we with wisest sorrow think on him,\n Together with remembrance of ourselves.\n Therefore our sometime sister, now our queen,\n The imperial jointress to this warlike state,\n Have we, as \'twere with a defeated joy,--\n With an auspicious and a dropping eye,\n With mirth in funeral and with dirge in marriage,\n In equal scale weighing delight and dole,--\n Taken to wife: nor have we herein barr\'d\n Your better wisdoms, which have freely gone\n With this affair along. For all, our thanks.\n Now follows, that you know, young Fortinbras,\n Holding a weak supposal of our worth,\n Or thinking by our late dear brother\'s death\n Our state to be disjoint and out of frame,\n Colleagued with the dream of his advantage,\n He hath not fail\'d to pester us with message,\n Importing the surrender of those lands\n Lost by his father, with all bonds of law,\n To our most valiant brother. So much for him.\n Now for ourself and for this time of meeting:\n Thus much the business is: we have here writ\n To Norway, uncle of young Fortinbras,--\n Who, impotent and bed-rid, scarcely hears\n Of this his nephew\'s purpose,--to suppress\n His further gait herein; in that the levies,\n The lists and full proportions, are all made\n Out of his subject: and we here dispatch\n You, good Cornelius, and you, Voltimand,\n For bearers of this greeting to old Norway;\n Giving to you no further personal power\n To business with the king, more than the scope\n Of these delated articles allow.\n Farewell, and let your haste commend your duty.\n\nCORNELIUS VOLTIMAND\n\n In that and all things will we show our duty.\n\nKING CLAUDIUS\n\n We doubt it nothing: heartily farewell.\n\n Exeunt VOLTIMAND and CORNELIUS\n And now, Laertes, what\'s the news with you?\n You told us of some suit; what is\'t, Laertes?\n You cannot speak of reason to the Dane,\n And loose your voice: what wouldst thou beg, Laertes,\n That shall not be my offer, not thy asking?\n The head is not more native to the heart,\n The hand more instrumental to the mouth,\n Than is the throne of Denmark to thy father.\n What wouldst thou have, Laertes?\n\nLAERTES\n\n My dread lord,\n Your leave and favour to return to France;\n From whence though willingly I came to Denmark,\n To show my duty in your coronation,\n Yet now, I must confess, that duty done,\n My thoughts and wishes bend again toward France\n And bow them to your gracious leave and pardon.\n\nKING CLAUDIUS\n\n Have you your father\'s leave? What says Polonius?\n\nLORD POLONIUS\n\n He hath, my lord, wrung from me my slow leave\n By laboursome petition, and at last\n Upon his will I seal\'d my hard consent:\n I do beseech you, give him leave to go.\n\nKING CLAUDIUS\n\n Take thy fair hour, Laertes; time be thine,\n And thy best graces spend it at thy will!\n But now, my cousin Hamlet, and my son,--\n\nHAMLET\n\n [Aside] A little more than kin, and less than kind.\n\nKING CLAUDIUS\n\n How is it that the clouds still hang on you?\n\nHAMLET\n\n Not so, my lord; I am too much i\' the sun.\n\nQUEEN GERTRUDE\n\n Good Hamlet, cast thy nighted colour off,\n And let thine eye look like a friend on Denmark.\n Do not for ever with thy vailed lids\n Seek for thy noble father in the dust:\n Thou know\'st \'tis common; all that lives must die,\n Passing through nature to eternity.\n\nHAMLET\n\n Ay, madam, it is common.\n\nQUEEN GERTRUDE\n\n If it be,\n Why seems it so particular with thee?\n\nHAMLET\n\n Seems, madam! nay it is; I know not \'seems.\'\n \'Tis not alone my inky cloak, good mother,\n Nor customary suits of solemn black,\n Nor windy suspiration of forced breath,\n No, nor the fruitful river in the eye,\n Nor the dejected \'havior of the visage,\n Together with all forms, moods, shapes of grief,\n That can denote me truly: these indeed seem,\n For they are actions that a man might play:\n But I have that within which passeth show;\n These but the trappings and the suits of woe.\n\nKING CLAUDIUS\n\n \'Tis sweet and commendable in your nature, Hamlet,\n To give these mourning duties to your father:\n But, you must know, your father lost a father;\n That father lost, lost his, and the survivor bound\n In filial obligation for some term\n To do obsequious sorrow: but to persever\n In obstinate condolement is a course\n Of impious stubbornness; \'tis unmanly grief;\n It shows a will most incorrect to heaven,\n A heart unfortified, a mind impatient,\n An understanding simple and unschool\'d:\n For what we know must be and is as common\n As any the most vulgar thing to sense,\n Why should we in our peevish opposition\n Take it to heart? Fie! \'tis a fault to heaven,\n A fault against the dead, a fault to nature,\n To reason most absurd: whose common theme\n Is death of fathers, and who still hath cried,\n From the first corse till he that died to-day,\n \'This must be so.\' We pray you, throw to earth\n This unprevailing woe, and think of us\n As of a father: for let the world take note,\n You are the most immediate to our throne;\n And with no less nobility of love\n Than that which dearest father bears his son,\n Do I impart toward you. For your intent\n In going back to school in Wittenberg,\n It is most retrograde to our desire:\n And we beseech you, bend you to remain\n Here, in the cheer and comfort of our eye,\n Our chiefest courtier, cousin, and our son.\n\nQUEEN GERTRUDE\n\n Let not thy mother lose her prayers, Hamlet:\n I pray thee, stay with us; go not to Wittenberg.\n\nHAMLET\n\n I shall in all my best obey you, madam.\n\nKING CLAUDIUS\n\n Why, \'tis a loving and a fair reply:\n Be as ourself in Denmark. Madam, come;\n This gentle and unforced accord of Hamlet\n Sits smiling to my heart: in grace whereof,\n No jocund health that Denmark drinks to-day,\n But the great cannon to the clouds shall tell,\n And the king\'s rouse the heavens all bruit again,\n Re-speaking earthly thunder. Come away.\n\n Exeunt all but HAMLET\n\nHAMLET\n\n O, that this too too solid flesh would melt\n Thaw and resolve itself into a dew!\n Or that the Everlasting had not fix\'d\n His canon \'gainst self-slaughter! O God! God!\n How weary, stale, flat and unprofitable,\n Seem to me all the uses of this world!\n Fie on\'t! ah fie! \'tis an unweeded garden,\n That grows to seed; things rank and gross in nature\n Possess it merely. That it should come to this!\n But two months dead: nay, not so much, not two:\n So excellent a king; that was, to this,\n Hyperion to a satyr; so loving to my mother\n That he might not beteem the winds of heaven\n Visit her face too roughly. Heaven and earth!\n Must I remember? why, she would hang on him,\n As if increase of appetite had grown\n By what it fed on: and yet, within a month--\n Let me not think on\'t--Frailty, thy name is woman!--\n A little month, or ere those shoes were old\n With which she follow\'d my poor father\'s body,\n Like Niobe, all tears:--why she, even she--\n O, God! a beast, that wants discourse of reason,\n Would have mourn\'d longer--married with my uncle,\n My father\'s brother, but no more like my father\n Than I to Hercules: within a month:\n Ere yet the salt of most unrighteous tears\n Had left the flushing in her galled eyes,\n She married. O, most wicked speed, to post\n With such dexterity to incestuous sheets!\n It is not nor it cannot come to good:\n But break, my heart; for I must hold my tongue.\n\n Enter HORATIO, MARCELLUS, and BERNARDO\n\nHORATIO\n\n Hail to your lordship!\n\nHAMLET\n\n I am glad to see you well:\n Horatio,--or I do forget myself.\n\nHORATIO\n\n The same, my lord, and your poor servant ever.\n\nHAMLET\n\n Sir, my good friend; I\'ll change that name with you:\n And what make you from Wittenberg, Horatio? Marcellus?\n\nMARCELLUS\n\n My good lord--\n\nHAMLET\n\n I am very glad to see you. Good even, sir.\n But what, in faith, make you from Wittenberg?\n\nHORATIO\n\n A truant disposition, good my lord.\n\nHAMLET\n\n I would not hear your enemy say so,\n Nor shall you do mine ear that violence,\n To make it truster of your own report\n Against yourself: I know you are no truant.\n But what is your affair in Elsinore?\n We\'ll teach you to drink deep ere you depart.\n\nHORATIO\n\n My lord, I came to see your father\'s funeral.\n\nHAMLET\n\n I pray thee, do not mock me, fellow-student;\n I think it was to see my mother\'s wedding.\n\nHORATIO\n\n Indeed, my lord, it follow\'d hard upon.\n\nHAMLET\n\n Thrift, thrift, Horatio! the funeral baked meats\n Did coldly furnish forth the marriage tables.\n Would I had met my dearest foe in heaven\n Or ever I had seen that day, Horatio!\n My father!--methinks I see my father.\n\nHORATIO\n\n Where, my lord?\n\nHAMLET\n\n In my mind\'s eye, Horatio.\n\nHORATIO\n\n I saw him once; he was a goodly king.\n\nHAMLET\n\n He was a man, take him for all in all,\n I shall not look upon his like again.\n\nHORATIO\n\n My lord, I think I saw him yesternight.\n\nHAMLET\n\n Saw? who?\n\nHORATIO\n\n My lord, the king your father.\n\nHAMLET\n\n The king my father!\n\nHORATIO\n\n Season your admiration for awhile\n With an attent ear, till I may deliver,\n Upon the witness of these gentlemen,\n This marvel to you.\n\nHAMLET\n\n For God\'s love, let me hear.\n\nHORATIO\n\n Two nights together had these gentlemen,\n Marcellus and Bernardo, on their watch,\n In the dead vast and middle of the night,\n Been thus encounter\'d. A figure like your father,\n Armed at point exactly, cap-a-pe,\n Appears before them, and with solemn march\n Goes slow and stately by them: thrice he walk\'d\n By their oppress\'d and fear-surprised eyes,\n Within his truncheon\'s length; whilst they, distilled\n Almost to jelly with the act of fear,\n Stand dumb and speak not to him. This to me\n In dreadful secrecy impart they did;\n And I with them the third night kept the watch;\n Where, as they had deliver\'d, both in time,\n Form of the thing, each word made true and good,\n The apparition comes: I knew your father;\n These hands are not more like.\n\nHAMLET\n\n But where was this?\n\nMARCELLUS\n\n My lord, upon the platform where we watch\'d.\n\nHAMLET\n\n Did you not speak to it?\n\nHORATIO\n\n My lord, I did;\n But answer made it none: yet once methought\n It lifted up its head and did address\n Itself to motion, like as it would speak;\n But even then the morning cock crew loud,\n And at the sound it shrunk in haste away,\n And vanish\'d from our sight.\n\nHAMLET\n\n \'Tis very strange.\n\nHORATIO\n\n As I do live, my honour\'d lord, \'tis true;\n And we did think it writ down in our duty\n To let you know of it.\n\nHAMLET\n\n Indeed, indeed, sirs, but this troubles me.\n Hold you the watch to-night?\n\nMARCELLUS BERNARDO\n\n We do, my lord.\n\nHAMLET\n\n Arm\'d, say you?\n\nMARCELLUS BERNARDO\n\n Arm\'d, my lord.\n\nHAMLET\n\n From top to toe?\n\nMARCELLUS BERNARDO\n\n My lord, from head to foot.\n\nHAMLET\n\n Then saw you not his face?\n\nHORATIO\n\n O, yes, my lord; he wore his beaver up.\n\nHAMLET\n\n What, look\'d he frowningly?\n\nHORATIO\n\n A countenance more in sorrow than in anger.\n\nHAMLET\n\n Pale or red?\n\nHORATIO\n\n Nay, very pale.\n\nHAMLET\n\n And fix\'d his eyes upon you?\n\nHORATIO\n\n Most constantly.\n\nHAMLET\n\n I would I had been there.\n\nHORATIO\n\n It would have much amazed you.\n\nHAMLET\n\n Very like, very like. Stay\'d it long?\n\nHORATIO\n\n While one with moderate haste might tell a hundred.\n\nMARCELLUS BERNARDO\n\n Longer, longer.\n\nHORATIO\n\n Not when I saw\'t.\n\nHAMLET\n\n His beard was grizzled--no?\n\nHORATIO\n\n It was, as I have seen it in his life,\n A sable silver\'d.\n\nHAMLET\n\n I will watch to-night;\n Perchance \'twill walk again.\n\nHORATIO\n\n I warrant it will.\n\nHAMLET\n\n If it assume my noble father\'s person,\n I\'ll speak to it, though hell itself should gape\n And bid me hold my peace. I pray you all,\n If you have hitherto conceal\'d this sight,\n Let it be tenable in your silence still;\n And whatsoever else shall hap to-night,\n Give it an understanding, but no tongue:\n I will requite your loves. So, fare you well:\n Upon the platform, \'twixt eleven and twelve,\n I\'ll visit you.\n\nAll\n\n Our duty to your honour.\n\nHAMLET\n\n Your loves, as mine to you: farewell.\n\n Exeunt all but HAMLET\n My father\'s spirit in arms! all is not well;\n I doubt some foul play: would the night were come!\n Till then sit still, my soul: foul deeds will rise,\n Though all the earth o\'erwhelm them, to men\'s eyes.\n\n Exit\n\n") + (assert_stdout "SCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants \n\nKING CLAUDIUS\n\n Though yet of Hamlet our dear brother's death\n The memory be green, and that it us befitted\n To bear our hearts in grief and our whole kingdom\n To be contracted in one brow of woe,\n Yet so far hath discretion fought with nature\n That we with wisest sorrow think on him,\n Together with remembrance of ourselves.\n Therefore our sometime sister, now our queen,\n The imperial jointress to this warlike state,\n Have we, as 'twere with a defeated joy,--\n With an auspicious and a dropping eye,\n With mirth in funeral and with dirge in marriage,\n In equal scale weighing delight and dole,--\n Taken to wife: nor have we herein barr'd\n Your better wisdoms, which have freely gone\n With this affair along. For all, our thanks.\n Now follows, that you know, young Fortinbras,\n Holding a weak supposal of our worth,\n Or thinking by our late dear brother's death\n Our state to be disjoint and out of frame,\n Colleagued with the dream of his advantage,\n He hath not fail'd to pester us with message,\n Importing the surrender of those lands\n Lost by his father, with all bonds of law,\n To our most valiant brother. So much for him.\n Now for ourself and for this time of meeting:\n Thus much the business is: we have here writ\n To Norway, uncle of young Fortinbras,--\n Who, impotent and bed-rid, scarcely hears\n Of this his nephew's purpose,--to suppress\n His further gait herein; in that the levies,\n The lists and full proportions, are all made\n Out of his subject: and we here dispatch\n You, good Cornelius, and you, Voltimand,\n For bearers of this greeting to old Norway;\n Giving to you no further personal power\n To business with the king, more than the scope\n Of these delated articles allow.\n Farewell, and let your haste commend your duty.\n\nCORNELIUS VOLTIMAND\n\n In that and all things will we show our duty.\n\nKING CLAUDIUS\n\n We doubt it nothing: heartily farewell.\n\n Exeunt VOLTIMAND and CORNELIUS\n And now, Laertes, what's the news with you?\n You told us of some suit; what is't, Laertes?\n You cannot speak of reason to the Dane,\n And loose your voice: what wouldst thou beg, Laertes,\n That shall not be my offer, not thy asking?\n The head is not more native to the heart,\n The hand more instrumental to the mouth,\n Than is the throne of Denmark to thy father.\n What wouldst thou have, Laertes?\n\nLAERTES\n\n My dread lord,\n Your leave and favour to return to France;\n From whence though willingly I came to Denmark,\n To show my duty in your coronation,\n Yet now, I must confess, that duty done,\n My thoughts and wishes bend again toward France\n And bow them to your gracious leave and pardon.\n\nKING CLAUDIUS\n\n Have you your father's leave? What says Polonius?\n\nLORD POLONIUS\n\n He hath, my lord, wrung from me my slow leave\n By laboursome petition, and at last\n Upon his will I seal'd my hard consent:\n I do beseech you, give him leave to go.\n\nKING CLAUDIUS\n\n Take thy fair hour, Laertes; time be thine,\n And thy best graces spend it at thy will!\n But now, my cousin Hamlet, and my son,--\n\nHAMLET\n\n [Aside] A little more than kin, and less than kind.\n\nKING CLAUDIUS\n\n How is it that the clouds still hang on you?\n\nHAMLET\n\n Not so, my lord; I am too much i' the sun.\n\nQUEEN GERTRUDE\n\n Good Hamlet, cast thy nighted colour off,\n And let thine eye look like a friend on Denmark.\n Do not for ever with thy vailed lids\n Seek for thy noble father in the dust:\n Thou know'st 'tis common; all that lives must die,\n Passing through nature to eternity.\n\nHAMLET\n\n Ay, madam, it is common.\n\nQUEEN GERTRUDE\n\n If it be,\n Why seems it so particular with thee?\n\nHAMLET\n\n Seems, madam! nay it is; I know not 'seems.'\n 'Tis not alone my inky cloak, good mother,\n Nor customary suits of solemn black,\n Nor windy suspiration of forced breath,\n No, nor the fruitful river in the eye,\n Nor the dejected 'havior of the visage,\n Together with all forms, moods, shapes of grief,\n That can denote me truly: these indeed seem,\n For they are actions that a man might play:\n But I have that within which passeth show;\n These but the trappings and the suits of woe.\n\nKING CLAUDIUS\n\n 'Tis sweet and commendable in your nature, Hamlet,\n To give these mourning duties to your father:\n But, you must know, your father lost a father;\n That father lost, lost his, and the survivor bound\n In filial obligation for some term\n To do obsequious sorrow: but to persever\n In obstinate condolement is a course\n Of impious stubbornness; 'tis unmanly grief;\n It shows a will most incorrect to heaven,\n A heart unfortified, a mind impatient,\n An understanding simple and unschool'd:\n For what we know must be and is as common\n As any the most vulgar thing to sense,\n Why should we in our peevish opposition\n Take it to heart? Fie! 'tis a fault to heaven,\n A fault against the dead, a fault to nature,\n To reason most absurd: whose common theme\n Is death of fathers, and who still hath cried,\n From the first corse till he that died to-day,\n 'This must be so.' We pray you, throw to earth\n This unprevailing woe, and think of us\n As of a father: for let the world take note,\n You are the most immediate to our throne;\n And with no less nobility of love\n Than that which dearest father bears his son,\n Do I impart toward you. For your intent\n In going back to school in Wittenberg,\n It is most retrograde to our desire:\n And we beseech you, bend you to remain\n Here, in the cheer and comfort of our eye,\n Our chiefest courtier, cousin, and our son.\n\nQUEEN GERTRUDE\n\n Let not thy mother lose her prayers, Hamlet:\n I pray thee, stay with us; go not to Wittenberg.\n\nHAMLET\n\n I shall in all my best obey you, madam.\n\nKING CLAUDIUS\n\n Why, 'tis a loving and a fair reply:\n Be as ourself in Denmark. Madam, come;\n This gentle and unforced accord of Hamlet\n Sits smiling to my heart: in grace whereof,\n No jocund health that Denmark drinks to-day,\n But the great cannon to the clouds shall tell,\n And the king's rouse the heavens all bruit again,\n Re-speaking earthly thunder. Come away.\n\n Exeunt all but HAMLET\n\nHAMLET\n\n O, that this too too solid flesh would melt\n Thaw and resolve itself into a dew!\n Or that the Everlasting had not fix'd\n His canon 'gainst self-slaughter! O God! God!\n How weary, stale, flat and unprofitable,\n Seem to me all the uses of this world!\n Fie on't! ah fie! 'tis an unweeded garden,\n That grows to seed; things rank and gross in nature\n Possess it merely. That it should come to this!\n But two months dead: nay, not so much, not two:\n So excellent a king; that was, to this,\n Hyperion to a satyr; so loving to my mother\n That he might not beteem the winds of heaven\n Visit her face too roughly. Heaven and earth!\n Must I remember? why, she would hang on him,\n As if increase of appetite had grown\n By what it fed on: and yet, within a month--\n Let me not think on't--Frailty, thy name is woman!--\n A little month, or ere those shoes were old\n With which she follow'd my poor father's body,\n Like Niobe, all tears:--why she, even she--\n O, God! a beast, that wants discourse of reason,\n Would have mourn'd longer--married with my uncle,\n My father's brother, but no more like my father\n Than I to Hercules: within a month:\n Ere yet the salt of most unrighteous tears\n Had left the flushing in her galled eyes,\n She married. O, most wicked speed, to post\n With such dexterity to incestuous sheets!\n It is not nor it cannot come to good:\n But break, my heart; for I must hold my tongue.\n\n Enter HORATIO, MARCELLUS, and BERNARDO\n\nHORATIO\n\n Hail to your lordship!\n\nHAMLET\n\n I am glad to see you well:\n Horatio,--or I do forget myself.\n\nHORATIO\n\n The same, my lord, and your poor servant ever.\n\nHAMLET\n\n Sir, my good friend; I'll change that name with you:\n And what make you from Wittenberg, Horatio? Marcellus?\n\nMARCELLUS\n\n My good lord--\n\nHAMLET\n\n I am very glad to see you. Good even, sir.\n But what, in faith, make you from Wittenberg?\n\nHORATIO\n\n A truant disposition, good my lord.\n\nHAMLET\n\n I would not hear your enemy say so,\n Nor shall you do mine ear that violence,\n To make it truster of your own report\n Against yourself: I know you are no truant.\n But what is your affair in Elsinore?\n We'll teach you to drink deep ere you depart.\n\nHORATIO\n\n My lord, I came to see your father's funeral.\n\nHAMLET\n\n I pray thee, do not mock me, fellow-student;\n I think it was to see my mother's wedding.\n\nHORATIO\n\n Indeed, my lord, it follow'd hard upon.\n\nHAMLET\n\n Thrift, thrift, Horatio! the funeral baked meats\n Did coldly furnish forth the marriage tables.\n Would I had met my dearest foe in heaven\n Or ever I had seen that day, Horatio!\n My father!--methinks I see my father.\n\nHORATIO\n\n Where, my lord?\n\nHAMLET\n\n In my mind's eye, Horatio.\n\nHORATIO\n\n I saw him once; he was a goodly king.\n\nHAMLET\n\n He was a man, take him for all in all,\n I shall not look upon his like again.\n\nHORATIO\n\n My lord, I think I saw him yesternight.\n\nHAMLET\n\n Saw? who?\n\nHORATIO\n\n My lord, the king your father.\n\nHAMLET\n\n The king my father!\n\nHORATIO\n\n Season your admiration for awhile\n With an attent ear, till I may deliver,\n Upon the witness of these gentlemen,\n This marvel to you.\n\nHAMLET\n\n For God's love, let me hear.\n\nHORATIO\n\n Two nights together had these gentlemen,\n Marcellus and Bernardo, on their watch,\n In the dead vast and middle of the night,\n Been thus encounter'd. A figure like your father,\n Armed at point exactly, cap-a-pe,\n Appears before them, and with solemn march\n Goes slow and stately by them: thrice he walk'd\n By their oppress'd and fear-surprised eyes,\n Within his truncheon's length; whilst they, distilled\n Almost to jelly with the act of fear,\n Stand dumb and speak not to him. This to me\n In dreadful secrecy impart they did;\n And I with them the third night kept the watch;\n Where, as they had deliver'd, both in time,\n Form of the thing, each word made true and good,\n The apparition comes: I knew your father;\n These hands are not more like.\n\nHAMLET\n\n But where was this?\n\nMARCELLUS\n\n My lord, upon the platform where we watch'd.\n\nHAMLET\n\n Did you not speak to it?\n\nHORATIO\n\n My lord, I did;\n But answer made it none: yet once methought\n It lifted up its head and did address\n Itself to motion, like as it would speak;\n But even then the morning cock crew loud,\n And at the sound it shrunk in haste away,\n And vanish'd from our sight.\n\nHAMLET\n\n 'Tis very strange.\n\nHORATIO\n\n As I do live, my honour'd lord, 'tis true;\n And we did think it writ down in our duty\n To let you know of it.\n\nHAMLET\n\n Indeed, indeed, sirs, but this troubles me.\n Hold you the watch to-night?\n\nMARCELLUS BERNARDO\n\n We do, my lord.\n\nHAMLET\n\n Arm'd, say you?\n\nMARCELLUS BERNARDO\n\n Arm'd, my lord.\n\nHAMLET\n\n From top to toe?\n\nMARCELLUS BERNARDO\n\n My lord, from head to foot.\n\nHAMLET\n\n Then saw you not his face?\n\nHORATIO\n\n O, yes, my lord; he wore his beaver up.\n\nHAMLET\n\n What, look'd he frowningly?\n\nHORATIO\n\n A countenance more in sorrow than in anger.\n\nHAMLET\n\n Pale or red?\n\nHORATIO\n\n Nay, very pale.\n\nHAMLET\n\n And fix'd his eyes upon you?\n\nHORATIO\n\n Most constantly.\n\nHAMLET\n\n I would I had been there.\n\nHORATIO\n\n It would have much amazed you.\n\nHAMLET\n\n Very like, very like. Stay'd it long?\n\nHORATIO\n\n While one with moderate haste might tell a hundred.\n\nMARCELLUS BERNARDO\n\n Longer, longer.\n\nHORATIO\n\n Not when I saw't.\n\nHAMLET\n\n His beard was grizzled--no?\n\nHORATIO\n\n It was, as I have seen it in his life,\n A sable silver'd.\n\nHAMLET\n\n I will watch to-night;\n Perchance 'twill walk again.\n\nHORATIO\n\n I warrant it will.\n\nHAMLET\n\n If it assume my noble father's person,\n I'll speak to it, though hell itself should gape\n And bid me hold my peace. I pray you all,\n If you have hitherto conceal'd this sight,\n Let it be tenable in your silence still;\n And whatsoever else shall hap to-night,\n Give it an understanding, but no tongue:\n I will requite your loves. So, fare you well:\n Upon the platform, 'twixt eleven and twelve,\n I'll visit you.\n\nAll\n\n Our duty to your honour.\n\nHAMLET\n\n Your loves, as mine to you: farewell.\n\n Exeunt all but HAMLET\n My father's spirit in arms! all is not well;\n I doubt some foul play: would the night were come!\n Till then sit still, my soul: foul deeds will rise,\n Though all the earth o'erwhelm them, to men's eyes.\n\n Exit\n\n") ) diff --git a/tests/wasi-wast/wasi/unstable/readlink.wasm b/tests/wasi-wast/wasi/unstable/readlink.wasm index 0e4b3f5b3b6..9e00d1034be 100755 Binary files a/tests/wasi-wast/wasi/unstable/readlink.wasm and b/tests/wasi-wast/wasi/unstable/readlink.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/readlink.wast b/tests/wasi-wast/wasi/unstable/readlink.wast index 02b642d01dd..6eb1ffc445b 100644 --- a/tests/wasi-wast/wasi/unstable/readlink.wast +++ b/tests/wasi-wast/wasi/unstable/readlink.wast @@ -4,5 +4,5 @@ (preopens "test_fs") (assert_return (i64.const 0)) (assert_stdout "true\n../act1/scene2.txt\nSCENE II. A room of state in the castle.\n\n Enter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELI\n") - (assert_stderr "[/Users/mark/wasi-tests/wasi/tests/readlink.rs:10] &p = \"test_fs/hamlet/bookmarks/2019-07-16\"\n") + (assert_stderr "[/Users/fs/Development/wasmer/tests/wasi-wast/wasi/tests/readlink.rs:10] &p = \"test_fs/hamlet/bookmarks/2019-07-16\"\n") ) diff --git a/tests/wasi-wast/wasi/unstable/unix_open_special_files.wasm b/tests/wasi-wast/wasi/unstable/unix_open_special_files.wasm index 7b489106219..c1ea91d8ce8 100755 Binary files a/tests/wasi-wast/wasi/unstable/unix_open_special_files.wasm and b/tests/wasi-wast/wasi/unstable/unix_open_special_files.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/wasi_sees_virtual_root.wasm b/tests/wasi-wast/wasi/unstable/wasi_sees_virtual_root.wasm index 59fc97c2b72..1a58daa2b09 100755 Binary files a/tests/wasi-wast/wasi/unstable/wasi_sees_virtual_root.wasm and b/tests/wasi-wast/wasi/unstable/wasi_sees_virtual_root.wasm differ diff --git a/tests/wasi-wast/wasi/unstable/writing.wasm b/tests/wasi-wast/wasi/unstable/writing.wasm index bbdf39ff158..6d4031d160b 100755 Binary files a/tests/wasi-wast/wasi/unstable/writing.wasm and b/tests/wasi-wast/wasi/unstable/writing.wasm differ