snapshot-test: mock query-savevm better

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>
This commit is contained in:
Stefan Reiter 2021-02-18 14:52:34 +01:00 committed by Thomas Lamprecht
parent ee9255601e
commit 483c9676f8

View File

@ -342,7 +342,11 @@ sub qmp_cmd {
return; return;
} }
if ($exec eq "query-savevm") { if ($exec eq "query-savevm") {
return { "status" => "completed" }; return {
"status" => "completed",
"bytes" => 1024*1024*1024,
"total-time" => 5000,
};
} }
die "unexpected vm_qmp_command!\n"; die "unexpected vm_qmp_command!\n";
} }