-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
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() |
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.
We need the same check here to run tests on windows
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.
It still works because that binary returns without an exit code but it is confusing. Updated
@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" |
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.
Add a small comment here around why we are switching commands?
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.
Done
Get Qemu to fingerprint and test properly on both windows and linux
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. |
On Windows
qemu-system-x86_64
does not respond to--version
butqemu-img
does. Also removed the precondition that you have to be root because you don't