Am 16.01.2024 um 20:00 hat Stefan Hajnoczi geschrieben: > The common.qemu bash functions allow tests to interact with the QMP > monitor of a QEMU process. I spent two days trying to update 141 when > the order of the test output changed, but found it would still fail > occassionally because printf() and QMP events race with synchronous QMP > communication. > > I gave up and ported 141 to the existing Python API for QMP tests. The > Python API is less affected by the order in which QEMU prints output > because it does not print all QMP traffic by default. > > The next commit changes the order in which QMP messages are received. > Make 141 reliable first. > > Cc: Hanna Czenczek <hre...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> diff --git a/tests/qemu-iotests/141.out b/tests/qemu-iotests/141.out > index 63203d9944..986f9f7598 100644 > --- a/tests/qemu-iotests/141.out > +++ b/tests/qemu-iotests/141.out > @@ -1,179 +1,69 @@ > -QA output created by 141 > -Formatting 'TEST_DIR/b.IMGFMT', fmt=IMGFMT size=1048576 > -Formatting 'TEST_DIR/m.IMGFMT', fmt=IMGFMT size=1048576 > backing_file=TEST_DIR/b.IMGFMT backing_fmt=IMGFMT > -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 > backing_file=TEST_DIR/m.IMGFMT backing_fmt=IMGFMT > -{'execute': 'qmp_capabilities'} > -{"return": {}} > - > +Creating bottom <- middle <- top backing file chain... > +Starting VM... > === Testing drive-backup === > - > -{'execute': 'blockdev-add', > - 'arguments': { > - 'node-name': 'drv0', > - 'driver': 'IMGFMT', > - 'file': { > - 'driver': 'file', > - 'filename': 'TEST_DIR/t.IMGFMT' > - }}} > +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": > {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} This and other lines in the test output need image format filtering. You have a literal "qcow2" in there, but the test case also runs (and fails because of this) for qed. Apart from this, the patch looks good to me. Kevin