qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests


From: Daniel P . Berrangé
Subject: Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests
Date: Mon, 29 Jul 2024 13:44:06 +0100
User-agent: Mutt/2.2.12 (2023-09-09)

On Thu, Jul 25, 2024 at 10:21:54AM -0400, Cleber Rosa wrote:
> On Tue, Jul 16, 2024 at 7:28 AM Thomas Huth <thuth@redhat.com> wrote:
> > 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.
> >
> 
> So, we've seen in the past an attempt to update Avocado from 88.1 to a
> regular release, and the troubles it caused, including a revert.  My
> take was that a LTS version should be used, but during this time,
> Avocado experienced a rewrite and having it replacing the old
> implementation in a production level project such as QEMU was tricky.

IMHO the problems with updating avocado in QEMU are a sign that we're
suffering from excess complexity, as it shouldn't be this difficult to
update the test harness. That we need to stick on an LTS release to
protect us from further instability further suggests that we would
benefit from a much simpler solution here. 

> > 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).
> >
> 
> Now I believe we can be very much in sync here.  I've thought for a
> while that there's no reason for Avocado to cooperate or be compatible
> with Meson.  There's no reason why users can't simply pick how the
> test gets run.  In fact, with the new Avocado architecture, you don't
> even need to run "avocado" to run an "avocado-instrumented" test.  You
> could pretty much run "avocado-runner-avocado-instrumented" with the
> right parameters through Meson.

Looking back to when we introduced avocado, we still had our original
home grown build system, and multiple different ways to run integrate
testing betwen our unit tests / qtests and block iotests. Adding
avocado to the mix introduced a third way to run tests. All round it
was rather a mess of inconsistent approaches to testing, but that was
a fact of life with our old home grown build/test process.

Today we have adopted a much more standardized build system via meson.
While we do still have the block iotests harness, we now expose every
test to meson individually to reduce what the intermediate harness
needs to be involved in doing. Thomas' series here is bringing the same
simplified integration to our functional tests, such that each functional
test is known to meson individually. Overall we'll now have a consistent
approach to integrating tests into meson, without intermediate harnesses
adding their own logic.

I think this will make it easier for QEMU maintainers to understand how
the tests are working, and make it easier to maintain them and troubleshoot
failures.

So overall I'm not seeing a compelling reason for us to offer users a
choice between meson & avocado how they run tests. Such choice is a maint
burden over the long term, as we need to validate that both options keep
working. Focusing on a single option reduces the complexity and maint
work and gives us more flexiblity to evolve the code over time.


> > 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.
> >
> 
> So, I believe this type of higher level testing is something that
> needs to remain, and even grow.  Speaking for Red Hat, I see the
> movement of QE contributing more Avocado-VT style tests into QEMU
> itself.  This means way more libraries and features that go into a
> common set of utilities and features (more on that later) than it
> currently exists in avocado.utils.

The series here is showing how simple it is to adapt our existing
tests to the new execution approach, so shouldn't have a significant
impact on ability of people to contribute futher tests in future.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]