[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] VM tests: account for changes in qemu.utils.get_info_use
From: |
Willian Rampazzo |
Subject: |
Re: [PATCH 1/1] VM tests: account for changes in qemu.utils.get_info_usernet_hostfwd_port() |
Date: |
Tue, 1 Jun 2021 14:36:28 -0300 |
On Tue, Jun 1, 2021 at 12:46 PM Cleber Rosa <crosa@redhat.com> wrote:
>
> The utility function actually accepts a string, and not the raw
> dictionary response from QMP. Also, it returns (optionally) an
> integer, so that must also be accounted for.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
> tests/vm/basevm.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 6f4f0fc95e..0f2e436ed3 100644
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -227,7 +227,7 @@ def _ssh_do(self, user, cmd, check):
> "-o", "UserKnownHostsFile=" + os.devnull,
> "-o",
> "ConnectTimeout={}".format(self._config["ssh_timeout"]),
> - "-p", self.ssh_port, "-i", self._ssh_tmp_key_file]
> + "-p", str(self.ssh_port), "-i", self._ssh_tmp_key_file]
> # If not in debug mode, set ssh to quiet mode to
> # avoid printing the results of commands.
> if not self.debug:
> @@ -305,7 +305,7 @@ def boot(self, img, extra_args=[]):
> # Init console so we can start consuming the chars.
> self.console_init()
> usernet_info = guest.qmp("human-monitor-command",
> - command_line="info usernet")
> + command_line="info usernet").get("return")
> self.ssh_port = get_info_usernet_hostfwd_port(usernet_info)
>From here, your file differs from the upstream and your patch does not
work. I'm trying on commit 52848929b70dcf92a68aedcfd90207be81ba3274.
> if not self.ssh_port:
> raise Exception("Cannot find ssh port from 'info usernet':\n%s"
> % \
> --
> 2.25.4
>