]> code.ossystems Code Review - openembedded-core.git/commit
qemurunner: Add support for qmp commands
authorSaul Wold <Saul.Wold@windriver.com>
Mon, 26 Apr 2021 14:45:10 +0000 (07:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 27 Apr 2021 14:11:43 +0000 (15:11 +0100)
commit42af4cd2df72fc8ed9deb3fde4312909842fcf91
treec9eb8d15b76720aadf9408af4088089d4fabcae1
parent46a60f67562a6ae227e018228212fc797d1f2795
qemurunner: Add support for qmp commands

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. If the UNIX Socket does not exist, we wait an timeout
to ensure to socket file is created.

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.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testimage.bbclass
meta/lib/oeqa/core/target/qemu.py
meta/lib/oeqa/core/target/ssh.py
meta/lib/oeqa/targetcontrol.py
meta/lib/oeqa/utils/dump.py
meta/lib/oeqa/utils/qemurunner.py
meta/recipes-devtools/qemu/qemu.inc