From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Ani Sinha" <anisinha@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"John Snow" <jsnow@redhat.com>, "Cédric Le Goater" <clg@kaod.org>,
"Fabiano Rosas" <farosas@suse.de>
Subject: Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests
Date: Tue, 16 Jul 2024 17:51:22 +0100 [thread overview]
Message-ID: <ZpalCr_tcx7nsevQ@redhat.com> (raw)
In-Reply-To: <20240716112614.1755692-1-thuth@redhat.com>
On Tue, Jul 16, 2024 at 01:26:03PM +0200, Thomas Huth wrote:
> The Avocado v88 that we use in QEMU is already on a life support
> system: It is not supported by upstream anymore, and with the latest
> versions of Python, it won't work anymore since it depends on the
> "imp" module that has been removed in Python 3.12.
>
> There have been several attempts to update the test suite in QEMU
> to a newer version of Avocado, but so far no attempt has successfully
> been merged yet.
>
> Additionally, the whole "make check" test suite in QEMU is using the
> meson test runner nowadays, so running the python-based tests via the
> Avocodo test runner looks and feels quite like an oddball, requiring
> the users to deal with the knowledge of multiple test runners in
> parallel (e.g. the timeout settings work completely differently).
>
> So instead of trying to update the python-based test suite in QEMU
> to a newer version of Avocado, we should maybe try to better integrate
> it with the meson test runner instead. Indeed most tests work quite
> nicely without the Avocado framework already, as you can see with
> this patch series - it does not convert all tests, just a subset so
> far, but this already proves that many tests only need small modifi-
> cations to work without Avocado.
>
> Only tests that use the LinuxTest / LinuxDistro and LinuxSSHMixIn
> classes (e.g. based on cloud-init images or using SSH) really depend
> on the Avocado framework, so we'd need a solution for those if we
> want to continue using them. One solution might be to simply use the
> required functions from avocado.utils for these tests, and still run
> them via the meson test runner instead, but that needs some further
> investigation that will be done later.
>
>
> Now if you want to try out these patches: Apply the patches, then
> recompile and then run:
>
> make check-functional
>
> You can also run single targets e.g. with:
>
> make check-functional-ppc
>
> You can also run the tests without any test runner now by
> setting the PYTHONPATH environment variable to the "python" folder
> of your source tree, and by specifying the build directory via
> QEMU_BUILD_ROOT (if autodetection fails) and by specifying the
> QEMU binary via QEMU_TEST_QEMU_BINARY. For example:
>
> export PYTHONPATH=$HOME/qemu/python
> export QEMU_TEST_QEMU_BINARY=qemu-system-x86_64
> export PYTHONPATH=$HOME/qemu/build
> ~/qemu/tests/functional/test_virtio_version.py
For the whole series as is
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
as it does what you claim it does here when I tried it.
> The logs of the tests can be found in the build directory under
> tests/functional/<testname> - console log and general logs will
> be put in separate files there.
As an example, one dir name appears to be:
__main__.MemAddrCheck.test_phybits_ok_pentium_pae
I'd rather prefer it if the dir name matched the test script
file name - in this case test_mem_addr_space.py, as I don't
want to have to lookup which class names were defined inside
each test script. We could drop the "test_" prefix from the
method name too
IOW, could we make this dir name be:
test_mem_addr_space.phybits_ok_pentium_pae
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:[~2024-07-16 16:52 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 11:26 [PATCH v1 00/11] Convert avocado tests to normal Python unittests Thomas Huth
2024-07-16 11:26 ` [PATCH 01/11] tests/functional: Add base classes for the upcoming pytest-based tests Thomas Huth
2024-07-16 11:26 ` [PATCH 02/11] tests/functional: Convert simple avocado tests into standalone python tests Thomas Huth
2024-07-16 18:14 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 03/11] tests/functional: Convert avocado tests that just need a small adjustment Thomas Huth
2024-07-16 18:15 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 04/11] tests/functional: Add python-based tests to the meson build system Thomas Huth
2024-07-16 15:15 ` Fabiano Rosas
2024-07-17 9:20 ` Thomas Huth
2024-07-16 16:55 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 05/11] tests/functional: Implement fetch_asset() method for downloading assets Thomas Huth
2024-07-16 18:17 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 06/11] tests/functional: Convert some tests that download files via fetch_asset() Thomas Huth
2024-07-16 18:19 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 07/11] tests/functional: Add a function for extracting files from an archive Thomas Huth
2024-07-16 18:20 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 08/11] tests/functional: Convert some avocado tests that needed avocado.utils.archive Thomas Huth
2024-07-16 18:20 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 09/11] tests/functional: Set up logging Thomas Huth
2024-07-16 18:22 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 10/11] tests/functional: Convert the s390x avocado tests into standalone tests Thomas Huth
2024-07-16 18:24 ` Daniel P. Berrangé
2024-07-16 11:26 ` [PATCH 11/11] gitlab-ci: Add "check-functional" to the build tests Thomas Huth
2024-07-16 18:25 ` Daniel P. Berrangé
2024-07-16 16:51 ` Daniel P. Berrangé [this message]
2024-07-16 17:03 ` [PATCH v1 00/11] Convert avocado tests to normal Python unittests Thomas Huth
2024-07-17 8:04 ` Thomas Huth
2024-07-17 8:37 ` Daniel P. Berrangé
2024-07-17 8:53 ` Thomas Huth
2024-07-16 17:57 ` Paolo Bonzini
2024-07-24 11:43 ` Thomas Huth
2024-07-25 14:21 ` Cleber Rosa
2024-07-26 10:07 ` Thomas Huth
2024-07-26 13:56 ` Cleber Rosa
2024-07-29 12:44 ` Daniel P. Berrangé
2024-07-29 14:01 ` Cleber Rosa
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=ZpalCr_tcx7nsevQ@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=anisinha@redhat.com \
--cc=clg@kaod.org \
--cc=farosas@suse.de \
--cc=jsnow@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).