public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests
@ 2026-03-06 16:17 Alex Bennée
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

This is the current status of my testing tree. The gdb-multiarch and
filtering changes should be pretty uncontroversial. Due to the
enhancements I needed to make to get the vbsa linux tests running they
may want to cook a bit longer and wait until the 11.0 release is out
of the way.

Please review

Alex.

Alex Bennée (6):
  tests/docker: add gdb-multiarch to all-test-cross
  tests/tcg: allow filtering of TCG tests
  tests/functional: teach uncompress about zip files
  tests/functional: allow tests to define decompression target
  tests/functional: add the ability to send keys
  tests/functional: add VBSA linux tests

Matheus Tavares Bernardino (1):
  tests/tcg/multiarch/linux-test: use portable alternative for dirent64

 tests/tcg/multiarch/linux/linux-test.c        |   5 +-
 tests/Makefile.include                        |   8 +-
 .../dockerfiles/debian-all-test-cross.docker  |   1 +
 tests/functional/aarch64/test_virt_vbsa.py    | 123 ++++++++++++++++--
 tests/functional/qemu_test/__init__.py        |   3 +-
 tests/functional/qemu_test/cmd.py             |  15 +++
 tests/functional/qemu_test/testcase.py        |   9 +-
 tests/functional/qemu_test/uncompress.py      |  25 ++++
 tests/lcitool/refresh                         |   1 +
 tests/tcg/Makefile.target                     |  12 +-
 10 files changed, 181 insertions(+), 21 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:30   ` Pierrick Bouvier
                     ` (2 more replies)
  2026-03-06 16:17 ` [PATCH 2/7] tests/tcg: allow filtering of TCG tests Alex Bennée
                   ` (5 subsequent siblings)
  6 siblings, 3 replies; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

This allows the gdb integration tests to be run as well.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
 tests/lcitool/refresh                                 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
index b73776d95b5..287770a995a 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -59,6 +59,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
   apt install -y --no-install-recommends \
   clang\
   dpkg-dev\
+  gdb-multiarch\
   libclang-rt-dev
 ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \
   libc6-dev-arm64-cross \
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index 3e4b026035b..259e6ea0729 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -167,6 +167,7 @@ debian_all_test_cross_compilers = [
     "  apt install -y --no-install-recommends \\\n",
     "  clang\\\n",
     "  dpkg-dev\\\n",
+    "  gdb-multiarch\\\n",
     "  libclang-rt-dev\n",
     "ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \\\n",
     "  libc6-dev-arm64-cross \\\n",
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/7] tests/tcg: allow filtering of TCG tests
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:34   ` Pierrick Bouvier
  2026-03-06 16:17 ` [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

We have a lot of TCG tests now which can be fiddly if we just want to
check one particular test type across the targets. Introduce
TCG_TEST_FILTER to allow this:

  make check-tcg TCG_TEST_FILTER=gdb

to run all the gdb tests across the suites.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/Makefile.include    |  8 +++++---
 tests/tcg/Makefile.target | 12 +++++++++++-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 59b9a4b9220..f257288194d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -16,9 +16,11 @@ check-help:
 	@echo " $(MAKE) check-tracetool               Run tracetool generator tests"
 	@echo " $(MAKE) check-block                   Run block tests"
 ifneq ($(filter $(all-check-targets), check-softfloat),)
-	@echo " $(MAKE) check-tcg                     Run TCG tests"
 	@echo " $(MAKE) check-softfloat               Run FPU emulation tests"
-	@echo " $(MAKE) run-tcg-tests-TARGET-softmmu  Run TCG tests for a given target"
+	@echo " $(MAKE) check-tcg                     Run TCG tests"
+	@echo " $(MAKE) run-tcg-tests-TARGET          Run TCG tests for a given target"
+	@echo
+	@echo "The variable TCG_TEST_FILTER will select the subset of matching tests."
 endif
 	@echo
 	@echo " $(MAKE) check-report.junit.xml        Generates an aggregated XML test report"
@@ -64,7 +66,7 @@ $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/
 .PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%)
 $(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-%
 	$(call quiet-command, \
-           $(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) run, \
+           $(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) TCG_TEST_FILTER=$(TCG_TEST_FILTER) run, \
         "RUN", "$* guest-tests")
 
 .PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%)
diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index af72903f898..1b83824ff4e 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -254,8 +254,15 @@ endif
 gdb-%: %
 	gdb --args $(QEMU) $(QEMU_OPTS) $<
 
+# Filter tests based on TCG_TEST_FILTER if set
+ifdef TCG_TEST_FILTER
+FILTERED_RUN_TESTS=$(foreach test,$(RUN_TESTS),$(if $(findstring $(TCG_TEST_FILTER),$(test)),$(test)))
+else
+FILTERED_RUN_TESTS=$(RUN_TESTS)
+endif
+
 .PHONY: run
-run: $(RUN_TESTS)
+run: $(FILTERED_RUN_TESTS)
 
 clean:
 	rm -f $(TESTS) *.o $(CLEANFILES)
@@ -269,3 +276,6 @@ help:
 	@echo "Built with $(CC)"
 	@echo "Available tests:"
 	@$(foreach t,$(RUN_TESTS),echo "  $t";)
+	@echo ""
+	@echo "Environment variables:"
+	@echo "  TCG_TEST_FILTER=<pattern>  Filter tests matching pattern"
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
  2026-03-06 16:17 ` [PATCH 2/7] tests/tcg: allow filtering of TCG tests Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:34   ` Pierrick Bouvier
  2026-03-06 16:17 ` [PATCH 4/7] tests/functional: teach uncompress about zip files Alex Bennée
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé,
	Matheus Tavares Bernardino, Brian Cain

From: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>

dirent64 and readdir64 are glibc-specific and not portable to other
C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which
portably instructs all libc implementations to use 64-bit file offsets,
making readdir() and struct dirent equivalent to their 64-bit variants.

Signed-off-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Message-ID: <af31d21c4d668cfb940ba4159f584fa6454c3d82.1772107448.git.matheus.bernardino@oss.qualcomm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/multiarch/linux/linux-test.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/multiarch/linux/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c
index bf6e0fda262..0fa3165602f 100644
--- a/tests/tcg/multiarch/linux/linux-test.c
+++ b/tests/tcg/multiarch/linux/linux-test.c
@@ -16,6 +16,7 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+#define _FILE_OFFSET_BITS 64
 #define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
@@ -83,7 +84,7 @@ static void test_file(void)
     struct utimbuf tbuf;
     struct iovec vecs[2];
     DIR *dir;
-    struct dirent64 *de;
+    struct dirent *de;
     /* TODO: make common tempdir creation for tcg tests */
     char template[] = "/tmp/linux-test-XXXXXX";
     char *tmpdir = mkdtemp(template);
@@ -191,7 +192,7 @@ static void test_file(void)
         error("opendir");
     len = 0;
     for(;;) {
-        de = readdir64(dir);
+        de = readdir(dir);
         if (!de)
             break;
         if (strcmp(de->d_name, ".") != 0 &&
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 4/7] tests/functional: teach uncompress about zip files
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
                   ` (2 preceding siblings ...)
  2026-03-06 16:17 ` [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:35   ` Pierrick Bouvier
  2026-03-06 19:49   ` Thomas Huth
  2026-03-06 16:17 ` [PATCH 5/7] tests/functional: allow tests to define decompression target Alex Bennée
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

Yes people still use them.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/qemu_test/uncompress.py | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qemu_test/uncompress.py
index 5bbdf8fe323..f1a0e583a5b 100644
--- a/tests/functional/qemu_test/uncompress.py
+++ b/tests/functional/qemu_test/uncompress.py
@@ -12,6 +12,7 @@
 import os
 import stat
 import shutil
