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 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!

@phil-opp phil-opp force-pushed the fix-error-code branch 2 times, most recently from 6ed8021 to fc43139 Compare November 2, 2019 16:04
eprintln!("QEMU process was terminated by signal {}", signal);
}
}
let qemu_exit_code = exit_status.code().ok_or("Failed to read QEMU exit code")?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 merged commit c15df0b into master Nov 20, 2019
@bors bors bot deleted the fix-error-code branch November 20, 2019 14:09
phil-opp added a commit that referenced this pull request Nov 20, 2019
@phil-opp
Copy link
Member Author

Published as version 0.7.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants