提交 8ff472c3 编写于 作者: X Xu Tian 提交者: Lucas Meneghel Rodrigues

qemu.tests: update get_backingfile function in block_copy module

raise TestFail doesn't make sense in get_backingfile function, it should
be verify in test script according case;
Signed-off-by: NXu Tian <xutian@redhat.com>
上级 4af9e1b9
......@@ -276,13 +276,11 @@ class BlockCopy(object):
image_file = self.get_image_file()
cmd += " info %s " % image_file
info = utils.system_output(cmd)
matched = re.search(r"backing file:\b+(.*)", info)
matched = re.search(r"backing file: +(.*)", info, re.M)
if matched:
backing_file = matched.group(1)
if backing_file:
backing_file = os.path.abspath(backing_file)
if not os.path.exists(backing_file):
raise error.TestError("backingfile(%s) not exists")
return backing_file
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册