Skip to contentSkip to conversation

tcg tests 20261024

GIT PULL Applied Pierrick Bouvier 2 participants 5 messages Oct 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The following changes since commit ab5b7ba3794a016663c7200a92045fcca3ed7f1e:

Merge tag 'pull-loongarch-20261023' of https://github.com/bibo-mao/qemu into staging (2026-10-23 11:45:20 +0200)

are available in the Git repository at:

https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/tcg_tests-20261024

for you to fetch changes up to 9963acf1930536e8f67a2ee4b2201e6187ded93b:

tests/tcg: remove global meson variables (2026-10-24 07:09:47 +0000)

----------------------------------------------------------------
Changes:
- [PATCH 0/3] tests/tcg/loongarch64: fix hang with softmmu-gdb-memory (Pierrick Bouvier <[email protected]>)

----------------------------------------------------------------
Pierrick Bouvier (3):
tests/tcg/loongarch64: restrict gdb tests to gdb >= 16.1 tests/tcg/loongarch64/system: reenable gdb-memory test on aarch64 hosts tests/tcg: remove global meson variables

 tests/tcg/aarch64/meson.build            | 46 +++++++++++++-------------------
 tests/tcg/aarch64/system/meson.build     | 16 +++++++----
 tests/tcg/aarch64_be/meson.build         |  1 -
 tests/tcg/alpha/meson.build              |  7 ++---
 tests/tcg/alpha/system/meson.build       |  4 +--
 tests/tcg/arm/meson.build                |  7 ++---
 tests/tcg/arm/system/meson.build         |  4 +--
 tests/tcg/hppa/meson.build               |  1 -
 tests/tcg/i386/meson.build               |  7 ++---
 tests/tcg/i386/system/meson.build        |  4 +--
 tests/tcg/loongarch64/meson.build        | 21 ++++++++++-----
 tests/tcg/loongarch64/system/meson.build | 17 +++++++-----
 tests/tcg/m68k/meson.build               |  1 -
 tests/tcg/mips/meson.build               |  1 -
 tests/tcg/mipsel/meson.build             |  2 --
 tests/tcg/or1k/meson.build               |  1 -
 tests/tcg/ppc64/meson.build              | 11 +++-----
 tests/tcg/ppc64le/meson.build            |  5 +++-
 tests/tcg/riscv32/meson.build            |  3 ---
 tests/tcg/riscv32/system/meson.build     |  4 +--
 tests/tcg/riscv64/meson.build            | 10 +++----
 tests/tcg/riscv64/system/meson.build     |  6 ++---
 tests/tcg/s390x/meson.build              | 21 +++++----------
 tests/tcg/s390x/system/meson.build       |  7 +++--
 tests/tcg/sh4/meson.build                |  1 -
 tests/tcg/x86_64/meson.build             | 10 +++----
 tests/tcg/x86_64/system/meson.build      |  6 ++---
 tests/tcg/xtensa/meson.build             |  6 ++---
 28 files changed, 100 insertions(+), 130 deletions(-)
#1 lore raw

[PULL 3/3] tests/tcg: remove global meson variables

When writing the conversion, I tried to factorize some definitions between linux-user and softmmu and variants of a target. Unfortunately, as meson has (sadly) no support for local variables, this required to use global variables.
As a consequence, those variables are also exposed between targets, and this resulted in some entries being wrongly set (cc_feat_cflags or gdb_feat_version, for instance, wrongly set on target not defining them).

Being bitten by this while writing the two previous patches, I decided it was time to clean this up and not rely on global variables. This patch inlines required entries directly in test suite definition.

Change is correct since all keys modified here are checked during meson configuration, so we can't forget a definition.

---
 tests/tcg/aarch64/meson.build            | 46 ++++++++++--------------
 tests/tcg/aarch64/system/meson.build     | 16 ++++++---
 tests/tcg/aarch64_be/meson.build         |  1 -
 tests/tcg/alpha/meson.build              |  7 ++--
 tests/tcg/alpha/system/meson.build       |  4 +--
 tests/tcg/arm/meson.build                |  7 ++--
 tests/tcg/arm/system/meson.build         |  4 +--
 tests/tcg/hppa/meson.build               |  1 -
 tests/tcg/i386/meson.build               |  7 ++--
 tests/tcg/i386/system/meson.build        |  4 +--
 tests/tcg/loongarch64/meson.build        | 19 ++++------
 tests/tcg/loongarch64/system/meson.build | 10 ++++--
 tests/tcg/m68k/meson.build               |  1 -
 tests/tcg/mips/meson.build               |  1 -
 tests/tcg/mipsel/meson.build             |  2 --
 tests/tcg/or1k/meson.build               |  1 -
 tests/tcg/ppc64/meson.build              | 11 +++---
 tests/tcg/ppc64le/meson.build            |  5 ++-
 tests/tcg/riscv32/meson.build            |  3 --
 tests/tcg/riscv32/system/meson.build     |  4 +--
 tests/tcg/riscv64/meson.build            | 10 ++----
 tests/tcg/riscv64/system/meson.build     |  6 ++--
 tests/tcg/s390x/meson.build              | 21 ++++-------
 tests/tcg/s390x/system/meson.build       |  7 ++--
 tests/tcg/sh4/meson.build                |  1 -
 tests/tcg/x86_64/meson.build             | 10 ++----
 tests/tcg/x86_64/system/meson.build      |  6 ++--
 tests/tcg/xtensa/meson.build             |  6 ++--
 28 files changed, 89 insertions(+), 132 deletions(-)
tests/tcg/aarch64/meson.build +18 -28
index 1cec335df04..52eb67ae6ac 100644
@@ -1,26 +1,3 @@
-cc = 'aarch64-linux-gnu-gcc'
-cc_alt = ['aarch64-redhat-linux-gcc']
-cc_dockerfile = 'debian-all-test-cross'
-
-cc_feat_cflags = {
-  'aes': '-march=armv8-a+aes',
-  'sve': '-march=armv8.1-a+sve',
-  'sve2': '-march=armv8.1-a+sve2',
-  'v8.2': '-march=armv8.2-a',
-  'v8.3': '-march=armv8.3-a',
-  'v8.5': '-march=armv8.5-a',
-  'bti':  '-mbranch-protection=standard',
-  'mte':  '-march=armv8.5-a+memtag',
-  'sme':  '-Wa,-march=armv9-a+sme',
-  'fprcvt': '-march=armv9-a+fprcvt',
-}
-
-gdb_feat_version = {
-  'sme-tiles': '14.1',
-  'mte': '15.1',
-  'mte-baremetal': '16.0',
-}
-
 subdir('system')
 
 tests = []
