virttest: fix qemu version parsing#4350
Open
bssrikanth wants to merge 1 commit intoavocado-framework:masterfrom
Open
virttest: fix qemu version parsing#4350bssrikanth wants to merge 1 commit intoavocado-framework:masterfrom
bssrikanth wants to merge 1 commit intoavocado-framework:masterfrom
Conversation
Author
|
I had custom qemu built when queried on version it returned: In above case current parsing fails: After fix: |
There was a problem hiding this comment.
Code Review
This pull request updates the QEMU version parsing logic to make the parenthetical build/distro suffix optional, improving compatibility with various version string formats. Changes include regex updates in env_process.py and utils_qemu.py, logic adjustments in requirement_checks.py, and a new unit test. Feedback suggests consolidating the QEMU_VERSION_RE definitions into a single location to reduce code duplication and improve maintainability.
QEMU -version output without a parenthetical build/distro suffix (e.g. some upstream builds) did not match the old QEMU_VERSION_RE, so requirement_checks failed to read the version and canceled tests. This commit fixes it and also adds unittest for the same Signed-off-by: Srikanth Aithal <srikanth.aithal@amd.com>
c85f991 to
dcf8d1e
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current QEMU_VERSION_RE required parenthetical,
but on custom qemu builds prints only “QEMU emulator version X.Y.Z” on the first line so requirement_checks could not read the version and canceled tests.
This commit fixes it and also adds unittest for the same