+import zipfile
 from urllib.parse import urlparse
 from subprocess import run, CalledProcessError
 
@@ -58,6 +59,26 @@ def zstd_uncompress(zstd_path, output_path):
     os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR)
 
 
+def zip_uncompress(zip_path, output_path):
+    if os.path.exists(output_path):
+        return
+    with zipfile.ZipFile(zip_path, 'r') as zip_in:
+        try:
+            # Get the first file from the archive
+            names = zip_in.namelist()
+            if len(names) != 1:
+                raise Exception(
+                    f"Zip file {zip_path} should contain exactly one file, "
+                    f"but contains {len(names)}")
+            with zip_in.open(names[0], 'r') as archived_file:
+                with open(output_path, 'wb') as raw_out:
+                    shutil.copyfileobj(archived_file, raw_out)
+        except:
+            if os.path.exists(output_path):
+                os.remove(output_path)
+            raise
+
+
 def uncompress(compressed, uncompressed, format=None):
     '''
     @params compressed: filename, Asset, or file-like object to uncompress
@@ -81,6 +102,8 @@ def uncompress(compressed, uncompressed, format=None):
         gzip_uncompress(str(compressed), uncompressed)
     elif format == "zstd":
         zstd_uncompress(str(compressed), uncompressed)
+    elif format == "zip":
+        zip_uncompress(str(compressed), uncompressed)
     else:
         raise Exception(f"Unknown compression format {format}")
 
@@ -103,5 +126,7 @@ def guess_uncompress_format(compressed):
         return "gz"
     elif ext in [".zstd", ".zst"]:
         return 'zstd'
+    elif ext == ".zip":
+        return 'zip'
     else:
         raise Exception(f"Unknown compression format for {compressed}")
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 5/7] tests/functional: allow tests to define decompression target
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
                   ` (3 preceding siblings ...)
  2026-03-06 16:17 ` [PATCH 4/7] tests/functional: teach uncompress about zip files Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:35   ` Pierrick Bouvier
  2026-03-06 16:17 ` [PATCH 6/7] tests/functional: add the ability to send keys Alex Bennée
  2026-03-06 16:17 ` [PATCH 7/7] tests/functional: add VBSA linux tests Alex Bennée
  6 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

When dealing with multi-stage decompression we want to specify the
target file name lest we just overload the cache name. It also allows
for something is little more friendly than the cache hash.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/qemu_test/testcase.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index c2c916f6077..eaec1bea138 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -35,7 +35,7 @@
 
 class QemuBaseTest(unittest.TestCase):
 
-    def uncompress(self, compressed, format=None):
+    def uncompress(self, compressed, target=None, format=None):
         '''
         @params compressed: filename, Asset, or file-like object to uncompress
         @params format: optional compression format (gzip, lzma)
@@ -52,8 +52,11 @@ def uncompress(self, compressed, format=None):
         if isinstance(compressed, Asset):
             compressed.fetch()
 
-        (name, _ext) = os.path.splitext(str(compressed))
-        uncompressed = self.scratch_file(os.path.basename(name))
+        if target is not None:
+            uncompressed = self.scratch_file(target)
+        else:
+            (name, _ext) = os.path.splitext(str(compressed))
+            uncompressed = self.scratch_file(os.path.basename(name))
 
         uncompress(compressed, uncompressed, format)
 
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 6/7] tests/functional: add the ability to send keys
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
                   ` (4 preceding siblings ...)
  2026-03-06 16:17 ` [PATCH 5/7] tests/functional: allow tests to define decompression target Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:41   ` Pierrick Bouvier
  2026-03-06 16:17 ` [PATCH 7/7] tests/functional: add VBSA linux tests Alex Bennée
  6 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

To navigate things like grub we need to send individual keys without
trying to look for success messages.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/qemu_test/__init__.py |  3 ++-
 tests/functional/qemu_test/cmd.py      | 15 +++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
index 03e5c73d39d..9ed8c6a4b53 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -10,7 +10,8 @@
 from .config import BUILD_DIR, dso_suffix
 from .cmd import is_readable_executable_file, \
     interrupt_interactive_console_until_pattern, wait_for_console_pattern, \
-    exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which
+    exec_command, exec_command_and_wait_for_pattern, get_qemu_img, \
+    which, send_key
 from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
 from .linuxkernel import LinuxKernelTest
 from .decorators import skipIfMissingCommands, skipIfNotMachine, \
diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py
index f544566245b..381e5162f02 100644
--- a/tests/functional/qemu_test/cmd.py
+++ b/tests/functional/qemu_test/cmd.py
@@ -142,6 +142,21 @@ def _console_interaction(test, success_message, failure_message,
 
     return out
 
+def send_key(test, key, delay=0.2, vm=None):
+    """
+    Send a single key to the console.
+
+    :key: key to send
+    :delay: debounce delay to wait
+    :vm: the vm to send to, defaults to test.vm
+    """
+    if vm is None:
+        vm = test.vm
+
+    test.log.debug(f"Sending key: {key}")
+    vm.console_socket.sendall(key.encode())
+
+
 def interrupt_interactive_console_until_pattern(test, success_message,
                                                 failure_message=None,
                                                 interrupt_string='\r',
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 7/7] tests/functional: add VBSA linux tests
  2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
                   ` (5 preceding siblings ...)
  2026-03-06 16:17 ` [PATCH 6/7] tests/functional: add the ability to send keys Alex Bennée
@ 2026-03-06 16:17 ` Alex Bennée
  2026-03-06 17:41   ` Pierrick Bouvier
  6 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Brad Smith, qemu-arm, Alex Bennée, Pierrick Bouvier,
	Kyle Evans, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

This extends the VBSA test to run the linux tests. The sysarch-acs
test suite does provide some pre-built images which is good because
the tests require a patched kernel. However due to the structure of
the image we need to jump one or two hoops to get something useful:

  - download and double decompress (zip then xz) the image
  - navigate grub to launch the Linux Execution Environment
  - shutdown the system once tests are done
  - extract the logs from the MSDOS file system and parse them

It does make the code a bit ugly but it works for me at least. So far
the subset of tests run is limited but that might be solved by adding
some more devices to the PCIe bus to exercise the SMMU behaviour.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/aarch64/test_virt_vbsa.py | 123 +++++++++++++++++++--
 1 file changed, 112 insertions(+), 11 deletions(-)

diff --git a/tests/functional/aarch64/test_virt_vbsa.py b/tests/functional/aarch64/test_virt_vbsa.py
index 1dd4cecde1e..0456dfe9fd5 100755
--- a/tests/functional/aarch64/test_virt_vbsa.py
+++ b/tests/functional/aarch64/test_virt_vbsa.py
@@ -10,12 +10,15 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 import shutil
-from subprocess import check_call, DEVNULL
+import re
+from subprocess import check_call, check_output, DEVNULL
 
 from qemu_test import QemuSystemTest, Asset
 from qemu_test import get_qemu_img, skipIfMissingCommands
 from qemu_test import wait_for_console_pattern
+from qemu_test import interrupt_interactive_console_until_pattern as int_until
 from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait
+from qemu_test import send_key
 
 
 @skipIfMissingCommands("mformat", "mcopy", "mmd")
@@ -28,6 +31,20 @@ def wait_for_console_pattern(self, success_message, vm=None):
                                  failure_message='FAILED',
                                  vm=vm)
 