@@ -196,13 +173,26 @@ tests += {
 if 'qemu-aarch64' in emulators
   tcg_tests += {
     'aarch64-linux-user': {
-      'cc': cc,
-      'cc_alt': cc_alt,
-      'cc_dockerfile': cc_dockerfile,
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc': 'aarch64-linux-gnu-gcc',
+      'cc_alt': ['aarch64-redhat-linux-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
+      'cc_feat_cflags': {
+        'aes': '-march=armv8-a+aes',
+        'sve': '-march=armv8.1-a+sve',
+        'sve2': '-march=armv8.1-a+sve2',
+        'v8.2': '-march=armv8.2-a',
+        'v8.3': '-march=armv8.3-a',
+        'v8.5': '-march=armv8.5-a',
+        'bti':  '-mbranch-protection=standard',
+        'mte':  '-march=armv8.5-a+memtag',
+        'sme':  '-Wa,-march=armv9-a+sme',
+      },
       'folder': 'aarch64',
       'gdb_arch': 'aarch64',
-      'gdb_feat_version': gdb_feat_version,
+      'gdb_feat_version': {
+        'sme-tiles': '14.1',
+        'mte': '15.1',
+      },
       'qemu': emulators['qemu-aarch64'],
       'tests': tests,
     }
tests/tcg/aarch64/system/meson.build +11 -5
index 270d4d6c311..8710ebfdad3 100644
@@ -108,13 +108,19 @@ tests += {
 if 'qemu-system-aarch64' in emulators
   tcg_tests += {
     'aarch64-softmmu': {
-      'cc': cc,
-      'cc_alt': cc_alt + ['aarch64-elf-gcc'],
-      'cc_dockerfile': cc_dockerfile,
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc': 'aarch64-linux-gnu-gcc',
+      'cc_alt': ['aarch64-redhat-linux-gcc', 'aarch64-elf-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
+      'cc_feat_cflags': {
+        'sve': '-march=armv8.1-a+sve',
+        'v8.3': '-march=armv8.3-a',
+        'mte':  '-march=armv8.5-a+memtag',
+      },
       'folder': 'aarch64/system',
       'gdb_arch': 'aarch64',
-      'gdb_feat_version': gdb_feat_version,
+      'gdb_feat_version': {
+        'mte-baremetal': '16.0',
+      },
       'qemu': emulators['qemu-system-aarch64'],
       'tests': tests,
     }
tests/tcg/aarch64_be/meson.build +0 -1
index 509408de8e7..c1873cd5606 100644
@@ -12,7 +12,6 @@ if 'qemu-aarch64_be' in emulators
       'cc': 'aarch64-linux-gnu-gcc',
       'cc_alt': ['aarch64-redhat-linux-gcc'],
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'aarch64_be',
       'gdb_arch': 'aarch64_be',
       'qemu': emulators['qemu-aarch64_be'],
tests/tcg/alpha/meson.build +2 -5
index 30ea2a6978e..970b845ac21 100644
@@ -1,6 +1,3 @@
-cc = 'alpha-linux-gnu-gcc'
-cc_dockerfile = 'debian-all-test-cross'
-
 subdir('system')
 
 tests = []
@@ -42,8 +39,8 @@ tests += {
 if 'qemu-alpha' in emulators
   tcg_tests += {
     'alpha-linux-user': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'alpha-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'alpha',
       'gdb_arch': 'alpha',
       'qemu': emulators['qemu-alpha'],
tests/tcg/alpha/system/meson.build +2 -2
index 5388e17a2f7..80a629a9385 100644
@@ -35,8 +35,8 @@ endforeach
 if 'qemu-system-alpha' in emulators
   tcg_tests += {
     'alpha-softmmu': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'alpha-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'alpha/system',
       'gdb_arch': 'alpha',
       'qemu': emulators['qemu-system-alpha'],
tests/tcg/arm/meson.build +2 -5
index fd82b5c7a63..6e498232f0d 100644
@@ -1,6 +1,3 @@
-cc = 'arm-linux-gnueabihf-gcc'
-cc_dockerfile = 'debian-all-test-cross'
-
 subdir('system')
 
 tests = []
@@ -69,8 +66,8 @@ tests += {
 if 'qemu-arm' in emulators
   tcg_tests += {
     'arm-linux-user': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'arm-linux-gnueabihf-gcc',
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'arm',
       'gdb_arch': 'arm',
       'qemu': emulators['qemu-arm'],
tests/tcg/arm/system/meson.build +2 -2
index 80c5461e620..c20818f0893 100644
@@ -69,9 +69,9 @@ tests += {
 if 'qemu-system-arm' in emulators
   tcg_tests += {
     'arm-softmmu': {
-      'cc': cc,
+      'cc': 'arm-linux-gnueabihf-gcc',
       'cc_alt': ['arm-none-eabi-gcc'],
-      'cc_dockerfile': cc_dockerfile,
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'arm/system',
       'gdb_arch': 'arm',
       'qemu': emulators['qemu-system-arm'],
tests/tcg/hppa/meson.build +0 -1
index 01d4554d993..8c1813636c4 100644
@@ -11,7 +11,6 @@ if 'qemu-hppa' in emulators
     'hppa-linux-user': {
       'cc': 'hppa-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'hppa',
       'gdb_arch': 'hppa',
       'qemu': emulators['qemu-hppa'],
tests/tcg/i386/meson.build +2 -5
index 84bd68067a5..e7c30958608 100644
@@ -1,6 +1,3 @@
-cc = 'i686-linux-gnu-gcc'
-cc_dockerfile = 'debian-i686-cross'
-
 subdir('system')
 
 tests = []
@@ -47,8 +44,8 @@ tests += {
 if 'qemu-i386' in emulators
   tcg_tests += {
     'i386-linux-user': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'i686-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-i686-cross',
       'folder': 'i386',
       'gdb_arch': 'i386',
       'qemu': emulators['qemu-i386'],
tests/tcg/i386/system/meson.build +2 -2
index 91c6e887191..44e86a12cdd 100644
@@ -41,9 +41,9 @@ tests += {
 if 'qemu-system-i386' in emulators
   tcg_tests += {
     'i386-softmmu': {
-      'cc': cc,
+      'cc': 'i686-linux-gnu-gcc',
       'cc_alt': ['i686-elf-gcc'],
-      'cc_dockerfile': cc_dockerfile,
+      'cc_dockerfile': 'debian-i686-cross',
       'folder': 'i386/system',
       'gdb_arch': 'i386',
       'qemu': emulators['qemu-system-i386'],
tests/tcg/loongarch64/meson.build +7 -12
index bff30cb49c8..152bb1d4edb 100644
@@ -1,12 +1,3 @@
-cc = 'loongarch64-unknown-linux-gnu-gcc'
-cc_dockerfile = 'debian-loongarch-cross'
-
-gdb_feat_version = {
-  # previous version report "Architecture rejected target-supplied
-  # description", exposing a mismatch between our gdbstub and gdb.
-  'loongarch64': '16.1',
-}
-
 subdir('system')
 
 tests = []
@@ -32,11 +23,15 @@ tests += {
 if 'qemu-loongarch64' in emulators
   tcg_tests += {
     'loongarch64-linux-user': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'loongarch64-unknown-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-loongarch-cross',
       'folder': 'loongarch64',
       'gdb_arch': 'loongarch64',
-      'gdb_feat_version': gdb_feat_version,
+      'gdb_feat_version': {
+        # previous version report "Architecture rejected target-supplied
+        # description", exposing a mismatch between our gdbstub and gdb.
+        'loongarch64': '16.1',
+      },
       'qemu': emulators['qemu-loongarch64'],
       'tests': tests,
     }
tests/tcg/loongarch64/system/meson.build +7 -3
index 93e76b696ed..37b72bafc4d 100644
@@ -39,11 +39,15 @@ endforeach
 if 'qemu-system-loongarch64' in emulators
   tcg_tests += {
     'loongarch64-softmmu': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'loongarch64-unknown-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-loongarch-cross',
       'folder': 'loongarch64/system',
       'gdb_arch': 'loongarch64',
-      'gdb_feat_version': gdb_feat_version,
+      'gdb_feat_version': {
+        # previous version report "Architecture rejected target-supplied
+        # description", exposing a mismatch between our gdbstub and gdb.
+        'loongarch64': '16.1',
+      },
       'qemu': emulators['qemu-system-loongarch64'],
       'tests': tests,
     }
tests/tcg/m68k/meson.build +0 -1
index 4b73d7fc57d..b34cb032446 100644
@@ -12,7 +12,6 @@ if 'qemu-m68k' in emulators
     'm68k-linux-user': {
       'cc': 'm68k-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'm68k',
       'gdb_arch': 'm68k',
       'qemu': emulators['qemu-m68k'],
tests/tcg/mips/meson.build +0 -1
index 2164f143ea8..88d598a4f89 100644
@@ -14,7 +14,6 @@ if 'qemu-mips' in emulators
     'mips-linux-user': {
       'cc': 'mips-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'mips',
       'gdb_arch': 'mips',
       'qemu': emulators['qemu-mips'],
tests/tcg/mipsel/meson.build +0 -2
index 3ac47117480..c9e869b000f 100644
@@ -181,7 +181,6 @@ if 'qemu-mipsel' in emulators
     'mipsel-linux-user': {
       'cc': 'mipsel-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'mipsel',
       'gdb_arch': 'mipsel',
       'qemu': emulators['qemu-mipsel'],
@@ -207,7 +206,6 @@ if 'qemu-mipsel' in emulators
     'mips32r5el-linux-user': {
       'cc': 'mips32r5el-buildroot-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'mipsel',
       'gdb_arch': 'mipsel',
       'qemu': emulators['qemu-mipsel'],
tests/tcg/or1k/meson.build +0 -1
index c89bb372b47..f1124609b88 100644
@@ -61,7 +61,6 @@ if 'qemu-or1k' in emulators
     'or1k-linux-user': {
       'cc': 'or1k-none-linux-musl-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'or1k',
       'gdb_arch': 'or1k',
       'qemu': emulators['qemu-or1k'],
tests/tcg/ppc64/meson.build +4 -7
index d9b4b153d94..fb0bb7fa56b 100644
@@ -1,8 +1,3 @@
-cc_feat_cflags = {
-  'power8': '-mcpu=power8',
-  'power10': '-mcpu=power10',
-}
-
 tests = []
 
 # Multi arch tests
@@ -50,10 +45,12 @@ if 'qemu-ppc64' in emulators
     'ppc64-linux-user': {
       'cc': 'powerpc64-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc_feat_cflags': {
+        'power8': '-mcpu=power8',
+        'power10': '-mcpu=power10',
+      },
       'folder': 'ppc64',
       'gdb_arch': 'ppc64',
-      'gdb_feat_version': gdb_feat_version,
       'qemu': emulators['qemu-ppc64'],
       'tests': tests,
     }
tests/tcg/ppc64le/meson.build +4 -1
index 9f386287e7a..b474bf4eee5 100644
@@ -4,7 +4,10 @@ if 'qemu-ppc64le' in emulators
       'cc': 'powerpc64le-linux-gnu-gcc',
       'cc_alt': ['ppc64le-redhat-linux-gcc'],
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc_feat_cflags': {
+        'power8': '-mcpu=power8',
+        'power10': '-mcpu=power10',
+      },
       'folder': 'ppc64le',
       'gdb_arch': 'ppc64le',
       'qemu': emulators['qemu-ppc64le'],
tests/tcg/riscv32/meson.build +0 -3
index 862f1349c2b..8af80d5e66e 100644
@@ -1,6 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-cc = 'riscv64-linux-gnu-gcc'
-cc_dockerfile = 'debian-all-test-cross'
-
 subdir('system')
tests/tcg/riscv32/system/meson.build +2 -2
index f8e55ad3d4e..117ae6fbce4 100644
@@ -25,8 +25,8 @@ tests += {
 if 'qemu-system-riscv32' in emulators
   tcg_tests += {
     'riscv32-softmmu': {
-      'cc': cc,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'riscv64-linux-gnu-gcc',
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'riscv32',
       'gdb_arch': 'riscv32',
       'qemu': emulators['qemu-system-riscv32'],
tests/tcg/riscv64/meson.build +3 -7
index 91c840b0058..0766f4e3ff0 100644
@@ -1,7 +1,3 @@
-cc = 'riscv64-linux-gnu-gcc'
-cc_alt = ['riscv64-redhat-linux-gnu-gcc']
-cc_dockerfile = 'debian-all-test-cross'
-
 subdir('system')
 
 tests = []
@@ -26,9 +22,9 @@ tests += {
 if 'qemu-riscv64' in emulators
   tcg_tests += {
     'riscv64-linux-user': {
-      'cc': cc,
-      'cc_alt': cc_alt,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'riscv64-linux-gnu-gcc',
+      'cc_alt': ['riscv64-redhat-linux-gnu-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'riscv64',
       'gdb_arch': 'riscv64',
       'qemu': emulators['qemu-riscv64'],
tests/tcg/riscv64/system/meson.build +3 -3
index 3e1c9703820..728526dc7a3 100644
@@ -80,9 +80,9 @@ tests += {
 if 'qemu-system-riscv64' in emulators
   tcg_tests += {
     'riscv64-softmmu': {
-      'cc': cc,
-      'cc_alt': cc_alt + ['riscv64-elf-gcc'],
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'riscv64-linux-gnu-gcc',
+      'cc_alt': ['riscv64-redhat-linux-gnu-gcc', 'riscv64-elf-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 'riscv64',
       'gdb_arch': 'riscv64',
       'qemu': emulators['qemu-system-riscv64'],
tests/tcg/s390x/meson.build +7 -14
index f2328d9e5cf..15a63c7dea4 100644
@@ -1,12 +1,3 @@
-cc = 's390x-linux-gnu-gcc'
-cc_alt = ['s390x-redhat-linux-gcc']
-cc_dockerfile = 'debian-all-test-cross'
-
-cc_feat_cflags = {
-  'z14': '-march=z14',
-  'z15': '-march=z15',
-}
-
 tests_s390x_pgm = [
   'br-odd.S',
   'cgrl-unaligned.S',
@@ -140,13 +131,15 @@ tests += {
 if 'qemu-s390x' in emulators
   tcg_tests += {
     's390x-linux-user': {
-      'cc': cc,
-      'cc_alt': cc_alt,
-      'cc_dockerfile': cc_dockerfile,
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc': 's390x-linux-gnu-gcc',
+      'cc_alt': ['s390x-redhat-linux-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
+      'cc_feat_cflags': {
+        'z14': '-march=z14',
+        'z15': '-march=z15',
+      },
       'folder': 's390x',
       'gdb_arch': 's390x',
-      'gdb_feat_version': gdb_feat_version,
       'qemu': emulators['qemu-s390x'],
       'tests': tests,
     }
tests/tcg/s390x/system/meson.build +3 -4
index 359d124cc78..d45975d8044 100644
@@ -81,10 +81,9 @@ endforeach
 if 'qemu-system-s390x' in emulators
   tcg_tests += {
     's390x-softmmu': {
-      'cc': cc,
-      'cc_alt': cc_alt,
-      'cc_dockerfile': cc_dockerfile,
-      'cc_feat_cflags': cc_feat_cflags,
+      'cc': 's390x-linux-gnu-gcc',
+      'cc_alt': ['s390x-redhat-linux-gcc'],
+      'cc_dockerfile': 'debian-all-test-cross',
       'folder': 's390x',
       'gdb_arch': 's390x',
       'qemu': emulators['qemu-system-s390x'],
tests/tcg/sh4/meson.build +0 -1
index 12b24fffc77..1e96c78afb1 100644
@@ -14,7 +14,6 @@ if 'qemu-sh4' in emulators
     'sh4-linux-user': {
       'cc': 'sh4-linux-gnu-gcc',
       'cc_dockerfile': 'debian-all-test-cross',
-      'cc_feat_cflags': cc_feat_cflags,
       'folder': 'sh4',
       'gdb_arch': 'sh4',
       'qemu': emulators['qemu-sh4'],
tests/tcg/x86_64/meson.build +3 -7
index 95c7ee676eb..ad4d1f558a7 100644
@@ -1,7 +1,3 @@
-cc = 'x86_64-linux-gnu-gcc'
-cc_alt = ['x86_64-redhat-linux-gcc']
-cc_dockerfile = 'debian-amd64-cross'
-
 subdir('system')
 
 tests = []
@@ -73,9 +69,9 @@ tests += {
 if 'qemu-x86_64' in emulators
   tcg_tests += {
     'x86_64-linux-user': {
-      'cc': cc,
-      'cc_alt': cc_alt,
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'x86_64-linux-gnu-gcc',
+      'cc_alt': ['x86_64-redhat-linux-gcc'],
+      'cc_dockerfile': 'debian-amd64-cross',
       'folder': 'x86_64',
       'gdb_arch': 'x86_64',
       'qemu': emulators['qemu-x86_64'],
tests/tcg/x86_64/system/meson.build +3 -3
index 7d61257b771..46a35d227d0 100644
@@ -51,9 +51,9 @@ tests += {
 if 'qemu-system-x86_64' in emulators
   tcg_tests += {
     'x86_64-softmmu': {
-      'cc': cc,
-      'cc_alt': cc_alt + ['x86_64-elf-gcc'],
-      'cc_dockerfile': cc_dockerfile,
+      'cc': 'x86_64-linux-gnu-gcc',
+      'cc_alt': ['x86_64-redhat-linux-gcc', 'x86_64-elf-gcc'],
+      'cc_dockerfile': 'debian-amd64-cross',
       'folder': 'x86_64/system',
       'gdb_arch': 'x86_64',
       'qemu': emulators['qemu-system-x86_64'],
tests/tcg/xtensa/meson.build +2 -4
index 5ff9c6cd548..627fb14a7f5 100644
@@ -78,13 +78,11 @@ foreach core: cores
   tests_per_core += {core: tests}
 endforeach
 
-cc_dockerfile = 'debian-xtensa-cross'
-
 if 'qemu-system-xtensa' in emulators
   tcg_tests += {
     'xtensa-softmmu': {
       'cc': 'xtensa-dc232b-elf-gcc',
-      'cc_dockerfile': cc_dockerfile,
+      'cc_dockerfile': 'debian-xtensa-cross',
       'folder': 'xtensa',
       'gdb_arch': 'xtensa',
       'qemu': emulators['qemu-system-xtensa'],
@@ -97,7 +95,7 @@ if 'qemu-system-xtensaeb' in emulators
   tcg_tests += {
     'xtensaeb-softmmu': {
       'cc': 'xtensa-test_kc705_be-elf-gcc',
-      'cc_dockerfile': cc_dockerfile,
+      'cc_dockerfile': 'debian-xtensa-cross',
       'folder': 'xtensa',
       'gdb_arch': 'xtensaeb',
       'qemu': emulators['qemu-system-xtensaeb'],
Signature · 1 line
2.43.0
#2 lore raw

[PULL 2/3] tests/tcg/loongarch64/system: reenable gdb-memory test on aarch64 hosts

In reply to Pierrick Bouvier

Thanks to check introduced in previous commit, we can get rid of this.

At the time, my aarch64 host had gdb 15.1 installed, while my x64 host had gdb 16.3. This already exposed the problem fixed in previous commit. Unfortunately, I didn't investigate enough to notice it was related to this, being busy upstreaming tcg tests series, and instead assumed we had a bug somewhere in our gdbstub.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4567

---
 tests/tcg/loongarch64/system/meson.build | 5 -----
 1 file changed, 5 deletions(-)
tests/tcg/loongarch64/system/meson.build +0 -5
index 0f81ef9cfe3..93e76b696ed 100644
@@ -24,11 +24,6 @@ foreach t: tcg_tests['multiarch-softmmu']['tests']
     new_cflags = cflags
     if fs.stem(src) == 'memory'
       new_cflags += '-DCHECK_UNALIGNED=0'
-      # TODO: memory test hangs on aarch64 host
-      # https://gitlab.com/qemu-project/qemu/-/work_items/4567
-      if host_machine.cpu_family() == 'aarch64' and 'gdb_test' in setup
-        continue
-      endif
     endif
     if 'gdb_test' in setup
       setup += {'gdb_feat': 'loongarch64'}
Signature · 1 line
2.43.0
#3 lore raw

[PULL 1/3] tests/tcg/loongarch64: restrict gdb tests to gdb >= 16.1

In reply to Pierrick Bouvier

On gdb < 16.1, there is a mismatch between our gdbstub and gdb target definition, visible with gdb message:
warning: Architecture rejected target-supplied description

As a result, loongarch64-softmmu-gdb-memory hangs due to gdb not completing a requested operation. To be safe, let's restrict all gdb test to this minimal version.

---
 tests/tcg/loongarch64/meson.build        | 16 +++++++++++++++-
 tests/tcg/loongarch64/system/meson.build |  4 ++++
 2 files changed, 19 insertions(+), 1 deletion(-)
tests/tcg/loongarch64/meson.build +15 -1
index 4dd64f16d87..bff30cb49c8 100644
@@ -1,11 +1,24 @@
 cc = 'loongarch64-unknown-linux-gnu-gcc'
 cc_dockerfile = 'debian-loongarch-cross'
 
+gdb_feat_version = {
+  # previous version report "Architecture rejected target-supplied
+  # description", exposing a mismatch between our gdbstub and gdb.
+  'loongarch64': '16.1',
+}
+
 subdir('system')
 
 tests = []
 
-tests += tcg_tests['multiarch-linux-user']['tests']
+foreach t: tcg_tests['multiarch-linux-user']['tests']
+  foreach src, setup: t
+    if 'gdb_test' in setup
+      setup += {'gdb_feat': 'loongarch64'}
+    endif
+    tests += {src: setup}
+  endforeach
+endforeach
 
 tests += {
   'test_bit.c': {},
@@ -23,6 +36,7 @@ if 'qemu-loongarch64' in emulators
       'cc_dockerfile': cc_dockerfile,
       'folder': 'loongarch64',
       'gdb_arch': 'loongarch64',
+      'gdb_feat_version': gdb_feat_version,
       'qemu': emulators['qemu-loongarch64'],
       'tests': tests,
     }
tests/tcg/loongarch64/system/meson.build +4 -0
index d1ee3986b62..0f81ef9cfe3 100644
@@ -30,6 +30,9 @@ foreach t: tcg_tests['multiarch-softmmu']['tests']
         continue
       endif
     endif
+    if 'gdb_test' in setup
+      setup += {'gdb_feat': 'loongarch64'}
+    endif
     if src not in multi_src
       setup += {'cflags': [new_cflags]}
       multi_src += src
@@ -45,6 +48,7 @@ if 'qemu-system-loongarch64' in emulators
       'cc_dockerfile': cc_dockerfile,
       'folder': 'loongarch64/system',
       'gdb_arch': 'loongarch64',
+      'gdb_feat_version': gdb_feat_version,
       'qemu': emulators['qemu-system-loongarch64'],
       'tests': tests,
     }
Signature · 1 line
2.43.0
#4 lore raw
In reply to Pierrick Bouvier
Quoted 10 lines · Pierrick Bouvier

The following changes since commit ab5b7ba3794a016663c7200a92045fcca3ed7f1e:

   Merge tag 'pull-loongarch-20261023' ofhttps://github.com/bibo-mao/qemu into staging (2026-10-23 11:45:20 +0200)

are available in the Git repository at:

   https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/tcg_tests-20261024

for you to fetch changes up to 9963acf1930536e8f67a2ee4b2201e6187ded93b:

Quoted 7 lines
   tests/tcg: remove global meson variables (2026-10-24 07:09:47 +0000)

----------------------------------------------------------------
Changes:
- [PATCH 0/3] tests/tcg/loongarch64: fix hang with softmmu-gdb-memory (Pierrick Bouvier<[email protected]>)

[email protected]

Applied, thanks.

r~