-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
𝟎 only log non-zero exit status codes #128
Conversation
549b027
to
c4f7d0a
Compare
lib/src/execute.rs
Outdated
event!(Level::ERROR, "WebAssembly trapped: {}", trap); | ||
// Be sure that we only log non-zero status codes. | ||
if trap.i32_exit_status() != Some(0) { | ||
event!(Level::ERROR, "WebAssembly huhu: {}", trap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM except that I don't know what "huhu" is, was it intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not intended, thank you for catching this! i've force pushed a fresh commit (and commit message) that doesn't include my silly testing string 😅
34a312b
to
bf33880
Compare
sigh. i have a sneaking suspicion that i don't see this failure when running |
if a program invokes e.g., `std::process:exit(0)`, this should not cause confusing diagnostic messages as reported in #127: ``` Jan 1 00:00:00.123 ERROR viceroy_lib::execute: WebAssembly trapped: Exited with i32 exit status 0 wasm backtrace: 0: 0x280ea - <unknown>!__wasi_proc_exit 1: 0x280f6 - <unknown>!_Exit ``` this is unfortunately difficult to test, because the `Result<(), ExecutionError>` of `ExecuteCtx::run_guest` is spawned in a task that we do not join on later. (note: that is intentional) the alternative of a test that checks for a particular log message felt brittle, and this is a relatively straightfoward change.
bf33880
to
5996ed9
Compare
if a program invokes e.g.,
std::process:exit(0)
, this should not causeconfusing messages as reported in #127:
apologies for the lack of test coverage here.
this is unfortunately difficult to test, because the
Result<(), ExecutionError>
ofExecuteCtx::run_guest
is spawned in atask that we do not join on later. (note: that is intentional)
the alternative of a test that checks for a particular log message felt
brittle, and this is a relatively straightfoward change.