On 25/07/2024 13.07, Daniel P. Berrangé wrote:
On Thu, Jul 25, 2024 at 08:42:31PM +1000, Richard Henderson wrote:
On 7/25/24 19:55, Daniel P. Berrangé wrote:
On Thu, Jul 25, 2024 at 09:35:22AM +1000, Richard Henderson wrote:
...
Avocado runs a first pass doing all of the downloads, and only afterward
runs the actual timed tests. I don't know the specifics of how, but it
certainly obvious in the logging.
Oh interesting, I found how it does it..
The file avocado/plugins/assets.py will build an AST of the python
code in a test file, look for all 'fetch_asset' calls, then extract
the parameters to these calls, and donwload them. This is clever.
Basically avoids the refactoring that I suggested.
So yeah, that is a gap.
Practically speaking, we have a choice of either calling into this
avocado python lib as is, or copying tthat python lib into QEMU.
Honestly, I'd prefer to do some refactoring instead, something like you
suggested in your earlier mail. Rationale: For the basic tests it would be
good if we would not depend on the Avacodo framework anymore, otherwise we
likely will continue to run into the situation that our test framework stops
working on some random new python versions and nobody within the QEMU
community has a clue how to fix the situation since nobody is really
familiar with the Avocado framework. Also, while that
avocado/plugins/assets.py sounds like a very neat trick done by a skilled
Python wizard, the average QEMU developer (like me) is just a skilled C
coder with only basic Python knowledge, so I'd prefer if we could use a
simpler mechanism instead that is easier to understand and to debug for
everybody once we run into problems with it.
Thus, I'd suggest to bite the bullet and refactor the tests that download
assets. I can look into this after my summer vacation - but if somebody
feels interested and wants to look into this during the next two weeks
already, that would be very welcome, too, of course!
Thomas