diff options
author | Saul Wold <Saul.Wold@windriver.com> | 2021-04-26 07:45:10 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-27 15:11:47 +0100 |
commit | 3acbec85b00d693d2d731bc2b09cc40be1cc68e9 (patch) | |
tree | 3b86b76cc4932ff2d9fbde194f70057a5e99079f /meta/classes | |
parent | 2c86aba6f0eeb1fc747de2f518d1ec982398c54a (diff) | |
download | poky-3acbec85b00d693d2d731bc2b09cc40be1cc68e9.tar.gz |
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
(From OE-Core rev: 42af4cd2df72fc8ed9deb3fde4312909842fcf91)
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/testimage.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index e613759503..43de9d4d76 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -127,6 +127,11 @@ testimage_dump_host () { | |||
127 | netstat -an | 127 | netstat -an |
128 | } | 128 | } |
129 | 129 | ||
130 | testimage_dump_monitor () { | ||
131 | query-status | ||
132 | query-block | ||
133 | } | ||
134 | |||
130 | python do_testimage() { | 135 | python do_testimage() { |
131 | testimage_main(d) | 136 | testimage_main(d) |
132 | } | 137 | } |
@@ -320,6 +325,7 @@ def testimage_main(d): | |||
320 | target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" | 325 | target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" |
321 | target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None | 326 | target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None |
322 | target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or "" | 327 | target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or "" |
328 | target_kwargs['testimage_dump_monitor'] = d.getVar("testimage_dump_monitor") or "" | ||
323 | target_kwargs['testimage_dump_target'] = d.getVar("testimage_dump_target") or "" | 329 | target_kwargs['testimage_dump_target'] = d.getVar("testimage_dump_target") or "" |
324 | 330 | ||
325 | def export_ssh_agent(d): | 331 | def export_ssh_agent(d): |