diff options
author | Nir Soffer <nirsof@gmail.com> | 2020-07-28 00:58:44 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2020-07-28 09:54:43 -0500 |
commit | b7719bcad2e92bab5aae3166fa9011f127e6ee49 (patch) | |
tree | e0b2b32df18a5cdb90e4ac047ae768984e04485f /include/hw/dma | |
parent | a2b333c01880f56056d50c238834d62e32001e54 (diff) | |
download | qemu-b7719bcad2e92bab5aae3166fa9011f127e6ee49.zip qemu-b7719bcad2e92bab5aae3166fa9011f127e6ee49.tar.gz qemu-b7719bcad2e92bab5aae3166fa9011f127e6ee49.tar.bz2 |
iotests: Make qemu_nbd_popen() a contextmanager
Instead of duplicating the code to wait until the server is ready and
remember to terminate the server and wait for it, make it possible to
use like this:
with qemu_nbd_popen('-k', sock, image):
# Access image via qemu-nbd socket...
Only test 264 used this helper, but I had to modify the output since it
did not consistently when starting and stopping qemu-nbd.
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Message-Id: <20200727215846.395443-3-nsoffer@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/hw/dma')
0 files changed, 0 insertions, 0 deletions