[pve-devel] [PATCH qemu-server] snapshot-test: mock query-savevm better
Stefan Reiter
s.reiter at proxmox.com
Thu Feb 18 14:52:34 CET 2021
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 at 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
More information about the pve-devel
mailing list