It is very easy to see these patches in action. Just apply the following
diff:
diff --git i/src/qemu/qemu_agent.c w/src/qemu/qemu_agent.c
index 10c6ef09fa..dd48caecb7 100644
--- i/src/qemu/qemu_agent.c
+++ w/src/qemu/qemu_agent.c
@@ -1702,6 +1702,8 @@ qemuAgentGetTime(qemuAgentPtr mon,
VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK) < 0)
goto cleanup;
+ sleep(120);
+
if (virJSONValueObjectGetNumberUlong(reply, "return", &json_time) <
0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("malformed return value"));
This is to simulate a slow guest agent. Then all you need to do is run:
'virsh domtime $dom' and then 'virsh domstats $dom' from another
terminal.
Enjoy.
Michal Privoznik (4):
qemu: Introduce qemuDomainAgentJob
qemu: Introduce APIs for manipulating qemuDomainAgentJob
qemuDomainAgentJob: Introduce query and modify jobs
qemu: Switch code to use new agent job APIs
src/qemu/THREADS.txt | 62 ++++++++++++++++--
src/qemu/qemu_domain.c | 169 +++++++++++++++++++++++++++++++++++++++----------
src/qemu/qemu_domain.h | 29 +++++++++
src/qemu/qemu_driver.c | 91 ++++++++++++++++----------
4 files changed, 281 insertions(+), 70 deletions(-)
--
2.16.4