提交 56a6e5d0 编写于 作者: M Max Reitz

iotests.py: Filter filename in any string value

filter_qmp_testfiles() currently filters the filename only for specific
keys.  However, there are more keys that take filenames (such as
block-commit's @top and @base, or ssh's @path), and it does not make
sense to list them all here.  "$TEST_DIR/$PID-" should have enough
entropy not to appear anywhere randomly.
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NJohn Snow <jsnow@redhat.com>
Message-id: 20190210145736.1486-8-mreitz@redhat.com
Signed-off-by: NMax Reitz <mreitz@redhat.com>
上级 011a5761
......@@ -289,7 +289,7 @@ def filter_testfiles(msg):
def filter_qmp_testfiles(qmsg):
def _filter(key, value):
if key == 'filename' or key == 'backing-file':
if is_str(value):
return filter_testfiles(value)
return value
return filter_qmp(qmsg, _filter)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册