On Wed, 2021-01-13 at 07:09 -0800, Saul Wold wrote: > > On 1/13/21 3:45 AM, Richard Purdie wrote: > > On Tue, 2021-01-12 at 15:11 -0800, Saul Wold wrote: > > > This adds support for the Qemu Machine Protocol [0] extending > > > the current dump process for Host and Target. The commands are > > > added in the testimage.bbclass. > > > > > > Currently, we setup qemu to stall until qmp gets connected and > > > sends the initialization and continue commands, this works > > > correctly. > > > > > > With this version, the monitor_dumper is created in OEQemuTarget > > > but then set in OESSHTarget as that's where we get the SSH failure > > > happens. Python's @property is used to create a setter/getter type > > > of setup in OESSHTarget to get overridden by OEQemuTarget. > > > > > > By default the data is currently dumped to files for each command in > > > TMPDIR/log/runtime-hostdump/<date>_qmp/unknown_<seq>_qemu_monitor as > > > this is the naming convenstion in the dump.py code. > > > > > > We use the qmp.py from qemu, which needs to get installed in the > > > recipe-sysroot-native of the target image. > > > > > > [0] https://github.com/qemu/qemu/blob/master/docs/interop/qmp-spec.txt > > > > > > Signed-off-by: Saul Wold <saul.w...@windriver.com> > > > --- > > > meta/classes/testimage.bbclass | 6 ++++++ > > > meta/lib/oeqa/core/target/qemu.py | 6 ++++++ > > > meta/lib/oeqa/core/target/ssh.py | 17 +++++++++++++++- > > > meta/lib/oeqa/targetcontrol.py | 3 +++ > > > meta/lib/oeqa/utils/dump.py | 31 +++++++++++++++++++++++++--- > > > meta/lib/oeqa/utils/qemurunner.py | 34 ++++++++++++++++++++++++++++++- > > > 6 files changed, 92 insertions(+), 5 deletions(-) > > > > For fun I thought I'd try this on the autobuilder: > > > Seems it was too much fun, looks like I will need to be able to start at > least one build on the AB. > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1748 > > > > Looks like we may need to use importlib to import the qmp module as > > otherwise oe-selftest can't launch (and the qmp module may not be > > installed yet). > > > Ok, I will look into this, it worked correctly for me doing a locally, > with do_testimage, but clearly I missed something that between the > qemu-system-native install and the testimage.
The issue will be that oe-selftest loads the python modules before qemu-system-native has been built so it can't import qmp at that time. This is why I was thinking it may need a later import at runtime using importlib? oe-selftest on a clean TMPDIR should reproduce. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#146658): https://lists.openembedded.org/g/openembedded-core/message/146658 Mute This Topic: https://lists.openembedded.org/mt/79638069/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-