+    def append_firmware_blobs(self):
+        """
+        Setup QEMU firmware blobs for boot.
+        """
+        code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd')
+        vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd')
+        vars_path = self.scratch_file('vars.fd')
+        shutil.copy(vars_source, vars_path)
+
+        self.vm.add_args('-drive',
+                         f'if=pflash,format=raw,readonly=on,file={code_path}')
+        self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}')
+
+
     ASSET_VBSA_EFI = Asset(
         'https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main'
         '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Vbsa.efi',
@@ -45,20 +62,12 @@ def test_aarch64_vbsa_uefi_tests(self):
 
         self.vm.set_console()
 
-        # virt machine wi
+        # virt machine
         self.set_machine('virt')
         self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on')
         self.vm.add_args('-cpu', 'max', '-m', '1024')
 
-        # We will use the QEMU firmware blobs to boot
-        code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd')
-        vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd')
-        vars_path = self.scratch_file('vars.fd')
-        shutil.copy(vars_source, vars_path)
-
-        self.vm.add_args('-drive',
-                         f'if=pflash,format=raw,readonly=on,file={code_path}')
-        self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}')
+        self.append_firmware_blobs()
 
         # Build an EFI FAT32 file-system for the UEFI tests
         vbsa_efi = self.ASSET_VBSA_EFI.fetch()
@@ -102,5 +111,97 @@ def test_aarch64_vbsa_uefi_tests(self):
         self.wait_for_console_pattern('VBSA tests complete. Reset the system.')
 
 
+    ASSET_SYSREADY_IMAGE = Asset(
+        'https://github.com/ARM-software/arm-systemready/'
+        'releases/download/v25.10_SR_3.1.0/systemready_acs_live_image.img.xz.zip',
+        'df2c359de15784b1da6a8e6f3c98a053ee38ac0b3f241ccea62e17db092eb03a')
+
+    ROOT_PROMPT = '/ # '
+    DOWN_KEY = "\x1b[B"
+
+    @skipIfMissingCommands("sfdisk", "jq")
+    def test_aarch64_vbsa_linux_tests(self):
+        """
+        Launch the Linux based VBSA test from the ACS prebuilt images.
+
+        We can use the pre-built images and then trigger the Linux
+        build and run the tests. We then need to slurp the results
+        from the partition.
+        """
+
+        self.vm.set_console()
+
+        # virt machine with SMMU
+        self.set_machine('virt')
+        self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on,iommu=smmuv3')
+        self.vm.add_args('-cpu', 'max', '-m', '1024', '-smp', '4')
+
+        self.append_firmware_blobs()
+
+        # First fetch, decompress (twice) and prepare the disk image
+        # on an NVME device (the kernel only has drivers for that).
+        disk_image_zip = self.ASSET_SYSREADY_IMAGE.fetch()
+        disk_image_xz = self.uncompress(disk_image_zip,
+                                        target="sysacs.xz", format="zip")
+        disk_image = self.uncompress(disk_image_xz,
+                                     target="sysacs.img", format="xz")
+
+        self.vm.add_args('-device',
+                         'nvme,drive=hd,serial=QEMU_ROOT_SSD')
+        self.vm.add_args('-blockdev',
+                         f'driver=raw,node-name=hd,file.driver=file,file.filename={disk_image}')
+
+        # Launch QEMU and wait for grub and select the "Linux
+        # Execution Environment" so we can launch the test.
+
+        self.vm.launch()
+        self.wait_for_console_pattern('Use the ^ and v keys to select which entry is highlighted')
+
+        # 3 down arrows then return to select entry
+        send_key(self, self.DOWN_KEY)
+        send_key(self, self.DOWN_KEY)
+        send_key(self, self.DOWN_KEY)
+
+        ec_and_wait(self, "\n", self.ROOT_PROMPT)
+
+        ec_and_wait(self, "/usr/bin/bsa.sh --skip B_REP_1,B_IEP_1,B_PCIe_11,B_MEM_06",
+                    self.ROOT_PROMPT)
+
+        # Now we can shutdown
+        ec_and_wait(self, "halt -f", "reboot: System halted")
+        self.vm.shutdown()
+
+        # and extract the test logs
+        offset = int(check_output(f"sfdisk --json {disk_image} |"
+                                  "jq '.partitiontable.partitions[0].start * 512'",
+                                  shell = True))
+        bsa_app_res = self.scratch_file("BsaResultsApp.log")
+        bsa_kern_res = self.scratch_file("BsaResultsKernel.log")
+
+        check_call(["mcopy", "-i", f"{disk_image}@@{offset}",
+                    f"::acs_results/Linux/BsaResultsApp.log", bsa_app_res])
+        check_call(["mcopy", "-i", f"{disk_image}@@{offset}",
+                    f"::acs_results/Linux/BsaResultsKernel.log", bsa_kern_res])
+
+        # for now just check the kernel log for the result summary
+        test_result_re = re.compile(r"\[.*\]\s+(.+): Result:\s+(\w+)")
+        summary_re = re.compile(r"Total Tests Run =\s*(\d+), Tests Passed =\s*(\d+), Tests Failed =\s*(\d+)")
+
+        with open(bsa_kern_res, 'r') as f:
+            for line in f:
+                test_match = test_result_re.search(line)
+                if test_match:
+                    desc = test_match.group(1)
+                    status = test_match.group(2)
+                    self.log.info(f"Test: {desc} status: {status}")
+
+                match = summary_re.search(line)
+                if match:
+                    total, passed, failed = match.groups()
+
+                    if int(failed) > 0:
+                        self.fail(f"{failed} tests failed ({total})")
+
+
 if __name__ == '__main__':
     QemuSystemTest.main()
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
@ 2026-03-06 17:30   ` Pierrick Bouvier
  2026-03-06 17:32   ` Pierrick Bouvier
  2026-03-10 22:33   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:30 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
  2026-03-06 17:30   ` Pierrick Bouvier
@ 2026-03-06 17:32   ` Pierrick Bouvier
  2026-03-10 22:33   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:32 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
