public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] snapshot-test: mock query-savevm better
@ 2021-02-18 13:52 Stefan Reiter
  2021-02-25 20:20 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Reiter @ 2021-02-18 13:52 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-25 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 13:52 [pve-devel] [PATCH qemu-server] snapshot-test: mock query-savevm better Stefan Reiter
2021-02-25 20:20 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal