From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 4/5] test: fix tests for changes when printing disk size suffix
Date: Mon, 12 May 2025 14:41:28 +0200 [thread overview]
Message-ID: <20250512124129.91914-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250512124129.91914-1-f.ebner@proxmox.com>
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@proxmox.com>
---
debian/control | 2 +-
test/restore-config-expected/139.conf | 4 +-
test/restore-config-expected/142.conf | 2 +-
test/restore-config-expected/1422.conf | 2 +-
test/restore-config-expected/179.conf | 8 +--
test/run_qemu_migrate_tests.pl | 86 +++++++++++++-------------
6 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/debian/control b/debian/control
index d6c20040..18f25d66 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 (>= 8.0.2),
+ libpve-common-perl (>= 8.3.2),
libpve-guest-common-perl (>= 5.2.2),
libpve-storage-perl (>= 8.2.10),
libtest-mockmodule-perl,
diff --git a/test/restore-config-expected/139.conf b/test/restore-config-expected/139.conf
index 94425f7e..aeed26cc 100644
--- a/test/restore-config-expected/139.conf
+++ b/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/test/restore-config-expected/142.conf b/test/restore-config-expected/142.conf
index ac2d2ad2..82e7b9fc 100644
--- a/test/restore-config-expected/142.conf
+++ b/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/test/restore-config-expected/1422.conf b/test/restore-config-expected/1422.conf
index 2d77a44a..b601d362 100644
--- a/test/restore-config-expected/1422.conf
+++ b/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/test/restore-config-expected/179.conf b/test/restore-config-expected/179.conf
index 4444efb5..255318fb 100644
--- a/test/restore-config-expected/179.conf
+++ b/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/test/run_qemu_migrate_tests.pl b/test/run_qemu_migrate_tests.pl
index 4373a380..1a60c29c 100755
--- a/test/run_qemu_migrate_tests.pl
+++ b/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' => {
@@ -268,7 +268,7 @@ my $vm_configs = {
'ostype' => 'l26',
'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
'runningmachine' => 'pc-i440fx-5.0+pve0',
- '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',
'snaptime' => 1595928799,
@@ -289,8 +289,8 @@ my $vm_configs = {
'parent' => 'snap1',
'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
'runningmachine' => 'pc-i440fx-5.0+pve0',
- 'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
- 'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
+ '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,
@@ -543,7 +543,7 @@ my $tests = [
'local-dir:341/vm-341-disk-10.raw' => 1,
},
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 => {
running => 1,
@@ -571,7 +571,7 @@ my $tests = [
'local-lvm:vm-341-disk-10' => 1,
},
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 => {
running => 1,
@@ -735,15 +735,15 @@ my $tests = [
'local-zfs:vm-4567-disk-0' => 1,
},
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',
},
},
@@ -822,7 +822,7 @@ my $tests = [
'local-zfs:vm-149-disk-10' => 1,
},
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,
}),
vm_status => {
@@ -858,7 +858,7 @@ my $tests = [
'local-lvm:vm-149-disk-10' => 1,
},
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,
}),
vm_status => {
@@ -894,8 +894,8 @@ my $tests = [
'local-lvm:vm-149-disk-0' => 1,
},
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 => {
running => 0,
@@ -927,8 +927,8 @@ my $tests = [
'local-zfs:vm-149-disk-0' => 1,
},
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 => {
running => 0,
@@ -956,8 +956,8 @@ my $tests = [
'local-lvm:vm-149-disk-11' => 1,
},
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 => {
running => 1,
@@ -986,8 +986,8 @@ my $tests = [
'local-dir:149/vm-149-disk-11.qcow2' => 1,
},
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 => {
running => 1,
@@ -1016,8 +1016,8 @@ my $tests = [
'local-zfs:vm-149-disk-11' => 1,
},
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 => {
running => 1,
@@ -1038,7 +1038,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 => {
@@ -1048,8 +1048,8 @@ my $tests = [
'local-dir:149/vm-149-disk-11.qcow2' => 1,
},
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 => {
running => 1,
@@ -1080,8 +1080,8 @@ my $tests = [
'local-dir:149/vm-149-disk-11.qcow2' => 1,
},
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 => {
running => 1,
@@ -1500,8 +1500,8 @@ my $tests = [
'local-dir:149/vm-149-disk-11.qcow2' => 1,
},
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 => {
running => 1,
@@ -1635,9 +1635,9 @@ my $tests = [
'local-lvm:vm-111-disk-10' => 1,
},
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',
},
}),
vm_status => {
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-12 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 12:41 [pve-devel] [RFC common/manager/qemu-server 0/5] fix #3900: schema: support and prefer sizes with verbose suffixes {K, M, G, T}iB Fiona Ebner
2025-05-12 12:41 ` [pve-devel] [PATCH common 1/5] " Fiona Ebner
2025-06-01 9:48 ` Thomas Lamprecht
2025-05-12 12:41 ` [pve-devel] [PATCH manager 2/5] vzdump: use verbose size suffix when logging archive file size Fiona Ebner
2025-05-12 12:41 ` [pve-devel] [PATCH manager 3/5] test: adapt tests to use verbose disk size suffixes Fiona Ebner
2025-05-12 12:41 ` Fiona Ebner [this message]
2025-05-12 12:41 ` [pve-devel] [PATCH qemu-server 5/5] test: adapt all " Fiona Ebner
2025-05-12 13:00 ` [pve-devel] [RFC common/manager/qemu-server 0/5] fix #3900: schema: support and prefer sizes with verbose suffixes {K, M, G, T}iB Fiona Ebner
2025-06-01 9:51 ` Thomas Lamprecht
2025-06-02 11:21 ` Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250512124129.91914-5-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.