forked from avocado-framework/avocado-vt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qemu_storage: Stop ignoring failures creating VM images
By default, the qemu_storage code is ignoring failures when qemu-img fails to create a disk image. This happens because the failure is actually considered only if the (terribly undocumented) param 'check_output' is set to yes. Since there's no 'check_output' on any .cfg file in the virt-test repo, the failures will never be considered and virt-tests will happily proceed, even though a world of pain and suffering will follow. Since there are future tests that might require the output of the creation command, we'll fix the problem by: 1) Introducing a ignore_errors boolean parameter to the .create() method, when set to true it'll make the method to not raise an error on failure. 2) Making the method return a fixed tuple (path to the image created, object with the result of the command). With the result object, it is easy to get outputs as they are attributes of the said object. This also has the nice side effect of not requiring the check_output parameter anymore. Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
- Loading branch information
Showing
3 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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