From d15fdb0044e4b2421aa3014d8ff9952bfac3e762 Mon Sep 17 00:00:00 2001 From: Tingting Mao Date: Fri, 8 Jul 2022 16:33:57 +0800 Subject: [PATCH] qemu_storage: add repair option for image check function Signed-off-by: Tingting Mao --- virttest/qemu_storage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virttest/qemu_storage.py b/virttest/qemu_storage.py index c7ac27e726..f8ed1f95ce 100755 --- a/virttest/qemu_storage.py +++ b/virttest/qemu_storage.py @@ -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 @@ -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(