> index b73776d95b5..287770a995a 100644
> --- a/tests/docker/dockerfiles/debian-all-test-cross.docker
> +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
> @@ -59,6 +59,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
>     apt install -y --no-install-recommends \
>     clang\
>     dpkg-dev\
> +  gdb-multiarch\
>     libclang-rt-dev
>   ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \
>     libc6-dev-arm64-cross \
> diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
> index 3e4b026035b..259e6ea0729 100755
> --- a/tests/lcitool/refresh
> +++ b/tests/lcitool/refresh
> @@ -167,6 +167,7 @@ debian_all_test_cross_compilers = [
>       "  apt install -y --no-install-recommends \\\n",
>       "  clang\\\n",
>       "  dpkg-dev\\\n",
> +    "  gdb-multiarch\\\n",
>       "  libclang-rt-dev\n",
>       "ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \\\n",
>       "  libc6-dev-arm64-cross \\\n",

As long as ppc gdbstub is not fixed or Philippe series reverted, you'll 
need also:

diff --git a/tests/tcg/multiarch/Makefile.target 
b/tests/tcg/multiarch/Makefile.target
index a347efbadf0..b6209ee082d 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -156,12 +156,16 @@ else
  run-gdbstub-%:
         $(call skip-test, "gdbstub test $*", "need working gdb with 
$(patsubst -%,,$(TARGET_NAME)) support")
  endif
+
+# gdbstub broken on ppc
+ifneq ($(TARGET_NAME), ppc)
  EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read \
               run-gdbstub-proc-mappings run-gdbstub-thread-breakpoint \
               run-gdbstub-registers run-gdbstub-prot-none \
               run-gdbstub-catch-syscalls 
run-gdbstub-follow-fork-mode-child \
               run-gdbstub-follow-fork-mode-parent \
               run-gdbstub-qxfer-siginfo-read run-gdbstub-late-attach
+endif

  # ARM Compatible Semi Hosting Tests
  #


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/7] tests/tcg: allow filtering of TCG tests
  2026-03-06 16:17 ` [PATCH 2/7] tests/tcg: allow filtering of TCG tests Alex Bennée
@ 2026-03-06 17:34   ` Pierrick Bouvier
  2026-03-06 18:36     ` Alex Bennée
  0 siblings, 1 reply; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:34 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> We have a lot of TCG tests now which can be fiddly if we just want to
> check one particular test type across the targets. Introduce
> TCG_TEST_FILTER to allow this:
> 
>    make check-tcg TCG_TEST_FILTER=gdb
> 
> to run all the gdb tests across the suites.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/Makefile.include    |  8 +++++---
>   tests/tcg/Makefile.target | 12 +++++++++++-
>   2 files changed, 16 insertions(+), 4 deletions(-)
> 

Ideally, we should have a list command available also, so we don't have 
to guess what magic pattern names follow.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64
  2026-03-06 16:17 ` [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
@ 2026-03-06 17:34   ` Pierrick Bouvier
  0 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:34 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé, Matheus Tavares Bernardino,
	Brian Cain

On 3/6/26 8:17 AM, Alex Bennée wrote:
> From: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
> 
> dirent64 and readdir64 are glibc-specific and not portable to other
> C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which
> portably instructs all libc implementations to use 64-bit file offsets,
> making readdir() and struct dirent equivalent to their 64-bit variants.
> 
> Signed-off-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
> Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
> Message-ID: <af31d21c4d668cfb940ba4159f584fa6454c3d82.1772107448.git.matheus.bernardino@oss.qualcomm.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/tcg/multiarch/linux/linux-test.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 4/7] tests/functional: teach uncompress about zip files
  2026-03-06 16:17 ` [PATCH 4/7] tests/functional: teach uncompress about zip files Alex Bennée
@ 2026-03-06 17:35   ` Pierrick Bouvier
  2026-03-06 19:49   ` Thomas Huth
  1 sibling, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:35 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> Yes people still use them.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/qemu_test/uncompress.py | 25 ++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 5/7] tests/functional: allow tests to define decompression target
  2026-03-06 16:17 ` [PATCH 5/7] tests/functional: allow tests to define decompression target Alex Bennée
@ 2026-03-06 17:35   ` Pierrick Bouvier
  0 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:35 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> When dealing with multi-stage decompression we want to specify the
> target file name lest we just overload the cache name. It also allows
> for something is little more friendly than the cache hash.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/qemu_test/testcase.py | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 7/7] tests/functional: add VBSA linux tests
  2026-03-06 16:17 ` [PATCH 7/7] tests/functional: add VBSA linux tests Alex Bennée
@ 2026-03-06 17:41   ` Pierrick Bouvier
  0 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:41 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> This extends the VBSA test to run the linux tests. The sysarch-acs
> test suite does provide some pre-built images which is good because
> the tests require a patched kernel. However due to the structure of
> the image we need to jump one or two hoops to get something useful:
> 
>    - download and double decompress (zip then xz) the image
>    - navigate grub to launch the Linux Execution Environment
>    - shutdown the system once tests are done
>    - extract the logs from the MSDOS file system and parse them
> 
> It does make the code a bit ugly but it works for me at least. So far
> the subset of tests run is limited but that might be solved by adding
> some more devices to the PCIe bus to exercise the SMMU behaviour.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/aarch64/test_virt_vbsa.py | 123 +++++++++++++++++++--
>   1 file changed, 112 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/functional/aarch64/test_virt_vbsa.py b/tests/functional/aarch64/test_virt_vbsa.py
> index 1dd4cecde1e..0456dfe9fd5 100755
> --- a/tests/functional/aarch64/test_virt_vbsa.py
> +++ b/tests/functional/aarch64/test_virt_vbsa.py
> @@ -10,12 +10,15 @@
>   # SPDX-License-Identifier: GPL-2.0-or-later
>   
>   import shutil
> -from subprocess import check_call, DEVNULL
> +import re
> +from subprocess import check_call, check_output, DEVNULL
>   
>   from qemu_test import QemuSystemTest, Asset
>   from qemu_test import get_qemu_img, skipIfMissingCommands
>   from qemu_test import wait_for_console_pattern
> +from qemu_test import interrupt_interactive_console_until_pattern as int_until
>   from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait
> +from qemu_test import send_key
>   
>   
>   @skipIfMissingCommands("mformat", "mcopy", "mmd")
> @@ -28,6 +31,20 @@ def wait_for_console_pattern(self, success_message, vm=None):
>                                    failure_message='FAILED',
>                                    vm=vm)
>   
> +    def append_firmware_blobs(self):
> +        """
> +        Setup QEMU firmware blobs for boot.
> +        """
> +        code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd')
> +        vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd')
> +        vars_path = self.scratch_file('vars.fd')
> +        shutil.copy(vars_source, vars_path)
> +
> +        self.vm.add_args('-drive',
> +                         f'if=pflash,format=raw,readonly=on,file={code_path}')
> +        self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}')
> +
> +
>       ASSET_VBSA_EFI = Asset(
>           'https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main'
>           '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Vbsa.efi',
> @@ -45,20 +62,12 @@ def test_aarch64_vbsa_uefi_tests(self):
>   
>           self.vm.set_console()
>   
> -        # virt machine wi
> +        # virt machine
>           self.set_machine('virt')
>           self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on')
>           self.vm.add_args('-cpu', 'max', '-m', '1024')
>   
> -        # We will use the QEMU firmware blobs to boot
> -        code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd')
> -        vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd')
> -        vars_path = self.scratch_file('vars.fd')
> -        shutil.copy(vars_source, vars_path)
> -
> -        self.vm.add_args('-drive',
> -                         f'if=pflash,format=raw,readonly=on,file={code_path}')
> -        self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}')
> +        self.append_firmware_blobs()
>   
>           # Build an EFI FAT32 file-system for the UEFI tests
>           vbsa_efi = self.ASSET_VBSA_EFI.fetch()
> @@ -102,5 +111,97 @@ def test_aarch64_vbsa_uefi_tests(self):
>           self.wait_for_console_pattern('VBSA tests complete. Reset the system.')
>   
>   
> +    ASSET_SYSREADY_IMAGE = Asset(
> +        'https://github.com/ARM-software/arm-systemready/'
> +        'releases/download/v25.10_SR_3.1.0/systemready_acs_live_image.img.xz.zip',
> +        'df2c359de15784b1da6a8e6f3c98a053ee38ac0b3f241ccea62e17db092eb03a')
> +
> +    ROOT_PROMPT = '/ # '
> +    DOWN_KEY = "\x1b[B"
> +
> +    @skipIfMissingCommands("sfdisk", "jq")
> +    def test_aarch64_vbsa_linux_tests(self):
> +        """
> +        Launch the Linux based VBSA test from the ACS prebuilt images.
> +
> +        We can use the pre-built images and then trigger the Linux
> +        build and run the tests. We then need to slurp the results
> +        from the partition.
> +        """
> +
> +        self.vm.set_console()
> +
> +        # virt machine with SMMU
> +        self.set_machine('virt')
> +        self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on,iommu=smmuv3')
> +        self.vm.add_args('-cpu', 'max', '-m', '1024', '-smp', '4')
> +
> +        self.append_firmware_blobs()
> +
> +        # First fetch, decompress (twice) and prepare the disk image
> +        # on an NVME device (the kernel only has drivers for that).
> +        disk_image_zip = self.ASSET_SYSREADY_IMAGE.fetch()
> +        disk_image_xz = self.uncompress(disk_image_zip,
> +                                        target="sysacs.xz", format="zip")
> +        disk_image = self.uncompress(disk_image_xz,
> +                                     target="sysacs.img", format="xz")
> +
> +        self.vm.add_args('-device',
> +                         'nvme,drive=hd,serial=QEMU_ROOT_SSD')
> +        self.vm.add_args('-blockdev',
> +                         f'driver=raw,node-name=hd,file.driver=file,file.filename={disk_image}')
> +
> +        # Launch QEMU and wait for grub and select the "Linux
> +        # Execution Environment" so we can launch the test.
> +
> +        self.vm.launch()
> +        self.wait_for_console_pattern('Use the ^ and v keys to select which entry is highlighted')
> +
> +        # 3 down arrows then return to select entry
> +        send_key(self, self.DOWN_KEY)
> +        send_key(self, self.DOWN_KEY)
> +        send_key(self, self.DOWN_KEY)
> +

