]> git.proxmox.com Git - qemu-server.git/commitdiff
add new tests for 'runningmachine' and rollback
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 14 Sep 2018 12:08:44 +0000 (14:08 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Sep 2018 13:49:31 +0000 (15:49 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
test/snapshot-expected/create/qemu-server/301.conf [new file with mode: 0644]
test/snapshot-expected/create/qemu-server/302.conf [new file with mode: 0644]
test/snapshot-expected/rollback/qemu-server/301.conf [new file with mode: 0644]
test/snapshot-expected/rollback/qemu-server/302.conf [new file with mode: 0644]
test/snapshot-input/create/qemu-server/301.conf [new file with mode: 0644]
test/snapshot-input/create/qemu-server/302.conf [new file with mode: 0644]
test/snapshot-input/rollback/qemu-server/301.conf [new file with mode: 0644]
test/snapshot-input/rollback/qemu-server/302.conf [new file with mode: 0644]
test/snapshot-test.pm

diff --git a/test/snapshot-expected/create/qemu-server/301.conf b/test/snapshot-expected/create/qemu-server/301.conf
new file mode 100644 (file)
index 0000000..9c49b1d
--- /dev/null
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+runningmachine: somemachine
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/create/qemu-server/302.conf b/test/snapshot-expected/create/qemu-server/302.conf
new file mode 100644 (file)
index 0000000..9c49b1d
--- /dev/null
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+runningmachine: somemachine
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/301.conf b/test/snapshot-expected/rollback/qemu-server/301.conf
new file mode 100644 (file)
index 0000000..c521154
--- /dev/null
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/302.conf b/test/snapshot-expected/rollback/qemu-server/302.conf
new file mode 100644 (file)
index 0000000..828e8b0
--- /dev/null
@@ -0,0 +1,35 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+runningmachine: somemachine
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/create/qemu-server/301.conf b/test/snapshot-input/create/qemu-server/301.conf
new file mode 100644 (file)
index 0000000..2731bd1
--- /dev/null
@@ -0,0 +1,13 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/302.conf b/test/snapshot-input/create/qemu-server/302.conf
new file mode 100644 (file)
index 0000000..2731bd1
--- /dev/null
@@ -0,0 +1,13 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/rollback/qemu-server/301.conf b/test/snapshot-input/rollback/qemu-server/301.conf
new file mode 100644 (file)
index 0000000..c521154
--- /dev/null
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/302.conf b/test/snapshot-input/rollback/qemu-server/302.conf
new file mode 100644 (file)
index 0000000..518c954
--- /dev/null
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+runningmachine: somemachine
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
index 8988942e47bfa45ea80e17d3aa8993b274556427..c95e7f37b3e0fc0eddd0f8d819a3c84ffbb54727 100644 (file)
@@ -528,6 +528,8 @@ printf("Expected error for snapshot_create when Qemu mon command 'savevm-start'
 testcase_create("203", "test", 0, "test comment", "savevm-start disabled\n\n");
 $vm_mon->{savevm_start} = 1;
 
+printf("Successful snapshot_create with no existing snapshots but set machine type\n");
+testcase_create("301", "test", 1, "test comment", "", { "local:snapshotable-disk-1" => "test" });
 
 $nodename = "delete";
 printf("\n");
@@ -611,4 +613,10 @@ testcase_rollback("206", "test", "volume_rollback_is_possible failed\n");
 printf("Expected error for snapshot_rollback with mp rollback failure (results in inconsistent state)\n");
 testcase_rollback("207", "test", "volume snapshot rollback disabled\n", { "local:snapshotable-disk-1" => "test", "local:snapshotable-disk-2" => "test" });
 
+printf("Successful snapshot_rollback with saved vmstate and machine config only in snapshot\n");
+testcase_rollback("301", "test", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_rollback with saved vmstate and machine config and runningmachine \n");
+testcase_rollback("302", "test", "", { "local:snapshotable-disk-1" => "test" });
+
 done_testing();