diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-10-30 11:13:16 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-10-30 11:13:16 +0000 |
commit | 62a23835b7c9019ae502915d5990e150349d5114 (patch) | |
tree | 9114ec26a352c53503f487d02d2d779529e38487 /python/qemu/machine.py | |
parent | 844178e7b327690068baeb45d413bc84d797db6b (diff) | |
parent | efdb45bfd72745038909dfd1e970a827cb8d5d7e (diff) | |
download | qemu-62a23835b7c9019ae502915d5990e150349d5114.zip qemu-62a23835b7c9019ae502915d5990e150349d5114.tar.gz qemu-62a23835b7c9019ae502915d5990e150349d5114.tar.bz2 |
Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging
Python (acceptance tests) queue, 2019-10-28
# gpg: Signature made Mon 28 Oct 2019 23:43:11 GMT
# gpg: using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3
# gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3
* remotes/cleber/tags/python-next-pull-request:
tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu
tests/boot_linux_console: Add initrd test for the Exynos4210
tests/boot_linux_console: Add a test for the Raspberry Pi 2
tests/boot_linux_console: Use Avocado archive::gzip_uncompress()
.travis.yml: Let the avocado job run the 40p tests
tests/acceptance: Test OpenBIOS on the PReP/40p
tests/acceptance: Add test that runs NetBSD 4.0 installer on PRep/40p
.travis.yml: Let the avocado job run the Leon3 test
tests/acceptance: Add test that boots the HelenOS microkernel on Leon3
tests/acceptance: Refactor exec_command_and_wait_for_pattern()
tests/acceptance: Send <carriage return> on serial lines
tests/acceptance: Fix wait_for_console_pattern() hangs
Acceptance tests: refactor wait_for_console_pattern
Python libs: close console sockets before shutting down the VMs
Acceptance tests: work around socket dir
MAINTAINERS: update location of Python libraries
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'python/qemu/machine.py')
-rw-r--r-- | python/qemu/machine.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 2024e8b..a4631d6 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -277,10 +277,6 @@ class QEMUMachine(object): self._qemu_log_path = None - if self._console_socket is not None: - self._console_socket.close() - self._console_socket = None - if self._temp_dir is not None: shutil.rmtree(self._temp_dir) self._temp_dir = None @@ -342,6 +338,13 @@ class QEMUMachine(object): """ Terminate the VM and clean up """ + # If we keep the console socket open, we may deadlock waiting + # for QEMU to exit, while QEMU is waiting for the socket to + # become writeable. + if self._console_socket is not None: + self._console_socket.close() + self._console_socket = None + if self.is_running(): try: if not has_quit: |