From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 12/17] tests/functional: replace avocado process with subprocess
Date: Tue, 7 Oct 2025 12:55:20 +0100 [thread overview]
Message-ID: <20251007115525.1998643-13-alex.bennee@linaro.org> (raw)
In-Reply-To: <20251007115525.1998643-1-alex.bennee@linaro.org>
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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251003141820.85278-6-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py
index f9a1d395f1d..a7ff47cb90c 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')
--
2.47.3
next prev parent reply other threads:[~2025-10-07 11:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 11:55 [PULL 00/17] testing updates Alex Bennée
2025-10-07 11:55 ` [PULL 01/17] .gitpublish: use origin/master as default base Alex Bennée
2025-10-07 11:55 ` [PULL 02/17] .gitmodules: restore qemu-project mirror of u-boot Alex Bennée
2025-10-07 11:55 ` [PULL 03/17] .gitmodules: restore qemu-project mirror of u-boot-sam460ex Alex Bennée
2025-10-07 11:55 ` [PULL 04/17] tests/lcitool: drop 64 bit guests from i686 cross build Alex Bennée
2025-10-07 11:55 ` [PULL 05/17] tests/lcitool: bump custom runner packages to Ubuntu 24.04 Alex Bennée
2025-10-07 11:55 ` [PULL 06/17] gitlab: move custom runners " Alex Bennée
2025-10-07 11:55 ` [PULL 07/17] scripts/ci: use recommended registration command Alex Bennée
2025-10-07 11:55 ` [PULL 08/17] tests/functional: Re-activate the check-venv target Alex Bennée
2025-10-07 11:55 ` [PULL 09/17] python: Install pygdbmi in meson's venv Alex Bennée
2025-10-07 11:55 ` [PULL 10/17] tests/functional: Provide GDB to the functional tests Alex Bennée
2025-10-07 11:55 ` [PULL 11/17] tests/functional: Add GDB class Alex Bennée
2025-10-07 11:55 ` Alex Bennée [this message]
2025-10-07 11:55 ` [PULL 13/17] tests/functional: drop datadrainer class in reverse debugging Alex Bennée
2025-10-07 11:55 ` [PULL 14/17] tests/functional: Add decorator to skip test on missing env vars Alex Bennée
2025-10-07 11:55 ` [PULL 15/17] tests/functional: Adapt reverse_debugging to run w/o Avocado Alex Bennée
2025-10-07 11:55 ` [PULL 16/17] tests/functional: Adapt arches to reverse_debugging " Alex Bennée
2025-10-07 11:55 ` [PULL 17/17] record/replay: fix race condition on test_aarch64_reverse_debug Alex Bennée
2025-10-07 22:58 ` [PULL 00/17] testing updates Richard Henderson
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=20251007115525.1998643-13-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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).