diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-02-12 22:27:47 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-02-12 22:27:47 +0000 |
| commit | abb8b29aff352f226bf91cb59e5ac7e3e6082ce8 (patch) | |
| tree | 6128f8abe8437d1870dba2bf1eb048460887dd25 /tests/qemu-iotests/iotests.py | |
| parent | eac92d316351b855ba79eb374dd21cc367f1f9c1 (diff) | |
| parent | 594427fc56758cb944a85914eefe722cc2c667b8 (diff) | |
| download | focaccia-qemu-abb8b29aff352f226bf91cb59e5ac7e3e6082ce8.tar.gz focaccia-qemu-abb8b29aff352f226bf91cb59e5ac7e3e6082ce8.zip | |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-02-12' into staging
nbd patches for 2021-02-12 - let qemu-nbd handle larger backlog of connecting clients - fix a few NBD-related iotest failures - add block cancellation hook for faster response to NBD failures # gpg: Signature made Fri 12 Feb 2021 19:57:56 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2021-02-12: iotests/264: add backup-cancel test-case block/backup: implement .cancel job handler iotests/264: add mirror-cancel test-case iotests.py: qemu_nbd_popen: remove pid file after use iotests/264: move to python unittest block/mirror: implement .cancel job handler job: add .cancel handler for the driver block/raw-format: implement .bdrv_cancel_in_flight handler block/nbd: implement .bdrv_cancel_in_flight block: add new BlockDriver handler: bdrv_cancel_in_flight io: error_prepend() in qio_channel_readv_full_all() causes segfault iotests/210: Fix reference output qemu-nbd: Permit --shared=0 for unlimited clients qemu-nbd: Use SOMAXCONN for socket listen() backlog Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
| -rw-r--r-- | tests/qemu-iotests/iotests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 00be68eca3..4e758308f2 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -296,7 +296,9 @@ def qemu_nbd_list_log(*args: str) -> str: @contextmanager def qemu_nbd_popen(*args): '''Context manager running qemu-nbd within the context''' - pid_file = file_path("pid") + pid_file = file_path("qemu_nbd_popen-nbd-pid-file") + + assert not os.path.exists(pid_file) cmd = list(qemu_nbd_args) cmd.extend(('--persistent', '--pid-file', pid_file)) @@ -314,6 +316,8 @@ def qemu_nbd_popen(*args): time.sleep(0.01) yield finally: + if os.path.exists(pid_file): + os.remove(pid_file) log('Kill NBD server') p.kill() p.wait() |