qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Willian Rampazzo <willianr@redhat.com>, qemu-devel@nongnu.org
Cc: Wainer dos Santos Moschetta <wainersm@redhat.com>,
	Cleber Rosa <crosa@redhat.com>
Subject: Re: [PATCH 4/6] avocado_qemu: tweak ssh connect method
Date: Mon, 27 Sep 2021 16:12:21 +0200	[thread overview]
Message-ID: <fe982e8e-5ead-5be7-48b3-3c962960f21a@redhat.com> (raw)
In-Reply-To: <20210920204932.94132-5-willianr@redhat.com>

On 9/20/21 22:49, Willian Rampazzo wrote:
> The current implementation will crash if the connection fails as the
> `time` module is not imported. This fixes the import problem and tweaks
> the connection to wait progressively when the connection fails.
> 
> Signed-off-by: Willian Rampazzo <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 edb9ed7485..c3613f9262 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)

10 * 4 = 40

> -                pass
> +                time.sleep(i)

sum([0..10[) = 45

The described tweak. Almost the same, OK.

>          self.fail('ssh connection timeout')
>  
>      def ssh_command(self, command):
> 



  reply	other threads:[~2021-09-27 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 20:49 [PATCH 0/6] avocado_qemu: small fixes and tweaks Willian Rampazzo
2021-09-20 20:49 ` [PATCH 1/6] Acceptance Tests: add standard clean up at test tearDown() Willian Rampazzo
2021-09-20 20:49 ` [PATCH 2/6] avocado_qemu: standardize supper() call following PEP3135 Willian Rampazzo
2021-09-20 20:55   ` Willian Rampazzo
2021-09-20 20:49 ` [PATCH 3/6] avocado_qemu: fix import module based on isort Willian Rampazzo
2021-09-20 20:49 ` [PATCH 4/6] avocado_qemu: tweak ssh connect method Willian Rampazzo
2021-09-27 14:12   ` Philippe Mathieu-Daudé [this message]
2021-09-27 14:39     ` Willian Rampazzo
2021-09-20 20:49 ` [PATCH 5/6] avocado_qemu: explicitly return None to avoid R1710 Willian Rampazzo
2021-09-20 20:49 ` [PATCH 6/6] avocado_qemu: fix inheritance order on LinuxTest class Willian Rampazzo
2021-09-27 14:13 ` [PATCH 0/6] avocado_qemu: small fixes and tweaks Philippe Mathieu-Daudé
2021-09-27 16:41 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe982e8e-5ead-5be7-48b3-3c962960f21a@redhat.com \
    --to=philmd@redhat.com \
    --cc=crosa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).