summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2020-05-20 17:11:07 +0200
committerDr. David Alan Gilbert2020-06-01 19:44:27 +0200
commit89cf4fe34f4afa671a2ab5d9430021ea12106274 (patch)
tree00612da0cad52aa0080081efb8ba34cf9c701b47 /tests
parentmigration/rdma: cleanup rdma context before g_free to avoid memleaks (diff)
downloadqemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.tar.gz
qemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.tar.xz
qemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.zip
hmp: Implement qom-get HMP command
This started off as Andreas Färber's implementation from March 2015, but after feedback from Paolo and Markus it morphed into using the json output which handles structs reasonably. Use with qom-list to find the members of an object. (qemu) qom-get /backend/console[0]/device/vga.rom[0] size 65536 (qemu) qom-get /machine smm "auto" (qemu) qom-get /machine rtc-time { "tm_year": 120, "tm_sec": 51, "tm_hour": 9, "tm_min": 50, "tm_mon": 4, "tm_mday": 20 } (qemu) qom-get /machine frob Error: Property '.frob' not found Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200520151108.160598-2-dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/test-hmp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index f8aa5f92c5..b8b1271b9e 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -61,6 +61,7 @@ static const char *hmp_cmds[] = {
"p $pc + 8",
"qom-list /",
"qom-set /machine initrd test",
+ "qom-get /machine initrd",
"screendump /dev/null",
"sendkey x",
"singlestep on",