iotests: Simplify _filter_img_create() a bit
commit4b196cd16dcfb17de19a4121f12aa4ef4bf7925f
authorMax Reitz <mreitz@redhat.com>
Thu, 9 Jul 2020 11:02:05 +0000 (9 13:02 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 14 Jul 2020 13:18:59 +0000 (14 15:18 +0200)
tree4f1cfaf6db206203beca295bc389f475e5839ff4
parent20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46
iotests: Simplify _filter_img_create() a bit

Not only is it a bit stupid to try to filter multi-line "Formatting"
output (because we only need it for a single test, which can easily be
amended to no longer need it), it is also problematic when there can be
output after a "Formatting" line that we do not want to filter as if it
were part of it.

So rename _filter_img_create to _do_filter_img_create, let it filter
only a single line, and let _filter_img_create loop over all input
lines, calling _do_filter_img_create only on those that match
/^Formatting/ (basically, what _filter_img_create_in_qmp did already).
(And fix 020 to work with that.)

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200709110205.310942-1-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/020
tests/qemu-iotests/020.out
tests/qemu-iotests/141
tests/qemu-iotests/common.filter