Peter Xu <pet...@redhat.com> writes: > On Wed, Sep 27, 2023 at 06:47:56PM -0300, Fabiano Rosas wrote: >> I know this adds a python dependency to qtests and I'm not sure how >> much we care about this script, but on the other hand it would be nice >> to catch these errors early on. >> >> This would also help with future work that touches the migration >> stream (moving multifd out of ram.c and fixed-ram). >> >> Let me know what you think. > > The test is good, but I think it'll be definitely less burden and cleaner > if it can be written just in shell scripts.. that can even be put in a > single line.. > > $ (echo "migrate exec:cat>$IMAGE"; echo "quit") | $QEMU_BIN -monitor stdio; > $DIR/scripts/analyze-migration.py -f $IMAGE > > Any chance to hook that in?
I tried but it's way worse. We need to add the script to meson, pass the Python and QEMU binaries in, make it be invoked for each architecture, but skip s390x and ppc when using TCG only. Then we need to add code to map target vs. machine type because arm has no default machine. We also need to produce TAP output for meson. And the migration script outputs a ton of lines so Python barfs due to EAGAIN so we need to handle that as well. All of that is already there in migration-test. I'll send a v2 of this patch with the improvements Thomas suggested and try to dig out a fix for the script on ppc64 I made about 3 years ago that seemed to have not been merged.