[PATCH v6 01/10] qemu-img: Flush stdout before before potential stderr messages
Max Reitz
mreitz at redhat.com
Mon Jul 13 09:22:17 UTC 2020
On 06.07.20 22:39, Eric Blake wrote:
> During 'qemu-img create ... 2>&1', if --quiet is not in force, we can
> end up with buffered I/O in stdout that was produced before failure,
> but which appears in output after failure. This is confusing; the fix
> is to flush stdout prior to attempting anything that might produce an
> error message. Several iotests demonstrate the resulting ordering
> change now that the merged outputs now reflect chronology. (An even
> better fix would be to avoid printf from within block.c altogether,
> but that's much more invasive...)
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> block.c | 1 +
> tests/qemu-iotests/049.out | 8 ++++----
> tests/qemu-iotests/054.out | 2 +-
> tests/qemu-iotests/079.out | 2 +-
> tests/qemu-iotests/112.out | 4 ++--
> tests/qemu-iotests/259.out | 2 +-
> 6 files changed, 10 insertions(+), 9 deletions(-)
282 also needs some treatment.
Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200713/a79cd0e6/attachment-0001.sig>
More information about the libvir-list
mailing list