As a suggestion,
Alternatively, is it possible to modify the image to select a different 
kind of command?
I have no idea which bootloader they use, but if it's grub or simply a 
UEFI shell script, it should be quite easy to generate the right entry.

> +        ec_and_wait(self, "\n", self.ROOT_PROMPT)
> +
> +        ec_and_wait(self, "/usr/bin/bsa.sh --skip B_REP_1,B_IEP_1,B_PCIe_11,B_MEM_06",
> +                    self.ROOT_PROMPT)
> +
> +        # Now we can shutdown
> +        ec_and_wait(self, "halt -f", "reboot: System halted")
> +        self.vm.shutdown()
> +
> +        # and extract the test logs
> +        offset = int(check_output(f"sfdisk --json {disk_image} |"
> +                                  "jq '.partitiontable.partitions[0].start * 512'",
> +                                  shell = True))
> +        bsa_app_res = self.scratch_file("BsaResultsApp.log")
> +        bsa_kern_res = self.scratch_file("BsaResultsKernel.log")
> +
> +        check_call(["mcopy", "-i", f"{disk_image}@@{offset}",
> +                    f"::acs_results/Linux/BsaResultsApp.log", bsa_app_res])
> +        check_call(["mcopy", "-i", f"{disk_image}@@{offset}",
> +                    f"::acs_results/Linux/BsaResultsKernel.log", bsa_kern_res])
> +
> +        # for now just check the kernel log for the result summary
> +        test_result_re = re.compile(r"\[.*\]\s+(.+): Result:\s+(\w+)")
> +        summary_re = re.compile(r"Total Tests Run =\s*(\d+), Tests Passed =\s*(\d+), Tests Failed =\s*(\d+)")
> +
> +        with open(bsa_kern_res, 'r') as f:
> +            for line in f:
> +                test_match = test_result_re.search(line)
> +                if test_match:
> +                    desc = test_match.group(1)
> +                    status = test_match.group(2)
> +                    self.log.info(f"Test: {desc} status: {status}")
> +
> +                match = summary_re.search(line)
> +                if match:
> +                    total, passed, failed = match.groups()
> +
> +                    if int(failed) > 0:
> +                        self.fail(f"{failed} tests failed ({total})")
> +
> +
>   if __name__ == '__main__':
>       QemuSystemTest.main()

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 6/7] tests/functional: add the ability to send keys
  2026-03-06 16:17 ` [PATCH 6/7] tests/functional: add the ability to send keys Alex Bennée
@ 2026-03-06 17:41   ` Pierrick Bouvier
  0 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 17:41 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 8:17 AM, Alex Bennée wrote:
> To navigate things like grub we need to send individual keys without
> trying to look for success messages.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/qemu_test/__init__.py |  3 ++-
>   tests/functional/qemu_test/cmd.py      | 15 +++++++++++++++
>   2 files changed, 17 insertions(+), 1 deletion(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/7] tests/tcg: allow filtering of TCG tests
  2026-03-06 17:34   ` Pierrick Bouvier
@ 2026-03-06 18:36     ` Alex Bennée
  2026-03-06 20:49       ` Pierrick Bouvier
  0 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-06 18:36 UTC (permalink / raw)
  To: Pierrick Bouvier
  Cc: qemu-devel, Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> On 3/6/26 8:17 AM, Alex Bennée wrote:
>> We have a lot of TCG tests now which can be fiddly if we just want to
>> check one particular test type across the targets. Introduce
>> TCG_TEST_FILTER to allow this:
>>    make check-tcg TCG_TEST_FILTER=gdb
>> to run all the gdb tests across the suites.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>   tests/Makefile.include    |  8 +++++---
>>   tests/tcg/Makefile.target | 12 +++++++++++-
>>   2 files changed, 16 insertions(+), 4 deletions(-)
>> 
>
> Ideally, we should have a list command available also, so we don't
> have to guess what magic pattern names follow.
>
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

If you run "make help" in one of the TCG test dirs you will get a list:

  ➜  cd tests/tcg/aarch64-softmmu/
  🕙18:35:48 alex@draig:tests/tcg/aarch64-softmmu  on  pr/060326-11.0-virtio-gpu-updates-1:master [$?⇡] 
  ➜  make help
  tests/tcg/aarch64-softmmu: -march=armv8.3-a detected
  tests/tcg/aarch64-softmmu: -march=armv8.5-a+memtag detected
  TCG tests help aarch64
  Built with aarch64-linux-gnu-gcc
  Available tests:
    run-asid2
    run-feat-xs
    run-pauth-3
    run-semiconsole
    run-semiheap
    run-vtimer
    run-mte
    run-hello
    run-interrupt
    run-memory-sve
    run-plugin-hello-with-libdiscons.so
    run-plugin-interrupt-with-libempty.so
    run-gdbstub-memory
    run-gdbstub-interrupt
    run-gdbstub-untimely-packet
    run-gdbstub-registers
    run-memory-replay
    run-gdbstub-mte
    run-plugin-memory-with-libmem.so

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 4/7] tests/functional: teach uncompress about zip files
  2026-03-06 16:17 ` [PATCH 4/7] tests/functional: teach uncompress about zip files Alex Bennée
  2026-03-06 17:35   ` Pierrick Bouvier
@ 2026-03-06 19:49   ` Thomas Huth
  1 sibling, 0 replies; 28+ messages in thread
From: Thomas Huth @ 2026-03-06 19:49 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel, Daniel P. Berrangé
  Cc: Brad Smith, qemu-arm, Pierrick Bouvier, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Warner Losh

On 06/03/2026 17.17, Alex Bennée wrote:
> Yes people still use them.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/qemu_test/uncompress.py | 25 ++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qemu_test/uncompress.py
> index 5bbdf8fe323..f1a0e583a5b 100644
> --- a/tests/functional/qemu_test/uncompress.py
> +++ b/tests/functional/qemu_test/uncompress.py
> @@ -12,6 +12,7 @@
>   import os
>   import stat
>   import shutil
> +import zipfile
>   from urllib.parse import urlparse
>   from subprocess import run, CalledProcessError
>   
> @@ -58,6 +59,26 @@ def zstd_uncompress(zstd_path, output_path):
>       os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR)
>   
>   
> +def zip_uncompress(zip_path, output_path):
> +    if os.path.exists(output_path):
> +        return
> +    with zipfile.ZipFile(zip_path, 'r') as zip_in:
> +        try:
> +            # Get the first file from the archive
> +            names = zip_in.namelist()
> +            if len(names) != 1:
> +                raise Exception(
> +                    f"Zip file {zip_path} should contain exactly one file, "
> +                    f"but contains {len(names)}")
> +            with zip_in.open(names[0], 'r') as archived_file:
> +                with open(output_path, 'wb') as raw_out:
> +                    shutil.copyfileobj(archived_file, raw_out)
> +        except:
> +            if os.path.exists(output_path):
> +                os.remove(output_path)
> +            raise
> +
> +
>   def uncompress(compressed, uncompressed, format=None):
>       '''
>       @params compressed: filename, Asset, or file-like object to uncompress
> @@ -81,6 +102,8 @@ def uncompress(compressed, uncompressed, format=None):
>           gzip_uncompress(str(compressed), uncompressed)
>       elif format == "zstd":
>           zstd_uncompress(str(compressed), uncompressed)
> +    elif format == "zip":
> +        zip_uncompress(str(compressed), uncompressed)
>       else:
>           raise Exception(f"Unknown compression format {format}")

I think you should rather use archive_extract() instead of uncompress() for 
zip files, shouldn't you? ... and if I've got that right, support for zip is 
already included in there.

  Thomas



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/7] tests/tcg: allow filtering of TCG tests
  2026-03-06 18:36     ` Alex Bennée
@ 2026-03-06 20:49       ` Pierrick Bouvier
  0 siblings, 0 replies; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-06 20:49 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini,
	Philippe Mathieu-Daudé, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

On 3/6/26 10:36 AM, Alex Bennée wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> On 3/6/26 8:17 AM, Alex Bennée wrote:
>>> We have a lot of TCG tests now which can be fiddly if we just want to
>>> check one particular test type across the targets. Introduce
>>> TCG_TEST_FILTER to allow this:
>>>     make check-tcg TCG_TEST_FILTER=gdb
>>> to run all the gdb tests across the suites.
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>>    tests/Makefile.include    |  8 +++++---
>>>    tests/tcg/Makefile.target | 12 +++++++++++-
>>>    2 files changed, 16 insertions(+), 4 deletions(-)
>>>
>>
>> Ideally, we should have a list command available also, so we don't
>> have to guess what magic pattern names follow.
>>
>> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 
> If you run "make help" in one of the TCG test dirs you will get a list:
> 
>    ➜  cd tests/tcg/aarch64-softmmu/
>    🕙18:35:48 alex@draig:tests/tcg/aarch64-softmmu  on  pr/060326-11.0-virtio-gpu-updates-1:master [$?⇡]
>    ➜  make help
>    tests/tcg/aarch64-softmmu: -march=armv8.3-a detected
>    tests/tcg/aarch64-softmmu: -march=armv8.5-a+memtag detected
>    TCG tests help aarch64
>    Built with aarch64-linux-gnu-gcc
>    Available tests:
>      run-asid2
>      run-feat-xs
>      run-pauth-3
>      run-semiconsole
>      run-semiheap
>      run-vtimer
>      run-mte
>      run-hello
>      run-interrupt
>      run-memory-sve
>      run-plugin-hello-with-libdiscons.so
>      run-plugin-interrupt-with-libempty.so
>      run-gdbstub-memory
>      run-gdbstub-interrupt
>      run-gdbstub-untimely-packet
>      run-gdbstub-registers
>      run-memory-replay
>      run-gdbstub-mte
>      run-plugin-memory-with-libmem.so
> 

Yes, but I was more thinking at something from the top, without needing 
to dive into every arch.


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
  2026-03-06 17:30   ` Pierrick Bouvier
  2026-03-06 17:32   ` Pierrick Bouvier
@ 2026-03-10 22:33   ` Philippe Mathieu-Daudé
  2026-03-10 23:07     ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-10 22:33 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Pierrick Bouvier, Kyle Evans, Paolo Bonzini,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

On 6/3/26 17:17, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-10 22:33   ` Philippe Mathieu-Daudé
@ 2026-03-10 23:07     ` Philippe Mathieu-Daudé
  2026-03-10 23:22       ` Pierrick Bouvier
  0 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-10 23:07 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel, Ilya Leoshkevich
  Cc: Brad Smith, qemu-arm, Pierrick Bouvier, Kyle Evans, Paolo Bonzini,
	Peter Maydell, Thomas Huth, Warner Losh, Daniel P. Berrangé

On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
> On 6/3/26 17:17, Alex Bennée wrote:
>> This allows the gdb integration tests to be run as well.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>   tests/lcitool/refresh                                 | 1 +
>>   2 files changed, 2 insertions(+)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

I'm getting:

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x45001fff
Error occurred in Python: Cannot access memory at address 0x45001fff
qemu-hppa: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
qemu-hppa: QEMU: Terminated via GDBstub
warning: Could not load shared library symbols for linux-vdso32.so.1.
Do you need "set solib-search-path" or "set sysroot"?
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-hppa-linux-user] Error 2



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-10 23:07     ` Philippe Mathieu-Daudé
@ 2026-03-10 23:22       ` Pierrick Bouvier
  2026-03-10 23:28         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 28+ messages in thread
From: Pierrick Bouvier @ 2026-03-10 23:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Alex Bennée, qemu-devel,
	Ilya Leoshkevich
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé

On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>> On 6/3/26 17:17, Alex Bennée wrote:
>>> This allows the gdb integration tests to be run as well.
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>    tests/lcitool/refresh                                 | 1 +
>>>    2 files changed, 2 insertions(+)
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> I'm getting:
> 
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x45001fff
> Error occurred in Python: Cannot access memory at address 0x45001fff
> qemu-hppa: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> qemu-hppa: QEMU: Terminated via GDBstub
> warning: Could not load shared library symbols for linux-vdso32.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-hppa-linux-user] Error 2
> 

To add more information, we tested it on GitHub, our machines and 
GitLab, and for an unknown reason, it only fails on GitLab runners.

Which is unfortunate since it is where QEMU run its CI.

Regards,
Pierrick


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-10 23:22       ` Pierrick Bouvier
@ 2026-03-10 23:28         ` Philippe Mathieu-Daudé
  2026-03-12 10:11           ` Ilya Leoshkevich
  0 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-10 23:28 UTC (permalink / raw)
  To: Pierrick Bouvier, Alex Bennée, qemu-devel, Ilya Leoshkevich
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé

On 11/3/26 00:22, Pierrick Bouvier wrote:
> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>> This allows the gdb integration tests to be run as well.
>>>>
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> ---
>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>    tests/lcitool/refresh                                 | 1 +
>>>>    2 files changed, 2 insertions(+)
>>>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>
>> I'm getting:
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x45001fff
>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> qemu-hppa: QEMU: Terminated via GDBstub
>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>> Do you need "set solib-search-path" or "set sysroot"?
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-hppa-linux-user] Error 2
>>
> 
> To add more information, we tested it on GitHub, our machines and 
> GitLab, and for an unknown reason, it only fails on GitLab runners.

Also we tested on our local Linux machines, where this test pass
for all our targets ;)

> 
> Which is unfortunate since it is where QEMU run its CI.
> 
> Regards,
> Pierrick



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-10 23:28         ` Philippe Mathieu-Daudé
@ 2026-03-12 10:11           ` Ilya Leoshkevich
  2026-03-12 10:39             ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 28+ messages in thread
From: Ilya Leoshkevich @ 2026-03-12 10:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Pierrick Bouvier, Alex Bennée,
	qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé


On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
> On 11/3/26 00:22, Pierrick Bouvier wrote:
>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>> This allows the gdb integration tests to be run as well.
>>>>>
>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>> ---
>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>    tests/lcitool/refresh                                 | 1 +
>>>>>    2 files changed, 2 insertions(+)
>>>>
>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>
>>> I'm getting:
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x45001fff
>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make[1]: *** Waiting for unfinished jobs....
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>> Do you need "set solib-search-path" or "set sysroot"?
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-hppa-linux-user] Error 2
>>>
>>
>> To add more information, we tested it on GitHub, our machines and 
>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>
> Also we tested on our local Linux machines, where this test pass
> for all our targets ;)
>
>>
>> Which is unfortunate since it is where QEMU run its CI.
>>
>> Regards,
>> Pierrick
>
FWIW it passes on my laptop as well.

Does this test fail only for hppa, or for other architectures as well?

I'm asking because it may have something to do with /proc/self/mem or 
with the architecture.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-12 10:11           ` Ilya Leoshkevich
@ 2026-03-12 10:39             ` Philippe Mathieu-Daudé
  2026-03-12 10:41               ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-12 10:39 UTC (permalink / raw)
  To: Ilya Leoshkevich, Pierrick Bouvier, Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé

On 12/3/26 11:11, Ilya Leoshkevich wrote:
> 
> On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>> On 11/3/26 00:22, Pierrick Bouvier wrote:
>>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>>> This allows the gdb integration tests to be run as well.
>>>>>>
>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>> ---
>>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>>    tests/lcitool/refresh                                 | 1 +
>>>>>>    2 files changed, 2 insertions(+)
>>>>>
>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>
>>>> I'm getting:
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x45001fff
>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>>> Do you need "set solib-search-path" or "set sysroot"?
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>
>>>
>>> To add more information, we tested it on GitHub, our machines and 
>>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>>
>> Also we tested on our local Linux machines, where this test pass
>> for all our targets ;)
>>
>>>
>>> Which is unfortunate since it is where QEMU run its CI.
>>>
>>> Regards,
>>> Pierrick
>>
> FWIW it passes on my laptop as well.
> 
> Does this test fail only for hppa, or for other architectures as well?

Have a look at these job failures:
https://gitlab.com/philmd/qemu/-/pipelines/2376819801

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x7e085b4b1fff
Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
qemu-aarch64: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-aarch64-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x40802fff
Error occurred in Python: Cannot access memory at address 0x40802fff
qemu-arm: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-arm-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x45001fff
Error occurred in Python: Cannot access memory at address 0x45001fff
qemu-hppa: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
qemu-hppa: QEMU: Terminated via GDBstub
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-hppa-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x7d742025efff
Error occurred in Python: Cannot access memory at address 0x7d742025efff
qemu-alpha: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-alpha-linux-user] Error 2

So at least Alpha / ARM / Aarch64 / HPPA.

(I haven't checked whether the test is run for other targets).

We also run these on GitHub runners where the tests pass, and apparently
when running on k8s private runner on GitLab they also pass. The problem
is with public runner on GitLab.

> I'm asking because it may have something to do with /proc/self/mem or 
> with the architecture.
> 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-12 10:39             ` Philippe Mathieu-Daudé
@ 2026-03-12 10:41               ` Philippe Mathieu-Daudé
  2026-03-12 13:56                 ` Alex Bennée
  0 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-12 10:41 UTC (permalink / raw)
  To: Ilya Leoshkevich, Pierrick Bouvier, Alex Bennée, qemu-devel
  Cc: Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé

On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 12/3/26 11:11, Ilya Leoshkevich wrote:
> >
> > On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
> >> On 11/3/26 00:22, Pierrick Bouvier wrote:
> >>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
> >>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
> >>>>> On 6/3/26 17:17, Alex Bennée wrote:
> >>>>>> This allows the gdb integration tests to be run as well.
> >>>>>>
> >>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >>>>>> ---
> >>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
> >>>>>>    tests/lcitool/refresh                                 | 1 +
> >>>>>>    2 files changed, 2 insertions(+)
> >>>>>
> >>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> >>>>
> >>>> I'm getting:
> >>>>
> >>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> >>>> address 0x45001fff
> >>>> Error occurred in Python: Cannot access memory at address 0x45001fff
> >>>> qemu-hppa: QEMU: Terminated via GDBstub
> >>>> make[1]: ***
> >>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> >>>> run-gdbstub-prot-none] Error 1
> >>>> make[1]: *** Waiting for unfinished jobs....
> >>>> qemu-hppa: QEMU: Terminated via GDBstub
> >>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
> >>>> Do you need "set solib-search-path" or "set sysroot"?
> >>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> >>>> run-tcg-tests-hppa-linux-user] Error 2
> >>>>
> >>>
> >>> To add more information, we tested it on GitHub, our machines and
> >>> GitLab, and for an unknown reason, it only fails on GitLab runners.
> >>
> >> Also we tested on our local Linux machines, where this test pass
> >> for all our targets ;)
> >>
> >>>
> >>> Which is unfortunate since it is where QEMU run its CI.
> >>>
> >>> Regards,
> >>> Pierrick
> >>
> > FWIW it passes on my laptop as well.
> >
> > Does this test fail only for hppa, or for other architectures as well?
>
> Have a look at these job failures:
> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x7e085b4b1fff
> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
> qemu-aarch64: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-aarch64-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x40802fff
> Error occurred in Python: Cannot access memory at address 0x40802fff
> qemu-arm: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-arm-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x45001fff
> Error occurred in Python: Cannot access memory at address 0x45001fff
> qemu-hppa: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> qemu-hppa: QEMU: Terminated via GDBstub
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-hppa-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x7d742025efff
> Error occurred in Python: Cannot access memory at address 0x7d742025efff
> qemu-alpha: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-alpha-linux-user] Error 2
>
> So at least Alpha / ARM / Aarch64 / HPPA.
>
> (I haven't checked whether the test is run for other targets).
>
> We also run these on GitHub runners where the tests pass, and apparently
> when running on k8s private runner on GitLab they also pass. The problem
> is with public runner on GitLab.

Also another test we ran was to pull GitLab docker image and run the same
tests locally within that GitLab-generated image and they passed. So we
believe the issue is related to some container restriction with GitLab.

>
> > I'm asking because it may have something to do with /proc/self/mem or
> > with the architecture.
> >
>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
  2026-03-12 10:41               ` Philippe Mathieu-Daudé
@ 2026-03-12 13:56                 ` Alex Bennée
       [not found]                   ` <94e17bd5-e864-45eb-878b-2296d6188271@linux.ibm.com>
  0 siblings, 1 reply; 28+ messages in thread
From: Alex Bennée @ 2026-03-12 13:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Ilya Leoshkevich, Pierrick Bouvier, qemu-devel, Brad Smith,
	qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell, Thomas Huth,
	Warner Losh, Daniel P. Berrangé

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> On 12/3/26 11:11, Ilya Leoshkevich wrote:
>> >
>> > On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>> >> On 11/3/26 00:22, Pierrick Bouvier wrote:
>> >>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>> >>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>> >>>>> On 6/3/26 17:17, Alex Bennée wrote:
>> >>>>>> This allows the gdb integration tests to be run as well.
>> >>>>>>
>> >>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> >>>>>> ---
>> >>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>> >>>>>>    tests/lcitool/refresh                                 | 1 +
>> >>>>>>    2 files changed, 2 insertions(+)
>> >>>>>
>> >>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> >>>>
>> >>>> I'm getting:
>> >>>>
>> >>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> >>>> address 0x45001fff
>> >>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> >>>> qemu-hppa: QEMU: Terminated via GDBstub
>> >>>> make[1]: ***
>> >>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> >>>> run-gdbstub-prot-none] Error 1
>> >>>> make[1]: *** Waiting for unfinished jobs....
>> >>>> qemu-hppa: QEMU: Terminated via GDBstub
>> >>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>> >>>> Do you need "set solib-search-path" or "set sysroot"?
>> >>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> >>>> run-tcg-tests-hppa-linux-user] Error 2
>> >>>>
>> >>>
>> >>> To add more information, we tested it on GitHub, our machines and
>> >>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>> >>
>> >> Also we tested on our local Linux machines, where this test pass
>> >> for all our targets ;)
>> >>
>> >>>
>> >>> Which is unfortunate since it is where QEMU run its CI.
>> >>>
>> >>> Regards,
>> >>> Pierrick
>> >>
>> > FWIW it passes on my laptop as well.
>> >
>> > Does this test fail only for hppa, or for other architectures as well?
>>
>> Have a look at these job failures:
>> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x7e085b4b1fff
>> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
>> qemu-aarch64: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-aarch64-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x40802fff
>> Error occurred in Python: Cannot access memory at address 0x40802fff
>> qemu-arm: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-arm-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x45001fff
>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-hppa-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x7d742025efff
>> Error occurred in Python: Cannot access memory at address 0x7d742025efff
>> qemu-alpha: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-alpha-linux-user] Error 2
>>
>> So at least Alpha / ARM / Aarch64 / HPPA.
>>
>> (I haven't checked whether the test is run for other targets).
>>
>> We also run these on GitHub runners where the tests pass, and apparently
>> when running on k8s private runner on GitLab they also pass. The problem
>> is with public runner on GitLab.
>
> Also another test we ran was to pull GitLab docker image and run the same
> tests locally within that GitLab-generated image and they passed. So we
> believe the issue is related to some container restriction with
> GitLab.

Most likely because the ptrace settings are tighter - ptrace is the
mechanism we use to access the memory we can't normally.

>
>>
>> > I'm asking because it may have something to do with /proc/self/mem or
>> > with the architecture.
>> >
>>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
       [not found]                   ` <94e17bd5-e864-45eb-878b-2296d6188271@linux.ibm.com>
@ 2026-03-12 15:55                     ` Alex Bennée
  0 siblings, 0 replies; 28+ messages in thread
From: Alex Bennée @ 2026-03-12 15:55 UTC (permalink / raw)
  To: Ilya Leoshkevich
  Cc: Philippe Mathieu-Daudé, Pierrick Bouvier, qemu-devel,
	Brad Smith, qemu-arm, Kyle Evans, Paolo Bonzini, Peter Maydell,
	Thomas Huth, Warner Losh, Daniel P. Berrangé

Ilya Leoshkevich <iii@linux.ibm.com> writes:

> On 3/12/26 14:56, Alex Bennée wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>>
>>> On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>>> On 12/3/26 11:11, Ilya Leoshkevich wrote:
>>>>> On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>>>>>> On 11/3/26 00:22, Pierrick Bouvier wrote:
>>>>>>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>>>>>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>>>>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>>>>>>> This allows the gdb integration tests to be run as well.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>>>>>> ---
>>>>>>>>>>     tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>>>>>>     tests/lcitool/refresh                                 | 1 +
>>>>>>>>>>     2 files changed, 2 insertions(+)
>>>>>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>>>>> I'm getting:
>>>>>>>>
>>>>>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>>>>>> address 0x45001fff
>>>>>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>>> make[1]: ***
>>>>>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>>>>>> run-gdbstub-prot-none] Error 1
>>>>>>>> make[1]: *** Waiting for unfinished jobs....
>>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>>>>>>> Do you need "set solib-search-path" or "set sysroot"?
>>>>>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>>>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>>>>>
>>>>>>> To add more information, we tested it on GitHub, our machines and
>>>>>>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>>>>>> Also we tested on our local Linux machines, where this test pass
>>>>>> for all our targets ;)
>>>>>>
>>>>>>> Which is unfortunate since it is where QEMU run its CI.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Pierrick
>>>>> FWIW it passes on my laptop as well.
>>>>>
>>>>> Does this test fail only for hppa, or for other architectures as well?
>>>> Have a look at these job failures:
>>>> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x7e085b4b1fff
>>>> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
>>>> qemu-aarch64: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-aarch64-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x40802fff
>>>> Error occurred in Python: Cannot access memory at address 0x40802fff
>>>> qemu-arm: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-arm-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x45001fff
>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x7d742025efff
>>>> Error occurred in Python: Cannot access memory at address 0x7d742025efff
>>>> qemu-alpha: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-alpha-linux-user] Error 2
>>>>
>>>> So at least Alpha / ARM / Aarch64 / HPPA.
>>>>
>>>> (I haven't checked whether the test is run for other targets).
>>>>
>>>> We also run these on GitHub runners where the tests pass, and apparently
>>>> when running on k8s private runner on GitLab they also pass. The problem
>>>> is with public runner on GitLab.
>>> Also another test we ran was to pull GitLab docker image and run the same
>>> tests locally within that GitLab-generated image and they passed. So we
>>> believe the issue is related to some container restriction with
>>> GitLab.
>> Most likely because the ptrace settings are tighter - ptrace is the
>> mechanism we use to access the memory we can't normally.
>
>
> I thought about this, but then probe_proc_self_mem() that guards the
> test would fail.
>
> I don't think cpu_memory_rw_debug() does anything in addition to what
> we probe for.

The probe only checks for read access. Could there be a difference
between read and write?
>
>
> [...]

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2026-03-12 15:56 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 16:17 [PATCH 0/7] testing/next: gdb-multiarch, check-tcg, vbsa tests Alex Bennée
2026-03-06 16:17 ` [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross Alex Bennée
2026-03-06 17:30   ` Pierrick Bouvier
2026-03-06 17:32   ` Pierrick Bouvier
2026-03-10 22:33   ` Philippe Mathieu-Daudé
2026-03-10 23:07     ` Philippe Mathieu-Daudé
2026-03-10 23:22       ` Pierrick Bouvier
2026-03-10 23:28         ` Philippe Mathieu-Daudé
2026-03-12 10:11           ` Ilya Leoshkevich
2026-03-12 10:39             ` Philippe Mathieu-Daudé
2026-03-12 10:41               ` Philippe Mathieu-Daudé
2026-03-12 13:56                 ` Alex Bennée
     [not found]                   ` <94e17bd5-e864-45eb-878b-2296d6188271@linux.ibm.com>
2026-03-12 15:55                     ` Alex Bennée
2026-03-06 16:17 ` [PATCH 2/7] tests/tcg: allow filtering of TCG tests Alex Bennée
2026-03-06 17:34   ` Pierrick Bouvier
2026-03-06 18:36     ` Alex Bennée
2026-03-06 20:49       ` Pierrick Bouvier
2026-03-06 16:17 ` [PATCH 3/7] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
2026-03-06 17:34   ` Pierrick Bouvier
2026-03-06 16:17 ` [PATCH 4/7] tests/functional: teach uncompress about zip files Alex Bennée
2026-03-06 17:35   ` Pierrick Bouvier
2026-03-06 19:49   ` Thomas Huth
2026-03-06 16:17 ` [PATCH 5/7] tests/functional: allow tests to define decompression target Alex Bennée
2026-03-06 17:35   ` Pierrick Bouvier
2026-03-06 16:17 ` [PATCH 6/7] tests/functional: add the ability to send keys Alex Bennée
2026-03-06 17:41   ` Pierrick Bouvier
2026-03-06 16:17 ` [PATCH 7/7] tests/functional: add VBSA linux tests Alex Bennée
2026-03-06 17:41   ` Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox