Skip to content
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

Don't exit with expected exit code when failed to read QEMU exit code #47

Merged
merged 2 commits into from Nov 20, 2019

Conversation

@phil-opp
Copy link
Member

phil-opp commented Nov 2, 2019

If failed to read the QEMU exit code, bootimage exits with the expected exit code specified in the test-success-exit-code config key. Instead, it should report an error when failing to read the QEMU exit code and never exit with the expected exit code.

Reported in phil-opp/blog_os#591 (comment)

Thanks to @jos-b and @bjorn3 for reporting and helping with debugging!

@bjorn3
bjorn3 approved these changes Nov 2, 2019
@phil-opp phil-opp force-pushed the fix-error-code branch 2 times, most recently from 6ed8021 to fc43139 Nov 2, 2019
eprintln!("QEMU process was terminated by signal {}", signal);
}
}
let qemu_exit_code = exit_status.code().ok_or("Failed to read QEMU exit code")?;

This comment has been minimized.

Copy link
@bjorn3

bjorn3 Nov 2, 2019

This should not say Failed to read QEMU exit code when there was a signal.

This comment has been minimized.

Copy link
@phil-opp

phil-opp Nov 2, 2019

Author Member

I'm not sure. The cause for the error still is that there is no exit code, so I think it makes sense to print it.

@phil-opp phil-opp force-pushed the fix-error-code branch from fc43139 to 8f42572 Nov 2, 2019
@phil-opp phil-opp merged commit c15df0b into master Nov 20, 2019
8 checks passed
8 checks passed
rust-osdev.bootimage Build #20191102.15 succeeded
Details
rust-osdev.bootimage (Build linux) Build linux succeeded
Details
rust-osdev.bootimage (Build mac) Build mac succeeded
Details
rust-osdev.bootimage (Build windows) Build windows succeeded
Details
rust-osdev.bootimage (Check Formatting linux) Check Formatting linux succeeded
Details
rust-osdev.bootimage (Test linux) Test linux succeeded
Details
rust-osdev.bootimage (Test mac) Test mac succeeded
Details
rust-osdev.bootimage (Test windows) Test windows succeeded
Details
@bors bors bot deleted the fix-error-code branch Nov 20, 2019
phil-opp added a commit that referenced this pull request Nov 20, 2019
@phil-opp

This comment has been minimized.

Copy link
Member Author

phil-opp commented Nov 20, 2019

Published as version 0.7.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.