summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-10-03 14:18:16 +0000
committerAlex Bennée <alex.bennee@linaro.org>2025-10-07 07:33:40 +0100
commita0ad64c390b19242ae1d246d1ccfff77dcc752a4 (patch)
tree0f78d2d24cfca5b820450fd4b6a59492d33b69d2
parentaa7b1b726a0009c9147d9e2f64e0f6e82d4394af (diff)
downloadfocaccia-qemu-a0ad64c390b19242ae1d246d1ccfff77dcc752a4.tar.gz
focaccia-qemu-a0ad64c390b19242ae1d246d1ccfff77dcc752a4.zip
tests/functional: replace avocado process with subprocess
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>
-rw-r--r--tests/functional/reverse_debugging.py7
1 files 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 @@ class ReverseDebugging(LinuxKernelTest):
 
     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 @@ class ReverseDebugging(LinuxKernelTest):
         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')