Re: [PATCH v6 01/10] qemu-img: Flush stdout before before potential stderr messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux