Maintainer updates for testing, gdbstub, semihosting, plugins

- bump python in *BSD images via libvirt-ci
   - remove old unused Leon3 Avocado test
   - re-factor gdb command extension
   - add stoptrigger plugin to contrib
   - ensure plugin mem callbacks properly sized
   - reduce check-tcg noise of inline plugin test
   - fix register dumping in execlog plugin
   - restrict semihosting to TCG builds
   - fix regex in MTE test
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmae5OcACgkQ+9DbCVqe
 KkR8cgf/eM2Sm7EG7zIQ8SbY53DS07ls6uT7Mfn4374GEmj4Cy1I+WNoLGM5vq1r
 qWAC9q2LgJVMQoWJA6Fi3SCKiylBp3/jIdJ7CWN5qj/NmePHSV3EisQXf2qOWWL9
 qOX2hJI7IIYNI2v3IvCzN/fB8F8U60iXERFHRypBH2p6Mz+EGMC3CEhesOEUta6o
 2IMkRW8MoDv9x4B+FnNYav6CfqZjhRenu1CGgVGvWYRds2QDVNB/14kOunmBuwSs
 gPb7AhhnpobDYVxMarlJNPMbOdFjtDkYCajCNW7ffLcl+OjhoVR6cJcFpbOMv4kZ
 8Nok8aDjUDWwUbmU0rBynca+1k8OTg==
 =TjRc
 -----END PGP SIGNATURE-----

Merge tag 'pull-maintainer-9.1-rc0-230724-1' of https://gitlab.com/stsquad/qemu into staging

Maintainer updates for testing, gdbstub, semihosting, plugins

  - bump python in *BSD images via libvirt-ci
  - remove old unused Leon3 Avocado test
  - re-factor gdb command extension
  - add stoptrigger plugin to contrib
  - ensure plugin mem callbacks properly sized
  - reduce check-tcg noise of inline plugin test
  - fix register dumping in execlog plugin
  - restrict semihosting to TCG builds
  - fix regex in MTE test

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmae5OcACgkQ+9DbCVqe
# KkR8cgf/eM2Sm7EG7zIQ8SbY53DS07ls6uT7Mfn4374GEmj4Cy1I+WNoLGM5vq1r
# qWAC9q2LgJVMQoWJA6Fi3SCKiylBp3/jIdJ7CWN5qj/NmePHSV3EisQXf2qOWWL9
# qOX2hJI7IIYNI2v3IvCzN/fB8F8U60iXERFHRypBH2p6Mz+EGMC3CEhesOEUta6o
# 2IMkRW8MoDv9x4B+FnNYav6CfqZjhRenu1CGgVGvWYRds2QDVNB/14kOunmBuwSs
# gPb7AhhnpobDYVxMarlJNPMbOdFjtDkYCajCNW7ffLcl+OjhoVR6cJcFpbOMv4kZ
# 8Nok8aDjUDWwUbmU0rBynca+1k8OTg==
# =TjRc
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 23 Jul 2024 09:01:59 AM AEST
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]

* tag 'pull-maintainer-9.1-rc0-230724-1' of https://gitlab.com/stsquad/qemu:
  tests/tcg/aarch64: Fix test-mte.py
  semihosting: Restrict to TCG
  target/xtensa: Restrict semihosting to TCG
  target/riscv: Restrict semihosting to TCG
  target/mips: Restrict semihosting to TCG
  target/m68k: Restrict semihosting to TCG
  target/mips: Add semihosting stub
  target/m68k: Add semihosting stub
  semihosting: Include missing 'gdbstub/syscalls.h' header
  plugins/execlog.c: correct dump of registers values
  tests/plugins: use qemu_plugin_outs for inline stats
  plugins: fix mem callback array size
  plugins/stoptrigger: TCG plugin to stop execution under conditions
  gdbstub: Re-factor gdb command extensions
  tests/avocado: Remove non-working sparc leon3 test
  testing: bump to latest libvirt-ci

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2024-07-23 12:15:11 +10:00
commit 26b09663a9
27 changed files with 370 additions and 170 deletions

View file

@ -1,37 +0,0 @@
# Functional test that boots a Leon3 machine and checks its serial console.
#
# Copyright (c) Philippe Mathieu-Daudé <f4bug@amsat.org>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
from avocado_qemu import QemuSystemTest
from avocado_qemu import wait_for_console_pattern
from avocado import skip
class Leon3Machine(QemuSystemTest):
timeout = 60
@skip("Test currently broken")
# A Window Underflow exception occurs before booting the kernel,
# and QEMU exit calling cpu_abort(), which makes this test to fail.
def test_leon3_helenos_uimage(self):
"""
:avocado: tags=arch:sparc
:avocado: tags=machine:leon3_generic
:avocado: tags=binfmt:uimage
"""
kernel_url = ('http://www.helenos.org/releases/'
'HelenOS-0.6.0-sparc32-leon3.bin')
kernel_hash = 'a88c9cfdb8430c66650e5290a08765f9bf049a30'
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
self.vm.set_console()
self.vm.add_args('-kernel', kernel_path)
self.vm.launch()
wait_for_console_pattern(self, 'Copyright (c) 2001-2014 HelenOS project')
wait_for_console_pattern(self, 'Booting the kernel ...')

@ -1 +1 @@
Subproject commit 0e9490cebc726ef772b6c9e27dac32e7ae99f9b2
Subproject commit 789b4601bce4e01f43fdb6ad4ce5ab4e46674440

View file

