[PATCH 0/6] tests/functional: remove last use of avocado.utils

Daniel P. Berrangé posted 6 patches 2 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250912182200.643909-1-berrange@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, Thomas Huth <thuth@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Ani Sinha <anisinha@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
tests/functional/aarch64/test_virt.py      |   4 +-
tests/functional/arm/test_integratorcp.py  |   3 +-
tests/functional/mips64el/test_malta.py    |   3 +-
tests/functional/qemu_test/gdb.py          | 237 ++++++
tests/functional/qemu_test/gdbmi_parser.py | 419 ++++++++++
tests/functional/qemu_test/spark.py        | 850 +++++++++++++++++++++
tests/functional/replay_kernel.py          |  16 +-
tests/functional/reverse_debugging.py      |  59 +-
tests/functional/x86_64/test_acpi_bits.py  |  31 +-
9 files changed, 1557 insertions(+), 65 deletions(-)
create mode 100644 tests/functional/qemu_test/gdb.py
create mode 100644 tests/functional/qemu_test/gdbmi_parser.py
create mode 100644 tests/functional/qemu_test/spark.py
[PATCH 0/6] tests/functional: remove last use of avocado.utils
Posted by Daniel P. Berrangé 2 weeks, 1 day ago
This simply imports the GDB code from avocado.utils to the QEMU
functional test suite, and drops the other redundant avocado
usage.

Daniel P. Berrangé (6):
  tests/functional: import GDB remote code from avocado
  tests/functional: convert reverse debug test to local gdb module
  tests/functional: replace avocado process with subprocess
  tests/functional: drop datadrainer class in reverse debugging
  tests/functional: close GDB socket in reverse debugging test
  tests/functional: use self.log for all logging

 tests/functional/aarch64/test_virt.py      |   4 +-
 tests/functional/arm/test_integratorcp.py  |   3 +-
 tests/functional/mips64el/test_malta.py    |   3 +-
 tests/functional/qemu_test/gdb.py          | 237 ++++++
 tests/functional/qemu_test/gdbmi_parser.py | 419 ++++++++++
 tests/functional/qemu_test/spark.py        | 850 +++++++++++++++++++++
 tests/functional/replay_kernel.py          |  16 +-
 tests/functional/reverse_debugging.py      |  59 +-
 tests/functional/x86_64/test_acpi_bits.py  |  31 +-
 9 files changed, 1557 insertions(+), 65 deletions(-)
 create mode 100644 tests/functional/qemu_test/gdb.py
 create mode 100644 tests/functional/qemu_test/gdbmi_parser.py
 create mode 100644 tests/functional/qemu_test/spark.py

-- 
2.50.1


Re: [PATCH 0/6] tests/functional: remove last use of avocado.utils
Posted by Alex Bennée 1 week, 6 days ago
Daniel P. Berrangé <berrange@redhat.com> writes:

> This simply imports the GDB code from avocado.utils to the QEMU
> functional test suite, and drops the other redundant avocado
> usage.

Missing patches include dropping the:

  @skipIfMissingImports('avocado.utils')

from the reverse tests.

With this done can we remove the remaining references to avocado?

  python/Makefile                                                   
  110:	@avocado --config avocado.cfg run tests/                     
  118:	@coverage run -m avocado --config avocado.cfg run tests/*.py 
  python/README.rst
  73:- ``avocado.cfg`` Configuration for the Avocado test-runner.          
  python/qemu/machine/README.rst
  5:QEMU. It is used by the iotests, vm tests, avocado tests, and several  
  python/qemu/utils/README.rst
  5:debugging QEMU. It is used primarily by the vm and avocado tests.      
  python/setup.cfg
  37:    avocado-framework >= 90.0                                         
  python/tests/minreqs.txt
  35:avocado-framework==90.0                                               
  python/tests/protocol.py
  7:import avocado                                                         
  160:class Smoke(avocado.Test):                                           
  208:class TestBase(avocado.Test):                                        

>
> Daniel P. Berrangé (6):
>   tests/functional: import GDB remote code from avocado
>   tests/functional: convert reverse debug test to local gdb module
>   tests/functional: replace avocado process with subprocess
>   tests/functional: drop datadrainer class in reverse debugging
>   tests/functional: close GDB socket in reverse debugging test
>   tests/functional: use self.log for all logging
>
>  tests/functional/aarch64/test_virt.py      |   4 +-
>  tests/functional/arm/test_integratorcp.py  |   3 +-
>  tests/functional/mips64el/test_malta.py    |   3 +-
>  tests/functional/qemu_test/gdb.py          | 237 ++++++
>  tests/functional/qemu_test/gdbmi_parser.py | 419 ++++++++++
>  tests/functional/qemu_test/spark.py        | 850 +++++++++++++++++++++
>  tests/functional/replay_kernel.py          |  16 +-
>  tests/functional/reverse_debugging.py      |  59 +-
>  tests/functional/x86_64/test_acpi_bits.py  |  31 +-
>  9 files changed, 1557 insertions(+), 65 deletions(-)
>  create mode 100644 tests/functional/qemu_test/gdb.py
>  create mode 100644 tests/functional/qemu_test/gdbmi_parser.py
>  create mode 100644 tests/functional/qemu_test/spark.py

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 0/6] tests/functional: remove last use of avocado.utils
Posted by Daniel P. Berrangé 1 week, 6 days ago
On Mon, Sep 15, 2025 at 11:24:41AM +0100, Alex Bennée wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > This simply imports the GDB code from avocado.utils to the QEMU
> > functional test suite, and drops the other redundant avocado
> > usage.
> 
> Missing patches include dropping the:
> 
>   @skipIfMissingImports('avocado.utils')
> 
> from the reverse tests.
> 
> With this done can we remove the remaining references to avocado?
> 
>   python/Makefile                                                   
>   110:	@avocado --config avocado.cfg run tests/                     
>   118:	@coverage run -m avocado --config avocado.cfg run tests/*.py 
>   python/README.rst
>   73:- ``avocado.cfg`` Configuration for the Avocado test-runner.          
>   python/qemu/machine/README.rst
>   5:QEMU. It is used by the iotests, vm tests, avocado tests, and several  
>   python/qemu/utils/README.rst
>   5:debugging QEMU. It is used primarily by the vm and avocado tests.      
>   python/setup.cfg
>   37:    avocado-framework >= 90.0                                         
>   python/tests/minreqs.txt
>   35:avocado-framework==90.0                                               
>   python/tests/protocol.py
>   7:import avocado                                                         
>   160:class Smoke(avocado.Test):                                           
>   208:class TestBase(avocado.Test):

IIUC, John Snow plans to drop the 'python' directory during this
release cycle, so I think we can ignore that for now. I've also
suggested that python-qemu-qmp would be better off switching to
use pytest instead of avocado, as the latter is what python devs
are commonly familiar with and is sufficient for our needs.


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 :|