]> git.ipfire.org Git - thirdparty/qemu.git/commit
iotests.py: Add qemu_nbd_early_pipe()
authorMax Reitz <mreitz@redhat.com>
Wed, 8 May 2019 21:18:17 +0000 (23:18 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 13 Jun 2019 13:50:47 +0000 (08:50 -0500)
commit6177b58431cd19fddfd025225403876b8deeeec7
treeb73f7dc76638cbfc057282c3bfbcf14563c0edd7
parent637bc5a5d8b7612bbbccd998d4183d2affb189e6
iotests.py: Add qemu_nbd_early_pipe()

qemu_nbd_pipe() currently unconditionally reads qemu-nbd's output.  That
is not ideal because qemu-nbd may keep stderr open after the parent
process has exited.

Currently, the only user of qemu_nbd_pipe() is 147, which discards the
whole output if the parent process returned success and only evaluates
it on error.  Therefore, we can replace qemu_nbd_pipe() by
qemu_nbd_early_pipe() that does the same: Discard the output on success,
and return it on error.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190508211820.17851-3-mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/147
tests/qemu-iotests/iotests.py