[pve-devel] [PATCH qemu-server v3 5/6] test: fix tests for changes when printing disk size suffix
Fiona Ebner
f.ebner at proxmox.com
Wed Jul 23 13:57:40 CEST 2025
The 'disk-size' format in the JSON schema in pve-common was changed to
print more verbose, non-ambiguous disk size suffixes. This requires
adapting some tests here.
Bump the corresponding build-dependency in d/control.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
NOTE: check that version bump is correct when applying.
debian/control | 2 +-
src/test/restore-config-expected/139.conf | 4 +-
src/test/restore-config-expected/142.conf | 2 +-
src/test/restore-config-expected/1422.conf | 2 +-
src/test/restore-config-expected/179.conf | 8 +-
src/test/run_qemu_migrate_tests.pl | 90 +++++++++++-----------
6 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/debian/control b/debian/control
index b2b45dfa..df524824 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (= 13),
libjson-c-dev,
libpve-apiclient-perl,
libpve-cluster-perl,
- libpve-common-perl (>= 9.0.3),
+ libpve-common-perl (>= 9.0.7),
libpve-guest-common-perl (>= 5.2.2),
libpve-network-perl,
libpve-storage-perl (>= 9.0.7),
diff --git a/src/test/restore-config-expected/139.conf b/src/test/restore-config-expected/139.conf
index 94425f7e..aeed26cc 100644
--- a/src/test/restore-config-expected/139.conf
+++ b/src/test/restore-config-expected/139.conf
@@ -2,14 +2,14 @@
bios: ovmf
boot: order=scsi0;ide2;net0
cores: 1
-efidisk0: target:139/vm-139-disk-0.qcow2,size=128K
+efidisk0: target:139/vm-139-disk-0.qcow2,size=128KiB
ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
memory: 2048
name: eficloneclone
net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
-scsi0: target:139/vm-139-disk-1.raw,size=4G
+scsi0: target:139/vm-139-disk-1.raw,size=4GiB
scsihw: virtio-scsi-pci
smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
sockets: 1
diff --git a/src/test/restore-config-expected/142.conf b/src/test/restore-config-expected/142.conf
index ac2d2ad2..82e7b9fc 100644
--- a/src/test/restore-config-expected/142.conf
+++ b/src/test/restore-config-expected/142.conf
@@ -7,7 +7,7 @@ name: apache
net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
-scsi0: target:142/vm-142-disk-0.qcow2,size=4G
+scsi0: target:142/vm-142-disk-0.qcow2,size=4GiB
scsihw: virtio-scsi-pci
smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
sockets: 1
diff --git a/src/test/restore-config-expected/1422.conf b/src/test/restore-config-expected/1422.conf
index 2d77a44a..b601d362 100644
--- a/src/test/restore-config-expected/1422.conf
+++ b/src/test/restore-config-expected/1422.conf
@@ -7,7 +7,7 @@ name: apache
net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
-scsi0: target:1422/vm-1422-disk-0.qcow2,size=4G
+scsi0: target:1422/vm-1422-disk-0.qcow2,size=4GiB
scsihw: virtio-scsi-pci
smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
sockets: 1
diff --git a/src/test/restore-config-expected/179.conf b/src/test/restore-config-expected/179.conf
index 4444efb5..255318fb 100644
--- a/src/test/restore-config-expected/179.conf
+++ b/src/test/restore-config-expected/179.conf
@@ -6,10 +6,10 @@ memory: 2048
net0: virtio=26:15:5B:73:3F:7C,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
-scsi0: target:179/vm-179-disk-0.qcow2,cache=none,discard=on,size=32G,ssd=1
-scsi1: target:179/vm-179-disk-1.qcow2,cache=writethrough,size=32G
-scsi2: target:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
-scsi3: target:179/vm-179-disk-3.vmdk,size=32G
+scsi0: target:179/vm-179-disk-0.qcow2,cache=none,discard=on,size=32GiB,ssd=1
+scsi1: target:179/vm-179-disk-1.qcow2,cache=writethrough,size=32GiB
+scsi2: target:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32GiB
+scsi3: target:179/vm-179-disk-3.vmdk,size=32GiB
#scsi4: myfs:179/vm-179-disk-1.qcow2,backup=0,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=1819ead7-a55d-4544-8d38-29ca94869a9c
diff --git a/src/test/run_qemu_migrate_tests.pl b/src/test/run_qemu_migrate_tests.pl
index ed2f38ee..14e3fd2e 100755
--- a/src/test/run_qemu_migrate_tests.pl
+++ b/src/test/run_qemu_migrate_tests.pl
@@ -113,7 +113,7 @@ my $vm_configs = {
105 => {
'bootdisk' => 'scsi0',
'cores' => 1,
- 'ide0' => 'local-zfs:vm-105-disk-1,size=103M',
+ 'ide0' => 'local-zfs:vm-105-disk-1,size=103MiB',
'ide2' => 'none,media=cdrom',
'memory' => 512,
'name' => 'Copy-of-VM-newapache',
@@ -122,7 +122,7 @@ my $vm_configs = {
'ostype' => 'l26',
'parent' => 'ohsnap',
'pending' => {},
- 'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
+ 'scsi0' => 'local-zfs:vm-105-disk-0,size=4GiB',
'scsihw' => 'virtio-scsi-pci',
'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
'snapshots' => {
@@ -135,7 +135,7 @@ my $vm_configs = {
'net0' => 'virtio=4A:A3:E4:4C:CF:F0,bridge=vmbr0,firewall=1',
'numa' => 0,
'ostype' => 'l26',
- 'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
+ 'scsi0' => 'local-zfs:vm-105-disk-0,size=4GiB',
'scsihw' => 'virtio-scsi-pci',
'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
'snaptime' => 1580976924,
@@ -151,7 +151,7 @@ my $vm_configs = {
111 => {
'bootdisk' => 'scsi0',
'cores' => 1,
- 'ide0' => 'local-lvm:vm-111-disk-0,size=4096M',
+ 'ide0' => 'local-lvm:vm-111-disk-0,size=4096MiB',
'ide2' => 'none,media=cdrom',
'memory' => 512,
'name' => 'pending-test',
@@ -159,7 +159,7 @@ my $vm_configs = {
'numa' => 0,
'ostype' => 'l26',
'pending' => {
- 'scsi0' => 'local-zfs:vm-111-disk-0,size=103M',
+ 'scsi0' => 'local-zfs:vm-111-disk-0,size=103MiB',
},
'scsihw' => 'virtio-scsi-pci',
'snapshots' => {},
@@ -170,8 +170,8 @@ my $vm_configs = {
123 => {
'bootdisk' => 'scsi0',
'cores' => 1,
- 'scsi0' => 'zfs-alias-1:vm-123-disk-0,size=4096M',
- 'scsi1' => 'zfs-alias-2:vm-123-disk-0,size=4096M',
+ 'scsi0' => 'zfs-alias-1:vm-123-disk-0,size=4096MiB',
+ 'scsi1' => 'zfs-alias-2:vm-123-disk-0,size=4096MiB',
'ide2' => 'none,media=cdrom',
'memory' => 512,
'name' => 'alias-test',
@@ -196,8 +196,8 @@ my $vm_configs = {
'net0' => 'virtio=52:5D:7E:62:85:97,bridge=vmbr1',
'numa' => 1,
'ostype' => 'l26',
- 'scsi0' => 'local-lvm:vm-149-disk-0,format=raw,size=4G',
- 'scsi1' => 'local-dir:149/vm-149-disk-0.qcow2,format=qcow2,size=1G',
+ 'scsi0' => 'local-lvm:vm-149-disk-0,format=raw,size=4GiB',
+ 'scsi1' => 'local-dir:149/vm-149-disk-0.qcow2,format=qcow2,size=1GiB',
'scsihw' => 'virtio-scsi-pci',
'snapshots' => {},
'smbios1' => 'uuid=e980bd43-a405-42e2-b5f4-31efe6517460',
@@ -217,7 +217,7 @@ my $vm_configs = {
'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
'numa' => 0,
'ostype' => 'l26',
- 'scsi0' => 'rbd-store:vm-341-disk-0,size=1G',
+ 'scsi0' => 'rbd-store:vm-341-disk-0,size=1GiB',
'scsihw' => 'virtio-scsi-pci',
'snapshots' => {},
'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
@@ -227,7 +227,7 @@ my $vm_configs = {
1033 => {
'bootdisk' => 'scsi0',
'cores' => 1,
- 'ide0' => 'rbd-store:vm-1033-cloudinit,media=cdrom,size=4M',
+ 'ide0' => 'rbd-store:vm-1033-cloudinit,media=cdrom,size=4MiB',
'ide2' => 'none,media=cdrom',
'ipconfig0' => 'ip=103.214.69.10/25,gw=103.214.69.1',
'memory' => 4096,
@@ -235,7 +235,7 @@ my $vm_configs = {
'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
'numa' => 0,
'ostype' => 'l26',
- 'scsi0' => 'rbd-store:vm-1033-disk-1,size=1G',
+ 'scsi0' => 'rbd-store:vm-1033-disk-1,size=1GiB',
'scsihw' => 'virtio-scsi-pci',
'snapshots' => {},
'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
@@ -253,7 +253,7 @@ my $vm_configs = {
'ostype' => 'l26',
'parent' => 'snap1',
'pending' => {},
- 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+ 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
'scsihw' => 'virtio-scsi-pci',
'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
'snapshots' => {
@@ -267,8 +267,8 @@ my $vm_configs = {
'numa' => 0,
'ostype' => 'l26',
'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
- 'runningmachine' => 'pc-i440fx-10.0+pve0',
- 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+ 'runningmachine' => 'pc-i440fx-5.0+pve0',
+ 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
'scsihw' => 'virtio-scsi-pci',
'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
'snaptime' => 1595928799,
@@ -288,9 +288,9 @@ my $vm_configs = {
'ostype' => 'l26',
'parent' => 'snap1',
'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
- 'runningmachine' => 'pc-i440fx-10.0+pve0',
- 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
- 'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
+ 'runningmachine' => 'pc-i440fx-5.0+pve0',
+ 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
+ 'scsi1' => 'local-zfs:vm-4567-disk-0,size=1GiB',
'scsihw' => 'virtio-scsi-pci',
'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
'snaptime' => 1595928871,
@@ -546,7 +546,7 @@ my $tests = [
vm_config => get_patched_config(
341,
{
- efidisk0 => 'local-dir:341/vm-341-disk-10.raw,format=raw,size=128K',
+ efidisk0 => 'local-dir:341/vm-341-disk-10.raw,format=raw,size=128KiB',
},
),
vm_status => {
@@ -577,7 +577,7 @@ my $tests = [
vm_config => get_patched_config(
341,
{
- efidisk0 => 'local-lvm:vm-341-disk-10,format=raw,size=128K',
+ efidisk0 => 'local-lvm:vm-341-disk-10,format=raw,size=128KiB',
},
),
vm_status => {
@@ -744,15 +744,15 @@ my $tests = [
vm_config => get_patched_config(
4567,
{
- 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+ 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
snapshots => {
snap1 => {
- 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+ 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
'vmstate' => 'other-dir:4567/vm-4567-state-snap1.raw',
},
snap2 => {
- 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
- 'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
+ 'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4GiB',
+ 'scsi1' => 'local-zfs:vm-4567-disk-0,size=1GiB',
'vmstate' => 'other-dir:4567/vm-4567-state-snap2.raw',
},
},
@@ -834,7 +834,7 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
+ scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4GiB',
scsi1 => undef,
},
),
@@ -873,7 +873,7 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
+ scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4GiB',
scsi1 => undef,
},
),
@@ -912,8 +912,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-zfs:vm-149-disk-0,format=raw,size=4G',
- scsi1 => 'local-lvm:vm-149-disk-0,format=qcow2,size=1G',
+ scsi0 => 'local-zfs:vm-149-disk-0,format=raw,size=4GiB',
+ scsi1 => 'local-lvm:vm-149-disk-0,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -948,8 +948,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-dir:149/vm-149-disk-0.raw,format=raw,size=4G',
- scsi1 => 'local-zfs:vm-149-disk-0,format=qcow2,size=1G',
+ scsi0 => 'local-dir:149/vm-149-disk-0.raw,format=raw,size=4GiB',
+ scsi1 => 'local-zfs:vm-149-disk-0,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -980,8 +980,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-lvm:vm-149-disk-11,format=raw,size=1G',
+ scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-lvm:vm-149-disk-11,format=raw,size=1GiB',
},
),
vm_status => {
@@ -1013,8 +1013,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+ scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -1046,8 +1046,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-zfs:vm-149-disk-11,format=raw,size=1G',
+ scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-zfs:vm-149-disk-11,format=raw,size=1GiB',
},
),
vm_status => {
@@ -1069,7 +1069,7 @@ my $tests = [
'with-local-disks' => 1,
},
config_patch => {
- scsi0 => 'local-lvm:vm-149-disk-0,size=123T',
+ scsi0 => 'local-lvm:vm-149-disk-0,size=123TiB',
},
expected_calls => $default_expected_calls_online,
expected => {
@@ -1081,8 +1081,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+ scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -1116,8 +1116,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+ scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -1542,8 +1542,8 @@ my $tests = [
vm_config => get_patched_config(
149,
{
- scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
- scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+ scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4GiB',
+ scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1GiB',
},
),
vm_status => {
@@ -1683,9 +1683,9 @@ my $tests = [
vm_config => get_patched_config(
111,
{
- ide0 => 'local-lvm:vm-111-disk-10,format=raw,size=4G',
+ ide0 => 'local-lvm:vm-111-disk-10,format=raw,size=4GiB',
pending => {
- scsi0 => 'local-zfs:vm-111-disk-0,size=103M',
+ scsi0 => 'local-zfs:vm-111-disk-0,size=103MiB',
},
},
),
--
2.47.2
More information about the pve-devel
mailing list