[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/21] avocado_qemu: tweak ssh connect method
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 10/21] avocado_qemu: tweak ssh connect method |
Date: |
Mon, 27 Sep 2021 19:02:16 +0200 |
From: Willian Rampazzo <willianr@redhat.com>
The current implementation will crash if the connection fails as the
`time` module is not imported. Fix the import problem. While here,
tweaks the connection to wait progressively when the connection fails.
Signed-off-by: Willian Rampazzo <willianr@redhat.com>
[PMD: Reworded description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210920204932.94132-5-willianr@redhat.com>
---
tests/acceptance/avocado_qemu/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/avocado_qemu/__init__.py
b/tests/acceptance/avocado_qemu/__init__.py
index edb9ed74852..c3613f92620 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -13,6 +13,7 @@
import shutil
import sys
import tempfile
+import time
import uuid
import avocado
@@ -305,8 +306,7 @@ def ssh_connect(self, username, credential,
credential_is_key=True):
self.ssh_session.connect()
return
except:
- time.sleep(4)
- pass
+ time.sleep(i)
self.fail('ssh connection timeout')
def ssh_command(self, command):
--
2.31.1
- [PULL 00/21] Integration testing patches for 2021-09-27, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 01/21] tests/acceptance: add replay kernel test for s390x, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 02/21] tests/acceptance: add replay kernel test for openrisc, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 03/21] tests/acceptance: add replay kernel test for nios2, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 04/21] tests/acceptance: add replay kernel test for alpha, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 06/21] Acceptance tests: add myself as a reviewer for the acceptance tests, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 07/21] Acceptance Tests: add standard clean up at test tearDown(), Philippe Mathieu-Daudé, 2021/09/27
- [PULL 08/21] avocado_qemu: standardize super() call following PEP3135, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 05/21] tests/acceptance: Linux boot test for record/replay, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 09/21] avocado_qemu: fix import module based on isort, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 10/21] avocado_qemu: tweak ssh connect method,
Philippe Mathieu-Daudé <=
- [PULL 11/21] avocado_qemu: explicitly return None to avoid R1710, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 12/21] avocado_qemu: fix inheritance order on LinuxTest class, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 13/21] tests/Makefile: allow control over tags during check-acceptance, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 14/21] docs/devel/testing: add instruction to run a single acceptance test, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 15/21] tests/Makefile: add AVOCADO_TESTS option to make check-acceptance, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 16/21] qemu: Split machine_ppc.py acceptance tests, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 18/21] acceptance/tests/vnc.py: use explicit syntax for enabling passwords, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 17/21] Acceptance Tests: improve check-acceptance description, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 19/21] tests/acceptance/boot_xen.py: removed unused import, Philippe Mathieu-Daudé, 2021/09/27
- [PULL 21/21] tests/acceptance/ppc_prep_40p.py: clean up unused import, Philippe Mathieu-Daudé, 2021/09/27