From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 03/15] tests/functional: Convert reverse_debugging tests to the functional framework
Date: Wed, 26 Mar 2025 09:30:43 +0000 [thread overview]
Message-ID: <Z-PJQwDMG3QYP563@redhat.com> (raw)
In-Reply-To: <20250325200026.344006-4-thuth@redhat.com>
On Tue, Mar 25, 2025 at 09:00:11PM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> These tests are using the gdb-related library functions from the
> Avocado framework which we don't have in the functional framework
> yet. So for the time being, keep those imports and skip the test
> if the Avocado framework is not installed on the host.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> MAINTAINERS | 2 +-
> tests/functional/meson.build | 4 +
> .../reverse_debugging.py | 114 +++---------------
> .../functional/test_aarch64_reverse_debug.py | 37 ++++++
> tests/functional/test_ppc64_reverse_debug.py | 41 +++++++
> tests/functional/test_x86_64_reverse_debug.py | 36 ++++++
> 6 files changed, 138 insertions(+), 96 deletions(-)
> rename tests/{avocado => functional}/reverse_debugging.py (66%)
> create mode 100755 tests/functional/test_aarch64_reverse_debug.py
> create mode 100755 tests/functional/test_ppc64_reverse_debug.py
> create mode 100755 tests/functional/test_x86_64_reverse_debug.py
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8f470a1c9b7..73ccf5e5176 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3670,7 +3670,7 @@ F: docs/system/replay.rst
> F: stubs/replay.c
> F: tests/avocado/replay_kernel.py
> F: tests/avocado/replay_linux.py
> -F: tests/avocado/reverse_debugging.py
> +F: tests/functional/*reverse_debug*.py
> F: tests/functional/*replay*.py
> F: qapi/replay.json
>
> diff --git a/tests/functional/test_aarch64_reverse_debug.py b/tests/functional/test_aarch64_reverse_debug.py
> new file mode 100755
> index 00000000000..82925bf5908
> --- /dev/null
> +++ b/tests/functional/test_aarch64_reverse_debug.py
> @@ -0,0 +1,37 @@
> +#!/usr/bin/env python3
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# Reverse debugging test
> +#
> +# Copyright (c) 2020 ISP RAS
> +#
> +# Author:
> +# Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
> +#
> +# 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 qemu_test import Asset, skipIfMissingImports
> +from reverse_debugging import ReverseDebugging
> +
> +
> +@skipIfMissingImports('avocado')
Would it make sense to specialize this to 'avocado.utils' ?
> +class ReverseDebugging_AArch64(ReverseDebugging):
> +
> + REG_PC = 32
> +
> + KERNEL_ASSET = Asset(
> + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
> + 'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'),
> + '7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7')
> +
> + def test_aarch64_virt(self):
> + self.set_machine('virt')
> + self.cpu = 'cortex-a53'
> + kernel_path = self.KERNEL_ASSET.fetch()
> + self.reverse_debugging(args=('-kernel', kernel_path))
> +
> +
> +if __name__ == '__main__':
> + ReverseDebugging.main()
> diff --git a/tests/functional/test_x86_64_reverse_debug.py b/tests/functional/test_x86_64_reverse_debug.py
> new file mode 100755
> index 00000000000..aba31f68748
> --- /dev/null
> +++ b/tests/functional/test_x86_64_reverse_debug.py
> @@ -0,0 +1,36 @@
> +#!/usr/bin/env python3
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# Reverse debugging test
> +#
> +# Copyright (c) 2020 ISP RAS
> +#
> +# Author:
> +# Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
> +#
> +# 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 qemu_test import skipIfMissingImports, skipFlakyTest
> +from reverse_debugging import ReverseDebugging
> +
> +
> +@skipIfMissingImports('avocado')
> +class ReverseDebugging_X86_64(ReverseDebugging):
> +
> + REG_PC = 0x10
> + REG_CS = 0x12
> + def get_pc(self, g):
> + return self.get_reg_le(g, self.REG_PC) \
> + + self.get_reg_le(g, self.REG_CS) * 0x10
> +
> + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992")
This bug refers to ppc64. Was this a copy and paste mistake, does
that bug need updating to also mention x86_64 ?
> + def test_x86_64_pc(self):
> + self.set_machine('pc')
> + # start with BIOS only
> + self.reverse_debugging()
> +
> +
> +if __name__ == '__main__':
> + ReverseDebugging.main()
> --
> 2.49.0
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-03-26 9:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 20:00 [PATCH for-10.1 00/15] Convert remaining Avocado tests to functional Thomas Huth
2025-03-25 20:00 ` [PATCH 01/15] gitlab-ci: Remove the avocado tests from the CI pipelines Thomas Huth
2025-03-26 9:52 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 02/15] tests/functional: Move the check for the parameters from avocado to functional Thomas Huth
2025-03-26 9:27 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 03/15] tests/functional: Convert reverse_debugging tests to the functional framework Thomas Huth
2025-03-26 9:30 ` Daniel P. Berrangé [this message]
2025-04-14 9:52 ` Thomas Huth
2025-03-25 20:00 ` [PATCH 04/15] tests/functional: Convert the i386 replay avocado test Thomas Huth
2025-03-26 9:53 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 05/15] tests/avocado: Remove the LinuxKernelTest class Thomas Huth
2025-03-26 9:40 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 06/15] tests/functional: Convert the 32-bit big endian Wheezy mips test Thomas Huth
2025-03-26 9:54 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 07/15] tests/functional: Convert the 32-bit little " Thomas Huth
2025-03-26 9:55 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 08/15] tests/functional: Convert the 64-bit " Thomas Huth
2025-03-26 9:56 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 09/15] tests/functional: Convert the 64-bit big " Thomas Huth
2025-03-26 10:00 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 10/15] tests/avocado: Remove the boot_linux.py tests Thomas Huth
2025-03-25 20:00 ` [PATCH 11/15] tests/functional: Use the tuxrun kernel for the x86 replay test Thomas Huth
2025-03-26 9:43 ` Daniel P. Berrangé
2025-03-26 9:54 ` Thomas Huth
2025-03-26 10:02 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 12/15] tests/functional: Use the tuxrun kernel for the aarch64 " Thomas Huth
2025-03-26 9:46 ` Daniel P. Berrangé
2025-03-25 20:00 ` [PATCH 13/15] tests/functional: Convert the SMMU test to the functional framework Thomas Huth
2025-03-25 20:00 ` [PATCH 14/15] gitlab-ci: Update QEMU_JOB_AVOCADO and QEMU_CI_AVOCADO_TESTING Thomas Huth
2025-03-26 9:50 ` Daniel P. Berrangé
2025-04-14 7:52 ` Thomas Huth
2025-03-25 20:00 ` [PATCH 15/15] Remove the remainders of the Avocado tests Thomas Huth
2025-03-25 21:03 ` Philippe Mathieu-Daudé
2025-03-26 9:51 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-PJQwDMG3QYP563@redhat.com \
--to=berrange@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).