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: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20190210145736.1486-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
011a576113
commit
56a6e5d0ca
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user