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

Get Qemu to fingerprint and test properly on both windows and linux #352

Merged
merged 3 commits into from
Oct 29, 2015

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Oct 27, 2015

On Windows qemu-system-x86_64 does not respond to --version but qemu-img does. Also removed the precondition that you have to be root because you don't

t.Skip("Must be on non-windows environments to run test")
}
// else see if qemu exists
// Check if qemu exists
_, err := exec.Command("qemu-system-x86_64", "-version").CombinedOutput()
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the same check here to run tests on windows

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It still works because that binary returns without an exit code but it is confusing. Updated

@diptanu
Copy link
Contributor

diptanu commented Oct 28, 2015

@dadgar LGTM

if runtime.GOOS != "windows" && syscall.Geteuid() != 0 {
d.logger.Printf("[DEBUG] driver.qemu: must run as root user, disabling")
return false, nil
bin := "qemu-system-x86_64"
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a small comment here around why we are switching commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

dadgar added a commit that referenced this pull request Oct 29, 2015
Get Qemu to fingerprint and test properly on both windows and linux
@dadgar dadgar merged commit f9497a5 into master Oct 29, 2015
@dadgar dadgar deleted the f-qemu-windows branch October 29, 2015 23:57
@github-actions
Copy link

github-actions bot commented May 6, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants