From 62e15260378596e1de6aeb1ff0040b97e4492275 Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 12 Feb 2020 23:00:30 -0800 Subject: [PATCH 1/4] Fixed WASI isatty --- lib/wasi-tests/tests/wasitests/isatty.rs | 15 +++++++++++++++ lib/wasi-tests/tests/wasitests/mod.rs | 1 + lib/wasi-tests/wasitests/isatty.out | 3 +++ lib/wasi-tests/wasitests/isatty.rs | 11 +++++++++++ lib/wasi-tests/wasitests/isatty.wasm | Bin 0 -> 71573 bytes lib/wasi/src/state/mod.rs | 22 +++++++++++++++++++--- 6 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 lib/wasi-tests/tests/wasitests/isatty.rs create mode 100644 lib/wasi-tests/wasitests/isatty.out create mode 100644 lib/wasi-tests/wasitests/isatty.rs create mode 100755 lib/wasi-tests/wasitests/isatty.wasm diff --git a/lib/wasi-tests/tests/wasitests/isatty.rs b/lib/wasi-tests/tests/wasitests/isatty.rs new file mode 100644 index 00000000000..55c97a60659 --- /dev/null +++ b/lib/wasi-tests/tests/wasitests/isatty.rs @@ -0,0 +1,15 @@ +// !!! THIS IS A GENERATED FILE !!! +// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME +// Files autogenerated with cargo build (build/wasitests.rs). + +#[test] +fn test_isatty() { + assert_wasi_output!( + "../../wasitests/isatty.wasm", + "isatty", + vec![], + vec![], + vec![], + "../../wasitests/isatty.out" + ); +} diff --git a/lib/wasi-tests/tests/wasitests/mod.rs b/lib/wasi-tests/tests/wasitests/mod.rs index d226dc0ee0d..59092573ab2 100644 --- a/lib/wasi-tests/tests/wasitests/mod.rs +++ b/lib/wasi-tests/tests/wasitests/mod.rs @@ -18,6 +18,7 @@ mod file_metadata; mod fs_sandbox_test; mod fseek; mod hello; +mod isatty; mod mapdir; mod path_link; mod path_rename; diff --git a/lib/wasi-tests/wasitests/isatty.out b/lib/wasi-tests/wasitests/isatty.out new file mode 100644 index 00000000000..497b5781889 --- /dev/null +++ b/lib/wasi-tests/wasitests/isatty.out @@ -0,0 +1,3 @@ +stdin: 1 +stdout: 1 +stderr: 1 diff --git a/lib/wasi-tests/wasitests/isatty.rs b/lib/wasi-tests/wasitests/isatty.rs new file mode 100644 index 00000000000..5310b5e7d6f --- /dev/null +++ b/lib/wasi-tests/wasitests/isatty.rs @@ -0,0 +1,11 @@ +// use libc::isatty; + +extern "C" { + pub fn isatty(fd: i32) -> i32; +} + +fn main() { + println!("stdin: {}", unsafe { isatty(0) }); + println!("stdout: {}", unsafe { isatty(1) }); + println!("stderr: {}", unsafe { isatty(2) }); +} diff --git a/lib/wasi-tests/wasitests/isatty.wasm b/lib/wasi-tests/wasitests/isatty.wasm new file mode 100755 index 0000000000000000000000000000000000000000..5a414754f9ff0368f537ee9297a68a6469580fc3 GIT binary patch literal 71573 zcmeFaf1I6HUGMw+*n7{Od1fZNH9}|tefB2GL{l2HCMAH(iqapqKo!yJ>s~#{G?}(D z(@v6^X+BnMs=>-0L5gGI@TjAK&#|-{0%I)=p-YuT7IAN#}b9lH@>oTz}~+4`j!Wr^gSp zj`P1n56OYtZuxlJZsS+334d*sq?Es^%qy*hj=fi<5r4;R_LgkqN!QOT&+T7coH??5 z_2HHMN0w%f&COo_tkEM&hY#+by7PVXOr$}8a-=v@z~tb;l=&SbN_L6`7!%1Vo?J! z|JU?kCZansk|tw$-WkoZEbr#_zgFJL^R(UWq-i&e{~H;}^R_;ByWO;%?-cJocVwg0u+>5=rn0bokb>O3Vsp1Rf5Q%P|=aSwgAaUHq1)46u`+QUmP z%aXDE`wz{m%Q?X8*M_ zbBoDj%PyNnU!A6jquTgb@uhTP+ZWO;mw(T`b3T+_zxD7dR=)GXz0duQXFqTEbDs3A z-|+vW|986UwduD!oSwIQ{!732CExe`Kd^J|se`M}?SIquXC2w`j00EBKkce#{+~be z!~bFbx2>kHO26^d>5b{;r+h5^we+*;-=x2r{^#_=>HE?@OFx(XReE>&NP2(z*Xe&t zzmk4A9Xs)R`NL^9>HT!t`^mJ}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K zzDl(tgZxVzS}9ZhrH-17p|M)e?lgc^MvC=*ECFmwZM5*olVr;#gHnA0Yjq^^Z0z{> z+EH41nyRjxQkj~V2c$b{r#9DVfoyC*VY^j1dTmf!0+kP<`nAm-o&NcjYmY1K;D(I1+}eobqsRwWjdlT1h?2I*&&AoXNo+%Z5kHke3! z@=JXPeg_yEVN@?m_T@db2XFF!`beEEMSgtYoMS1cdh13c?h~g^CMz`+h7(DpL{Qvg zkJV5kqB!(OIR~8<3?BYMCE&j3hvLt1~X8v9!fWHy=Pt-_) z(Uj8S|L3duOD;Rr-?atukG>g0-|buz?+9>TJ^$3RrLVUo9^oGpw7}VncB%bZkZ1M3 hxri_PX6bsA(mTo_OY6s|{2FlJSK+G@_|u%ge*?Gs8o~eo literal 0 HcmV?d00001 diff --git a/lib/wasi/src/state/mod.rs b/lib/wasi/src/state/mod.rs index ceb72fdc837..f7d022aa0d8 100644 --- a/lib/wasi/src/state/mod.rs +++ b/lib/wasi/src/state/mod.rs @@ -1045,12 +1045,28 @@ impl WasiFs { pub fn fdstat(&self, fd: __wasi_fd_t) -> Result<__wasi_fdstat_t, __wasi_errno_t> { match fd { - __WASI_STDOUT_FILENO => { + __WASI_STDIN_FILENO => { return Ok(__wasi_fdstat_t { fs_filetype: __WASI_FILETYPE_CHARACTER_DEVICE, fs_flags: 0, - fs_rights_base: ALL_RIGHTS, - fs_rights_inheriting: ALL_RIGHTS, + fs_rights_base: STDIN_DEFAULT_RIGHTS, + fs_rights_inheriting: 0, + }) + } + __WASI_STDOUT_FILENO => { + return Ok(__wasi_fdstat_t { + fs_filetype: __WASI_FILETYPE_CHARACTER_DEVICE, + fs_flags: __WASI_FDFLAG_APPEND, + fs_rights_base: STDOUT_DEFAULT_RIGHTS, + fs_rights_inheriting: 0, + }) + } + __WASI_STDERR_FILENO => { + return Ok(__wasi_fdstat_t { + fs_filetype: __WASI_FILETYPE_CHARACTER_DEVICE, + fs_flags: __WASI_FDFLAG_APPEND, + fs_rights_base: STDERR_DEFAULT_RIGHTS, + fs_rights_inheriting: 0, }) } _ => (), From c287170166798e3b3b87ab58049a1a7487847739 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 13 Feb 2020 10:33:27 -0800 Subject: [PATCH 2/4] Fixed wasi isatty tests when being generated --- lib/wasi-tests/wasitests/isatty.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/wasi-tests/wasitests/isatty.rs b/lib/wasi-tests/wasitests/isatty.rs index 5310b5e7d6f..57d343568bf 100644 --- a/lib/wasi-tests/wasitests/isatty.rs +++ b/lib/wasi-tests/wasitests/isatty.rs @@ -1,3 +1,5 @@ +// We don't have access to libc, so we just use isatty +// as an external function // use libc::isatty; extern "C" { @@ -5,7 +7,14 @@ extern "C" { } fn main() { - println!("stdin: {}", unsafe { isatty(0) }); - println!("stdout: {}", unsafe { isatty(1) }); - println!("stderr: {}", unsafe { isatty(2) }); + #[cfg(target = "wasi")] { + println!("stdin: {}", unsafe { isatty(0) }); + println!("stdout: {}", unsafe { isatty(1) }); + println!("stderr: {}", unsafe { isatty(2) }); + } + #[cfg(not(target = "wasi"))] { + println!("stdin: 1"); + println!("stdout: 1"); + println!("stderr: 1"); + } } From 61c85b3fbf0f777232935b73d48f908d725ce602 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 13 Feb 2020 10:35:48 -0800 Subject: [PATCH 3/4] Improved fd_write debugging --- lib/wasi/src/syscalls/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index 6c60863ecc3..ea253968cc1 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -1221,7 +1221,14 @@ pub fn fd_write( iovs_len: u32, nwritten: WasmPtr, ) -> __wasi_errno_t { - debug!("wasi::fd_write: fd={}", fd); + // If we are writing to stdout or stderr + // we skip debug to not pollute the stdout/err + // and do debugging happily after :) + if fd != __WASI_STDOUT_FILENO && fd != __WASI_STDERR_FILENO { + debug!("wasi::fd_write: fd={}", fd); + } else { + trace!("wasi::fd_write: fd={}", fd); + } let (memory, state) = get_memory_and_wasi_state(ctx, 0); let iovs_arr_cell = wasi_try!(iovs.deref(memory, 0, iovs_len)); let nwritten_cell = wasi_try!(nwritten.deref(memory)); From 60e686ff76518406d4fabc8f04c97d061211406e Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 13 Feb 2020 10:37:27 -0800 Subject: [PATCH 4/4] Added change into changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d690b402b17..a7e2d4f7891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## **[Unreleased]** +- [#1213](https://github.com/wasmerio/wasmer/pull/1213) Fixed WASI `fdstat` to detect `isatty` properly. - [#1192](https://github.com/wasmerio/wasmer/pull/1192) Use `ExceptionCode` for error representation. - [#1180](https://github.com/wasmerio/wasmer/pull/1180) Fix compilation for target `x86_64-unknown-linux-musl`. - [#1170](https://github.com/wasmerio/wasmer/pull/1170) Improve the WasiFs builder API with convenience methods for overriding stdin, stdout, and stderr as well as a new sub-builder for controlling the permissions and properties of preopened directories. Also breaks that implementations of `WasiFile` must be `Send` -- please file an issue if this change causes you any issues.