@ -71,10 +71,12 @@ static void stats_insn(void)
const uint64_t cond_track_left = qemu_plugin_u64_sum(insn_cond_track_count);
const uint64_t conditional =
cond_num_trigger * cond_trigger_limit + cond_track_left;
printf("insn: %" PRIu64 "\n", expected);
printf("insn: %" PRIu64 " (per vcpu)\n", per_vcpu);
printf("insn: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
printf("insn: %" PRIu64 " (cond cb)\n", conditional);
g_autoptr(GString) stats = g_string_new("");
g_string_append_printf(stats, "insn: %" PRIu64 "\n", expected);
g_string_append_printf(stats, "insn: %" PRIu64 " (per vcpu)\n", per_vcpu);
g_string_append_printf(stats, "insn: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
g_string_append_printf(stats, "insn: %" PRIu64 " (cond cb)\n", conditional);
qemu_plugin_outs(stats->str);
g_assert(expected > 0);
g_assert(per_vcpu == expected);
g_assert(inl_per_vcpu == expected);
@ -91,10 +93,12 @@ static void stats_tb(void)
const uint64_t cond_track_left = qemu_plugin_u64_sum(tb_cond_track_count);
const uint64_t conditional =
cond_num_trigger * cond_trigger_limit + cond_track_left;
printf("tb: %" PRIu64 "\n", expected);
printf("tb: %" PRIu64 " (per vcpu)\n", per_vcpu);
printf("tb: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
printf("tb: %" PRIu64 " (conditional cb)\n", conditional);
g_autoptr(GString) stats = g_string_new("");
g_string_append_printf(stats, "tb: %" PRIu64 "\n", expected);
g_string_append_printf(stats, "tb: %" PRIu64 " (per vcpu)\n", per_vcpu);
g_string_append_printf(stats, "tb: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
g_string_append_printf(stats, "tb: %" PRIu64 " (conditional cb)\n", conditional);
qemu_plugin_outs(stats->str);
g_assert(expected > 0);
g_assert(per_vcpu == expected);
g_assert(inl_per_vcpu == expected);
@ -107,9 +111,11 @@ static void stats_mem(void)
const uint64_t per_vcpu = qemu_plugin_u64_sum(count_mem);
const uint64_t inl_per_vcpu =
qemu_plugin_u64_sum(count_mem_inline);
printf("mem: %" PRIu64 "\n", expected);
printf("mem: %" PRIu64 " (per vcpu)\n", per_vcpu);
printf("mem: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
g_autoptr(GString) stats = g_string_new("");
g_string_append_printf(stats, "mem: %" PRIu64 "\n", expected);
g_string_append_printf(stats, "mem: %" PRIu64 " (per vcpu)\n", per_vcpu);
g_string_append_printf(stats, "mem: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu);
qemu_plugin_outs(stats->str);
g_assert(expected > 0);
g_assert(per_vcpu == expected);
g_assert(inl_per_vcpu == expected);
@ -118,6 +124,7 @@ static void stats_mem(void)
static void plugin_exit(qemu_plugin_id_t id, void *udata)
{
const unsigned int num_cpus = qemu_plugin_num_vcpus();
g_autoptr(GString) stats = g_string_new("");
g_assert(num_cpus == max_cpu_index + 1);
for (int i = 0; i < num_cpus ; ++i) {
@ -135,20 +142,21 @@ static void plugin_exit(qemu_plugin_id_t id, void *udata)
qemu_plugin_u64_get(insn_cond_num_trigger, i);
const uint64_t insn_cond_left =
qemu_plugin_u64_get(insn_cond_track_count, i);
printf("cpu %d: tb (%" PRIu64 ", %" PRIu64
", %" PRIu64 " * %" PRIu64 " + %" PRIu64
") | "
"insn (%" PRIu64 ", %" PRIu64
", %" PRIu64 " * %" PRIu64 " + %" PRIu64
") | "
"mem (%" PRIu64 ", %" PRIu64 ")"
"\n",
i,
tb, tb_inline,
tb_cond_trigger, cond_trigger_limit, tb_cond_left,
insn, insn_inline,
insn_cond_trigger, cond_trigger_limit, insn_cond_left,
mem, mem_inline);
g_string_printf(stats, "cpu %d: tb (%" PRIu64 ", %" PRIu64
", %" PRIu64 " * %" PRIu64 " + %" PRIu64
") | "
"insn (%" PRIu64 ", %" PRIu64
", %" PRIu64 " * %" PRIu64 " + %" PRIu64
") | "
"mem (%" PRIu64 ", %" PRIu64 ")"
"\n",
i,
tb, tb_inline,
tb_cond_trigger, cond_trigger_limit, tb_cond_left,
insn, insn_inline,
insn_cond_trigger, cond_trigger_limit, insn_cond_left,
mem, mem_inline);
qemu_plugin_outs(stats->str);
g_assert(tb == tb_inline);
g_assert(insn == insn_inline);
g_assert(mem == mem_inline);

View file

@ -18,7 +18,7 @@ import re
from test_gdbstub import main, report
PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)."
PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)."
PATTERN_1 = ".*(0x[0-9a-f]+)"

View file

@ -51,13 +51,13 @@
"pixman",
"pkgconf",
"png",
"py39-numpy",
"py39-pillow",
"py39-pip",
"py39-sphinx",
"py39-sphinx_rtd_theme",
"py39-tomli",
"py39-yaml",
"py311-numpy",
"py311-pillow",
"py311-pip",
"py311-sphinx",
"py311-sphinx_rtd_theme",
"py311-tomli",
"py311-yaml",
"python3",
"rpm2cpio",
"sdl2",