提交 9394d5ca 编写于 作者: X Xu Tian 提交者: Lucas Meneghel Rodrigues

qemu.tests: fix incorrect test steps in qemu_img.rebase test

qemu-img rebase function used to changes backing_file and backing_file
format for an image file;
In this case, we create snapshots "base->sn1->sn2", then rebase sn2's backing_file
to base, then bootup with sn2 and check sn2's backing_file is base;
Signed-off-by: NXu Tian <xutian@redhat.com>
上级 a022490d
......@@ -464,14 +464,13 @@ def run_qemu_img(test, params, env):
os.remove(sn1)
_rebase(cmd, sn2, base_img, image_format, mode=rebase_mode)
# Boot base image after rebase
img_suffix = ".%s" % image_format
img_name = base_img.split(img_suffix)[0]
_boot(img_name, image_format)
# Boot snapshot image after rebase
img_name, img_format = sn2.split('.')
_boot(img_name, img_format)
# Check sn2's format and backing_file
actual_base_img = _info(cmd, sn2, "backing file")
base_img_name = os.path.basename(params.get("image_name"))
base_img_name = os.path.basename(base_img)
if not base_img_name in actual_base_img:
raise error.TestFail("After rebase the backing_file of 'sn2' is "
"'%s' which is not expected as '%s'"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册