From: Thomas Huth <thuth@redhat.com>
To: Gustavo Romero <gustavo.romero@linaro.org>,
qemu-devel@nongnu.org, alex.bennee@linaro.org,
berrange@redhat.com
Cc: qemu-arm@nongnu.org, manos.pitsidianakis@linaro.org,
peter.maydell@linaro.org
Subject: Re: [PATCH v4 5/9] tests/functional: replace avocado process with subprocess
Date: Fri, 26 Sep 2025 09:10:29 +0200 [thread overview]
Message-ID: <650efc3c-26e5-46e7-bd3c-c186e443939d@redhat.com> (raw)
In-Reply-To: <20250926051542.104432-6-gustavo.romero@linaro.org>
On 26/09/2025 07.15, Gustavo Romero wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
>
> The standard python subprocess.check_call method is better than
> avocado.utils.process as it doesn't require stuffing all args
> into a single string.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> tests/functional/reverse_debugging.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py
> index f9a1d395f1..a7ff47cb90 100644
> --- a/tests/functional/reverse_debugging.py
> +++ b/tests/functional/reverse_debugging.py
> @@ -11,6 +11,7 @@
> # later. See the COPYING file in the top-level directory.
> import os
> import logging
> +from subprocess import check_output
>
> from qemu_test import LinuxKernelTest, get_qemu_img
> from qemu_test.ports import Ports
> @@ -100,7 +101,6 @@ def vm_get_icount(vm):
>
> def reverse_debugging(self, shift=7, args=None):
> from avocado.utils import gdb
> - from avocado.utils import process
>
> logger = logging.getLogger('replay')
>
> @@ -111,8 +111,9 @@ def reverse_debugging(self, shift=7, args=None):
> if qemu_img is None:
> self.skipTest('Could not find "qemu-img", which is required to '
> 'create the temporary qcow2 image')
> - cmd = '%s create -f qcow2 %s 128M' % (qemu_img, image_path)
> - process.run(cmd)
> + out = check_output([qemu_img, 'create', '-f', 'qcow2', image_path, '128M'],
> + encoding='utf8')
> + logger.info("qemu-img: %s" % out)
>
> replay_path = os.path.join(self.workdir, 'replay.bin')
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2025-09-26 7:16 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 5:15 [PATCH v4 0/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-09-26 5:15 ` [PATCH v4 1/9] tests/functional: Re-activate the check-venv target Gustavo Romero
2025-09-26 6:28 ` Thomas Huth
2025-09-26 8:34 ` Thomas Huth
2025-09-26 8:37 ` Daniel P. Berrangé
2025-09-26 8:42 ` Thomas Huth
2025-09-26 8:50 ` Daniel P. Berrangé
2025-09-26 15:44 ` Gustavo Romero
2025-09-26 15:47 ` Daniel P. Berrangé
2025-09-26 16:02 ` Gustavo Romero
2025-09-26 15:43 ` Gustavo Romero
2025-09-29 6:26 ` Thomas Huth
2025-09-29 6:29 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 2/9] python: Install pygdbmi in meson's venv Gustavo Romero
2025-09-26 6:28 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 3/9] tests/functional: Provide GDB to the functional tests Gustavo Romero
2025-09-26 10:03 ` Thomas Huth
2025-09-26 18:08 ` Gustavo Romero
2025-09-26 18:15 ` Gustavo Romero
2025-09-29 6:34 ` Thomas Huth
2025-09-29 8:03 ` Daniel P. Berrangé
2025-09-26 5:15 ` [PATCH v4 4/9] tests/functional: Add GDB class Gustavo Romero
2025-09-26 7:05 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 5/9] tests/functional: replace avocado process with subprocess Gustavo Romero
2025-09-26 7:10 ` Thomas Huth [this message]
2025-09-26 5:15 ` [PATCH v4 6/9] tests/functional: drop datadrainer class in reverse debugging Gustavo Romero
2025-09-26 7:13 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 7/9] tests/functional: Add decorator to skip test on missing env vars Gustavo Romero
2025-09-26 7:20 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 8/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-09-26 8:44 ` Thomas Huth
2025-09-26 16:00 ` Gustavo Romero
2025-09-29 6:24 ` Thomas Huth
2025-09-26 5:15 ` [PATCH v4 9/9] tests/functional: Adapt arches to reverse_debugging " Gustavo Romero
2025-09-26 9:09 ` Thomas Huth
2025-09-26 6:49 ` [PATCH v4 0/9] tests/functional: Adapt reverse_debugging to run " Philippe Mathieu-Daudé
2025-09-26 9:14 ` Thomas Huth
2025-09-26 9:32 ` Philippe Mathieu-Daudé
2025-09-26 9:41 ` Daniel P. Berrangé
2025-09-26 9:42 ` Thomas Huth
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=650efc3c-26e5-46e7-bd3c-c186e443939d@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).