On Wed, Sep 06, 2023 at 11:32:08AM +0200, Denis V. Lunev wrote:
> Closing stderr earlier is good for daemonized qemu-nbd under ssh
> earlier, but breaks the case where -v is being used to track what is
> happening in the server, as in iotest 233.
> 
> When we know we are verbose, we should preserve original stderr and
> restore it once the setup stage is done. This commit restores the
> original behavior with -v option. In this case original output
> inside the test is kept intact.
> 
> Reported-by: Kevin Wolf <kw...@redhat.com>
> Signed-off-by: Denis V. Lunev <d...@openvz.org>
> CC: Eric Blake <ebl...@redhat.com>
> CC: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
> CC: Hanna Reitz <hre...@redhat.com>
> CC: Mike Maslenkin <mike.maslen...@gmail.com>
> Fixes: 5c56dd27a2 ("qemu-nbd: fix regression with qemu-nbd --fork run over 
> ssh")
> ---
>  qemu-nbd.c | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)

Tested-by: Eric Blake <ebl...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to