[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/19] python/machine.py: change default wait timeout to 3 seconds
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 13/19] python/machine.py: change default wait timeout to 3 seconds |
Date: |
Wed, 15 Jul 2020 00:21:26 +0200 |
From: John Snow <jsnow@redhat.com>
Machine.wait() does not appear to be used except in the acceptance tests,
and an infinite timeout by default in a test suite is not the most helpful.
Change it to 3 seconds, like the default shutdown timeout.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20200710050649.32434-13-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
python/qemu/machine.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 736a3c906f..69055189bd 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -486,12 +486,12 @@ def kill(self):
"""
self.shutdown(hard=True)
- def wait(self, timeout: Optional[int] = None) -> None:
+ def wait(self, timeout: Optional[int] = 3) -> None:
"""
Wait for the VM to power off and perform post-shutdown cleanup.
:param timeout: Optional timeout in seconds.
- Default None, an infinite wait.
+ Default 3 seconds, A value of None is an infinite wait.
"""
self.shutdown(has_quit=True, timeout=timeout)
--
2.21.3
- [PULL 03/19] python/machine.py: Close QMP socket in cleanup, (continued)
- [PULL 03/19] python/machine.py: Close QMP socket in cleanup, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 04/19] python/machine.py: Add _early_cleanup hook, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 05/19] python/machine.py: Perform early cleanup for wait() calls, too, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 06/19] python/machine.py: Prohibit multiple shutdown() calls, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 07/19] python/machine.py: Add a configurable timeout to shutdown(), Philippe Mathieu-Daudé, 2020/07/14
- [PULL 08/19] python/machine.py: Make wait() call shutdown(), Philippe Mathieu-Daudé, 2020/07/14
- [PULL 09/19] tests/acceptance: wait() instead of shutdown() where appropriate, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 11/19] python/machine.py: split shutdown into hard and soft flavors, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 10/19] tests/acceptance: Don't test reboot on cubieboard, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 12/19] python/machine.py: re-add sigkill warning suppression, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 13/19] python/machine.py: change default wait timeout to 3 seconds,
Philippe Mathieu-Daudé <=
- [PULL 14/19] python/qmp.py: Define common types, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 15/19] iotests.py: use qemu.qmp type aliases, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 16/19] python/qmp.py: re-absorb MonitorResponseError, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 17/19] python/qmp.py: Do not return None from cmd_obj, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 18/19] python/qmp.py: add casts to JSON deserialization, Philippe Mathieu-Daudé, 2020/07/14
- [PULL 19/19] python/qmp.py: add QMPProtocolError, Philippe Mathieu-Daudé, 2020/07/14
- Re: [PULL 00/19] Python patches for 5.1, Peter Maydell, 2020/07/15