* [pve-devel] [PATCH qemu-server] tests: qemu_img_convert: add rbd and btrfs snapshots convert test
@ 2025-05-27 13:16 Alexandre Derumier via pve-devel
2025-05-28 10:30 ` [pve-devel] applied: " Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier via pve-devel @ 2025-05-27 13:16 UTC (permalink / raw)
To: pve-devel; +Cc: Alexandre Derumier
[-- Attachment #1: Type: message/rfc822, Size: 5491 bytes --]
From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server] tests: qemu_img_convert: add rbd and btrfs snapshots convert test
Date: Tue, 27 May 2025 15:16:12 +0200
Message-ID: <20250527131612.933091-1-alexandre.derumier@groupe-cyllene.com>
Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
---
test/run_qemu_img_convert_tests.pl | 76 ++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/test/run_qemu_img_convert_tests.pl b/test/run_qemu_img_convert_tests.pl
index 652e61f2..03756333 100755
--- a/test/run_qemu_img_convert_tests.pl
+++ b/test/run_qemu_img_convert_tests.pl
@@ -21,6 +21,26 @@ my $storage_config = {
type => "dir",
shared => 0,
},
+ "local-btrfs" => {
+ content => {
+ images => 1,
+ },
+ path => "/var/lib/vz",
+ type => "btrfs",
+ shared => 0,
+ },
+ "krbd-store" => {
+ monhost => "127.0.0.42,127.0.0.21,::1",
+ fsid => 'fc4181a6-56eb-4f68-b452-8ba1f381ca2a',
+ content => {
+ images => 1
+ },
+ type => "rbd",
+ krbd => 1,
+ pool => "cpool",
+ username => "admin",
+ shared => 1
+ },
"rbd-store" => {
monhost => "127.0.0.42,127.0.0.21,::1",
fsid => 'fc4181a6-56eb-4f68-b452-8ba1f381ca2a',
@@ -204,6 +224,62 @@ my $tests = [
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
]
},
+ {
+ name => "krbdsnapshot",
+ parameters => [
+ "krbd-store:vm-$vmid-disk-0",
+ "local:$vmid/vm-$vmid-disk-0.raw",
+ 1024*10,
+ { snapname => 'foo'},
+ ],
+ expected => [
+ "/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
+ "/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-$vmid-disk-0\@foo",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+ ]
+ },
+ {
+ name => "rbdsnapshot",
+ parameters => [
+ "rbd-store:vm-$vmid-disk-0",
+ "local:$vmid/vm-$vmid-disk-0.raw",
+ 1024*10,
+ { snapname => 'foo'},
+ ],
+ expected => [
+ "/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
+ "rbd:cpool/vm-$vmid-disk-0\@foo:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+ ]
+ },
+ {
+ name => "btrfs_raw_snapshots",
+ parameters => [
+ "local-btrfs:$vmid/vm-$vmid-disk-0.raw",
+ "local:$vmid/vm-$vmid-disk-0.raw",
+ 1024*10,
+ { snapname => 'foo'},
+ ],
+ expected => [
+ "/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0\@foo/disk.raw",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+ ]
+ },
+ {
+ name => "btrfs_qcow2_snapshots",
+ parameters => [
+ "local-btrfs:$vmid/vm-$vmid-disk-0.qcow2",
+ "local:$vmid/vm-$vmid-disk-0.raw",
+ 1024*10,
+ { snapname => 'snap'},
+ ],
+ expected => [
+ "/usr/bin/qemu-img", "convert", "-p", "-n", "-l", "snapshot.name=snap", "-f", "qcow2", "-O", "raw",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
+ "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+ ]
+ },
{
name => "lvmsnapshot",
parameters => [
--
2.39.5
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH qemu-server] tests: qemu_img_convert: add rbd and btrfs snapshots convert test
2025-05-27 13:16 [pve-devel] [PATCH qemu-server] tests: qemu_img_convert: add rbd and btrfs snapshots convert test Alexandre Derumier via pve-devel
@ 2025-05-28 10:30 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-05-28 10:30 UTC (permalink / raw)
To: Alexandre Derumier via pve-devel
Applied, thanks! I changed the path/pool to not re-use existing ones for
different storages, just for future-proofing/more realism.
[1/1] tests: qemu_img_convert: add rbd and btrfs snapshots convert test
commit: 1fd1ca60f94c68702a6ebda1000e0e9d5fc7f50f
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-28 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 13:16 [pve-devel] [PATCH qemu-server] tests: qemu_img_convert: add rbd and btrfs snapshots convert test Alexandre Derumier via pve-devel
2025-05-28 10:30 ` [pve-devel] applied: " Fiona Ebner
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