5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-23 17:34:19 +03:00

add new tests for 'runningmachine' and rollback

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2018-09-14 14:08:44 +02:00 committed by Thomas Lamprecht
parent e6d35c710c
commit 28831e1014
9 changed files with 235 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View 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();