qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@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: Mon, 14 Apr 2025 11:52:37 +0200	[thread overview]
Message-ID: <2ecb3d51-300a-4b4d-bc79-842f6356a32f@redhat.com> (raw)
In-Reply-To: <Z-PJQwDMG3QYP563@redhat.com>

On 26/03/2025 10.30, Daniel P. Berrangé wrote:
> 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' ?

Sure, can do!

>> +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 ?

I'm not sure whether it's the same bug, so I opened another one for x86 here:

  https://gitlab.com/qemu-project/qemu/-/issues/2922

I also noticed that it fails on aarch64 in some rare cases, and in a 
different way. So here's another bug for aarch64:

  https://gitlab.com/qemu-project/qemu/-/issues/2921

I'll use those in the decorators in the next version of the patch.

  Thomas



  reply	other threads:[~2025-04-14  9:53 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é
2025-04-14  9:52     ` Thomas Huth [this message]
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=2ecb3d51-300a-4b4d-bc79-842f6356a32f@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).