From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] snapshot-test: mock query-savevm better
Date: Thu, 18 Feb 2021 14:52:34 +0100 [thread overview]
Message-ID: <20210218135234.28353-1-s.reiter@proxmox.com> (raw)
Otherwise the new printing functions produce warnings about undefined
numbers. These stats are guaranteed to be returned by real QEMU, so mock
them with some sensible values.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
test/snapshot-test.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/snapshot-test.pm b/test/snapshot-test.pm
index 8f9f60a..f65a902 100644
--- a/test/snapshot-test.pm
+++ b/test/snapshot-test.pm
@@ -342,7 +342,11 @@ sub qmp_cmd {
return;
}
if ($exec eq "query-savevm") {
- return { "status" => "completed" };
+ return {
+ "status" => "completed",
+ "bytes" => 1024*1024*1024,
+ "total-time" => 5000,
+ };
}
die "unexpected vm_qmp_command!\n";
}
--
2.20.1
next reply other threads:[~2021-02-18 13:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 13:52 Stefan Reiter [this message]
2021-02-25 20:20 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210218135234.28353-1-s.reiter@proxmox.com \
--to=s.reiter@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox