未验证 提交 5b9824bc 编写于 作者: X Xu Han 提交者: GitHub

Merge pull request #1114 from vivianQizhu/1496671

block_stream: Set default base to None.
...@@ -15,7 +15,7 @@ class BlockStream(block_copy.BlockCopy): ...@@ -15,7 +15,7 @@ class BlockStream(block_copy.BlockCopy):
def __init__(self, test, params, env, tag): def __init__(self, test, params, env, tag):
super(BlockStream, self).__init__(test, params, env, tag) super(BlockStream, self).__init__(test, params, env, tag)
self.base_image = self.image_file self.base_image = None
self.ext_args = {} self.ext_args = {}
def parser_test_args(self): def parser_test_args(self):
......
...@@ -36,6 +36,8 @@ class BlockStreamCheckBackingfile(blk_stream.BlockStream): ...@@ -36,6 +36,8 @@ class BlockStreamCheckBackingfile(blk_stream.BlockStream):
self.test.fail(msg) self.test.fail(msg)
def check_backingfile_exist(self): def check_backingfile_exist(self):
if not self.base_image:
self.test.error("No backing file specified.")
backingfile = self.get_backingfile() backingfile = self.get_backingfile()
if backingfile != self.base_image: if backingfile != self.base_image:
msg = "The backing file from monitor does not meet expectation. " msg = "The backing file from monitor does not meet expectation. "
...@@ -60,6 +62,7 @@ class BlockStreamCheckBackingfile(blk_stream.BlockStream): ...@@ -60,6 +62,7 @@ class BlockStreamCheckBackingfile(blk_stream.BlockStream):
""" """
Set values for backing-file option Set values for backing-file option
""" """
self.base_image = self.image_file
absolute_path = self.params["absolute_path"] absolute_path = self.params["absolute_path"]
if absolute_path == "yes": if absolute_path == "yes":
backing_file = self.base_image backing_file = self.base_image
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册