Skip to content

Commit

Permalink
Merge pull request avocado-framework#3453 from hellohellenmao/2103037
Browse files Browse the repository at this point in the history
qemu_storage: add repair option for image check function
  • Loading branch information
YongxueHong authored Jul 14, 2022
2 parents 3d8a0b5 + d15fdb0 commit 6b9db64
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions virttest/qemu_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,13 +1517,15 @@ def compare_to(self, target_image, source_cache_mode=None,

return result

def check(self, params, root_dir, force_share=False, output=None):
def check(self, params, root_dir, force_share=False, output=None,
check_repair=None):
"""
Check an image using the appropriate tools for each virt backend.
:param params: Dictionary containing the test parameters.
:param root_dir: Base directory for relative filenames.
:param output: The format of the output(json, human).
:param check_repair: Repair the image(leaks, all).
:note: params should contain:
image_name -- the name of the image file, without extension
Expand All @@ -1537,7 +1539,8 @@ def check(self, params, root_dir, force_share=False, output=None):

cmd_dict = {"image_filename": image_filename,
"force_share": force_share,
"output_format": output}
"output_format": output,
"check_repair": check_repair}
if (self.encryption_config.key_secret
or self._need_auth_info(self.tag)):
cmd_dict["image_filename"] = "'%s'" % get_image_json(
Expand Down

0 comments on commit 6b9db64

Please sign in to comment.