tests/tcg/loongarch64: fix hang with softmmu-gdb-memory test
Subsystems (2)
cover tests/tcg/loongarch64: fix hang with softmmu-gdb-memory test
This series address an issue reported by Peter:
https://lore.kernel.org/qemu-devel/CAFEAcA846O2jbpDvy+zUnxrpfxKLQpjhHq14zBOGQMC6caXOJw@mail.gmail.com/
This series introduces a minimal gdb version requirement for loongarch64 gdb tests, due to a mismatch between target definition for our gdbstub and gdb.
This issue was already exposed, but I wrongly assumed it was related to host (aarch64 vs x64), instead of gdb version. After reproducing on a x64 host with an older gdb, the same problem was found.
Also, I added a cleanup on top that was on my mind for some time.
Tested on x64 and aarch64 hosts, with debian stable and ubuntu 24.04.
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(-)
Signature · 1 line
2.47.3
PATCH 1/3 tests/tcg/loongarch64: restrict gdb tests to gdb >= 16.1
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
@@ -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
@@ -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.47.3
Re: [PATCH 1/3] tests/tcg/loongarch64: restrict gdb tests to gdb >= 16.1
Quoted 9 lines · 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 descriptionAs 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.
Quoted 6 lines
Reported-by Peter Maydell <[email protected]>Signed-off-by Pierrick Bouvier <[email protected]>--- tests/tcg/loongarch64/meson.build | 16 +++++++++++++++- tests/tcg/loongarch64/system/meson.build | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-)
-- PMM
PATCH 2/3 tests/tcg/loongarch64/system: reenable gdb-memory test on aarch64 hosts
In reply to Pierrick BouvierThanks 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
@@ -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.47.3
PATCH 3/3 tests/tcg: remove global meson variables
In reply to Pierrick BouvierWhen 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,8 +1,3 @@ -cc_feat_cflags = { - 'power8': '-mcpu=power8', - 'power10': '-mcpu=power10', -} - tests = [] # Multi arch tests
@@ -44,10 +39,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.47.3
Quoted 41 lines · Pierrick Bouvier
This series address an issue reported by Peter:
https://lore.kernel.org/qemu-devel/CAFEAcA846O2jbpDvy+zUnxrpfxKLQpjhHq14zBOGQMC6caXOJw@mail.gmail.com/This series introduces a minimal gdb version requirement for loongarch64 gdb tests, due to a mismatch between target definition for our gdbstub and gdb.
This issue was already exposed, but I wrongly assumed it was related to host (aarch64 vs x64), instead of gdb version. After reproducing on a x64 host with an older gdb, the same problem was found.
Also, I added a cleanup on top that was on my mind for some time.
Tested on x64 and aarch64 hosts, with debian stable and ubuntu 24.04.
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 variablestests/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 ++----
Quoted 9 lines
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(-)
This was merged into master (9963acf1930536e8f67a2ee4b2201e6187ded93b).
Regards,
Pierrick