public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Max R. Carrara" <m.carrara@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-storage v1 37/54] test: list volumes: remove legacy code and migrate cases to new format
Date: Wed, 22 Apr 2026 13:13:03 +0200	[thread overview]
Message-ID: <20260422111322.257380-38-m.carrara@proxmox.com> (raw)
In-Reply-To: <20260422111322.257380-1-m.carrara@proxmox.com>

Remove all that remains of the old testing code, including the
constants defined with the `use constant` pragma and other old
variables.

Migrate all remaining test cases over to the new format.

Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
 src/test/list_volumes_test.pm | 1185 ++++++++++++++++++---------------
 1 file changed, 654 insertions(+), 531 deletions(-)

diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm
index c83b782e..ca3bbac7 100644
--- a/src/test/list_volumes_test.pm
+++ b/src/test/list_volumes_test.pm
@@ -19,10 +19,6 @@ use File::stat qw();
 use File::Temp;
 use Storable qw(dclone);

-use constant DEFAULT_SIZE => 131072; # 128 kiB
-use constant DEFAULT_USED => 262144; # 256 kiB
-use constant DEFAULT_CTIME => 1234567890;
-
 my $DEFAULT_SIZE = 128 * 1024; # 128 kiB
 my $DEFAULT_USED = 256 * 1024; # 256 kiB
 my $DEFAULT_CTIME = 1234567890;
@@ -64,22 +60,6 @@ my $mocked_vmlist = {
     },
 };

-my $storage_dir = File::Temp->newdir();
-my $scfg = {
-    'type' => 'dir',
-    'path' => $storage_dir,
-    'shared' => 0,
-    'content' => {
-        'iso' => 1,
-        'rootdir' => 1,
-        'vztmpl' => 1,
-        'images' => 1,
-        'snippets' => 1,
-        'backup' => 1,
-        'import' => 1,
-    },
-};
-
 my $DEFAULT_STOREID = 'local';
 my $DEFAULT_STORAGE_PATH = File::Temp->newdir();
 my $DEFAULT_SCFG = {
@@ -99,463 +79,6 @@ my $DEFAULT_SCFG = {

 my @BACKING_FILE_SUFFIXES = ('qcow2', 'raw', 'vmdk', 'vhdx');

-# The test cases are comprised of an arry of hashes with the following keys:
-# description => displayed on error by Test::More
-# vmid        => used for image matches by list_volume
-# files       => array of files for qemu-img to create
-# expected    => returned result hash
-#                (content, ctime, format, parent, size, used, vimd, volid)
-my @tests = (
-    {
-        description => 'VMID: 16112, lxc, raw, backup',
-        vmid => '16112',
-        files => [
-            "$storage_dir/images/16112/vm-16112-disk-0.raw",
-            "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo",
-            "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz",
-            "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst",
-            "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_59_30.tgz",
-            "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
-        ],
-        expected => [
-            {
-                'content' => 'rootdir',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'raw',
-                'parent' => undef,
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '16112',
-                'volid' => 'local:16112/vm-16112-disk-0.raw',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1585604370,
-                'format' => 'tar.lzo',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '16112',
-                'volid' => 'local:backup/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1585604970,
-                'format' => 'tar.gz',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '16112',
-                'volid' => 'local:backup/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1585604970,
-                'format' => 'tar.zst',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '16112',
-                'volid' => 'local:backup/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1585605570,
-                'format' => 'tgz',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '16112',
-                'volid' => 'local:backup/vzdump-lxc-16112-2020_03_30-21_59_30.tgz',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1585604370,
-                'format' => 'tar.bz2',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'openvz',
-                'vmid' => '16112',
-                'volid' => 'local:backup/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2',
-            },
-        ],
-    },
-    {
-        description => 'VMID: 16114, VM, qcow2, linked clone',
-        vmid => '16114',
-        files => [
-            "$storage_dir/images/16114/vm-16114-disk-0.qcow2",
-            "$storage_dir/images/16114/vm-16114-disk-1.qcow2",
-        ],
-        parent => [
-            "../9004/base-9004-disk-0.qcow2", "../9004/base-9004-disk-1.qcow2",
-        ],
-        expected => [
-            {
-                'content' => 'images',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'qcow2',
-                'parent' => '../9004/base-9004-disk-0.qcow2',
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '16114',
-                'volid' => 'local:9004/base-9004-disk-0.qcow2/16114/vm-16114-disk-0.qcow2',
-            },
-            {
-                'content' => 'images',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'qcow2',
-                'parent' => '../9004/base-9004-disk-1.qcow2',
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '16114',
-                'volid' => 'local:9004/base-9004-disk-1.qcow2/16114/vm-16114-disk-1.qcow2',
-            },
-        ],
-    },
-    {
-        description => 'VMID: 9004, VM, template, qcow2',
-        vmid => '9004',
-        files => [
-            "$storage_dir/images/9004/base-9004-disk-0.qcow2",
-            "$storage_dir/images/9004/base-9004-disk-1.qcow2",
-        ],
-        expected => [
-            {
-                'content' => 'images',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'qcow2',
-                'parent' => undef,
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '9004',
-                'volid' => 'local:9004/base-9004-disk-0.qcow2',
-            },
-            {
-                'content' => 'images',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'qcow2',
-                'parent' => undef,
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '9004',
-                'volid' => 'local:9004/base-9004-disk-1.qcow2',
-            },
-        ],
-    },
-    {
-        description => 'VMID: none, templates, snippets, backup',
-        vmid => undef,
-        files => [
-            "$storage_dir/dump/vzdump-lxc-19253-2020_02_03-19_57_43.tar.gz",
-            "$storage_dir/dump/vzdump-lxc-19254-2019_01_21-19_29_19.tar",
-            "$storage_dir/template/iso/archlinux-2020.02.01-x86_64.iso",
-            "$storage_dir/template/iso/debian-8.11.1-amd64-DVD-1.iso",
-            "$storage_dir/template/iso/debian-9.12.0-amd64-netinst.iso",
-            "$storage_dir/template/iso/proxmox-ve_6.1-1.iso",
-            "$storage_dir/template/cache/archlinux-base_20190924-1_amd64.tar.gz",
-            "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.tar.gz",
-            "$storage_dir/template/cache/debian-11.0-standard_11.0-1_amd64.tar.bz2",
-            "$storage_dir/template/cache/alpine-3.10-default_20190626_amd64.tar.xz",
-            "$storage_dir/snippets/userconfig.yaml",
-            "$storage_dir/snippets/hookscript.pl",
-            "$storage_dir/private/1234/", # fileparse needs / at the end
-            "$storage_dir/private/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
-        ],
-        expected => [
-            {
-                'content' => 'vztmpl',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'txz',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:vztmpl/alpine-3.10-default_20190626_amd64.tar.xz',
-            },
-            {
-                'content' => 'vztmpl',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'tgz',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:vztmpl/archlinux-base_20190924-1_amd64.tar.gz',
-            },
-            {
-                'content' => 'vztmpl',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'tgz',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz',
-            },
-            {
-                'content' => 'vztmpl',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'tbz2',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:vztmpl/debian-11.0-standard_11.0-1_amd64.tar.bz2',
-            },
-            {
-                'content' => 'iso',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'iso',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:iso/archlinux-2020.02.01-x86_64.iso',
-            },
-            {
-                'content' => 'iso',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'iso',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:iso/debian-8.11.1-amd64-DVD-1.iso',
-            },
-            {
-                'content' => 'iso',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'iso',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:iso/debian-9.12.0-amd64-netinst.iso',
-            },
-            {
-                'content' => 'iso',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'iso',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:iso/proxmox-ve_6.1-1.iso',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1580759863,
-                'format' => 'tar.gz',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '19253',
-                'volid' => 'local:backup/vzdump-lxc-19253-2020_02_03-19_57_43.tar.gz',
-            },
-            {
-                'content' => 'backup',
-                'ctime' => 1548098959,
-                'format' => 'tar',
-                'size' => DEFAULT_SIZE,
-                'subtype' => 'lxc',
-                'vmid' => '19254',
-                'volid' => 'local:backup/vzdump-lxc-19254-2019_01_21-19_29_19.tar',
-            },
-            {
-                'content' => 'snippets',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'snippet',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:snippets/hookscript.pl',
-            },
-            {
-                'content' => 'snippets',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'snippet',
-                'size' => DEFAULT_SIZE,
-                'volid' => 'local:snippets/userconfig.yaml',
-            },
-        ],
-    },
-    {
-        description => 'VMID: none, parent, non-matching',
-        # string instead of vmid in folder
-        #"$storage_dir/images/ssss/base-4321-disk-0.qcow2/1234/vm-1234-disk-0.qcow2",
-        vmid => undef,
-        files => [
-            "$storage_dir/images/1234/vm-1234-disk-0.qcow2",
-        ],
-        parent => [
-            "../ssss/base-4321-disk-0.qcow2",
-        ],
-        expected => [
-            {
-                'content' => 'images',
-                'ctime' => DEFAULT_CTIME,
-                'format' => 'qcow2',
-                'parent' => '../ssss/base-4321-disk-0.qcow2',
-                'size' => DEFAULT_SIZE,
-                'used' => DEFAULT_USED,
-                'vmid' => '1234',
-                'volid' => 'local:1234/vm-1234-disk-0.qcow2',
-            },
-        ],
-    },
-    {
-        description => 'VMID: none, non-matching',
-        # failed matches
-        vmid => undef,
-        files => [
-            "$storage_dir/images/ssss/base-4321-disk-0.raw",
-            "$storage_dir/images/ssss/vm-1234-disk-0.qcow2",
-            "$storage_dir/template/iso/yet-again-a-installation-disk.dvd",
-            "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.zip.gz",
-            "$storage_dir/private/subvol-19254-disk-0/19254",
-            "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.zip.gz",
-            "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tgz.lzo",
-            "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_12_40.vma.xz",
-            "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_12_40.vms.gz",
-        ],
-        expected => [], # returns empty list
-    },
-    {
-        description => 'VMID: none, valid file names for import',
-        vmid => undef,
-        files => [
-            "$storage_dir/import/import.ova",
-            "$storage_dir/import/import.ovf",
-            "$storage_dir/import/some-disk.qcow2",
-            "$storage_dir/import/some-disk.vmdk",
-            "$storage_dir/import/some-raw-disk.raw",
-        ],
-        expected => [
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/import.ova",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ovf',
-                size => DEFAULT_SIZE,
-                volid => "local:import/import.ovf",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'qcow2',
-                size => DEFAULT_SIZE,
-                volid => "local:import/some-disk.qcow2",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'vmdk',
-                size => DEFAULT_SIZE,
-                volid => "local:import/some-disk.vmdk",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'raw',
-                size => DEFAULT_SIZE,
-                volid => "local:import/some-raw-disk.raw",
-            },
-        ],
-    },
-    {
-        description => 'VMID: none, non-matching file paths for import',
-        vmid => undef,
-        files => [
-            # Malformed file names
-            "$storage_dir/import/import.ovff",
-            "$storage_dir/import/importova",
-            "$storage_dir/import/import.ov",
-            "$storage_dir/import/diskraw",
-            "$storage_dir/import/diskvmdk",
-            "$storage_dir/import/disk.invalid",
-            "$storage_dir/import/.ova",
-            "$storage_dir/import/.raw",
-            # Trailing whitespace must not be trimmed
-            "$storage_dir/import/import.ova\t",
-            "$storage_dir/import/disk.raw    ",
-            # Whitespace in file name
-            "$storage_dir/import/something I want to import.ova",
-            "$storage_dir/import/ .raw",
-            "$storage_dir/import/ disk .vmdk",
-            "$storage_dir/import/disk .qcow2",
-            "$storage_dir/import/ import.ova",
-            # Unsafe characters in file name
-            "$storage_dir/import/linux🐧-vm.ova",
-            "$storage_dir/import/🐪perl-playground🐪.ova",
-            "$storage_dir/import/fish_<><_<><_<><.ova",
-            $storage_dir . '/import/C:\\\\Windows\\Path.ova',
-            # Content inside .ova files may only be specified as part
-            # of volume names, and may never appear when looked up as
-            # a file path
-            "$storage_dir/import/import.ova/disk.qcow2",
-            "$storage_dir/import/import.ova/disk.raw",
-            "$storage_dir/import/import.ova/disk.vmdk",
-            "$storage_dir/import/import.ova/disk.invalid",
-        ],
-        expected => [], # returns empty list
-    },
-    {
-        description => 'VMID: none, weird but valid file names for import',
-        vmid => undef,
-        files => [
-            "$storage_dir/import/import.ova.ova",
-            "$storage_dir/import/import.ova.ova.ova",
-            "$storage_dir/import/import.ova.ova.ova.ova",
-            "$storage_dir/import/ova.ova",
-            "$storage_dir/import/ova.ovf",
-            "$storage_dir/import/ova.vmdk",
-            "$storage_dir/import/raw.raw.qcow2",
-            "$storage_dir/import/raw.raw.qcow2.import.qcow2",
-            "$storage_dir/import/raw.raw.raw.your-boat.ova",
-        ],
-        expected => [
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/import.ova.ova",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/import.ova.ova.ova",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/import.ova.ova.ova.ova",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/ova.ova",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ovf',
-                size => DEFAULT_SIZE,
-                volid => "local:import/ova.ovf",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'vmdk',
-                size => DEFAULT_SIZE,
-                volid => "local:import/ova.vmdk",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'qcow2',
-                size => DEFAULT_SIZE,
-                volid => "local:import/raw.raw.qcow2",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'qcow2',
-                size => DEFAULT_SIZE,
-                volid => "local:import/raw.raw.qcow2.import.qcow2",
-            },
-            {
-                content => 'import',
-                ctime => DEFAULT_CTIME,
-                format => 'ova',
-                size => DEFAULT_SIZE,
-                volid => "local:import/raw.raw.raw.your-boat.ova",
-            },
-        ],
-    },
-);
-
 =head2 TEST CASE FORMAT

 The parameters for individual test cases are hashes with the following
@@ -737,6 +260,655 @@ my $test_param_list = [
             },
         ],
     },
+    {
+        description => 'VMID: 16112, lxc, raw, backup',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => 16112,
+        vtypes => ['rootdir', 'backup'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/16112/vm-16112-disk-0.raw",
+                expected => {
+                    content => 'rootdir',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'raw',
+                    parent => undef,
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '16112',
+                    volid => 'local:16112/vm-16112-disk-0.raw',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo",
+                expected => {
+                    content => 'backup',
+                    ctime => 1585604370,
+                    format => 'tar.lzo',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '16112',
+                    volid => 'local:backup/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz",
+                expected => {
+                    content => 'backup',
+                    ctime => 1585604970,
+                    format => 'tar.gz',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '16112',
+                    volid => 'local:backup/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst",
+                expected => {
+                    content => 'backup',
+                    ctime => 1585604970,
+                    format => 'tar.zst',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '16112',
+                    volid => 'local:backup/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-16112-2020_03_30-21_59_30.tgz",
+                expected => {
+                    content => 'backup',
+                    ctime => 1585605570,
+                    format => 'tgz',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '16112',
+                    volid => 'local:backup/vzdump-lxc-16112-2020_03_30-21_59_30.tgz',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
+                expected => {
+                    content => 'backup',
+                    ctime => 1585604370,
+                    format => 'tar.bz2',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'openvz',
+                    vmid => '16112',
+                    volid => 'local:backup/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2',
+                },
+            },
+        ],
+    },
+    {
+        description => 'VMID: 16114, VM, qcow2, linked clone',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => 16114,
+        vtypes => ['images'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/16114/vm-16114-disk-0.qcow2",
+                parent => '../9004/base-9004-disk-0.qcow2',
+                expected => {
+                    content => 'images',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    parent => '../9004/base-9004-disk-0.qcow2',
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '16114',
+                    volid => 'local:9004/base-9004-disk-0.qcow2/16114/vm-16114-disk-0.qcow2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/16114/vm-16114-disk-1.qcow2",
+                parent => '../9004/base-9004-disk-1.qcow2',
+                expected => {
+                    content => 'images',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    parent => '../9004/base-9004-disk-1.qcow2',
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '16114',
+                    volid => 'local:9004/base-9004-disk-1.qcow2/16114/vm-16114-disk-1.qcow2',
+                },
+            },
+        ],
+    },
+    {
+        description => 'VMID: 9004, VM, template, qcow2',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => 9004,
+        vtypes => ['images'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/9004/base-9004-disk-0.qcow2",
+                expected => {
+                    content => 'images',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    parent => undef,
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '9004',
+                    volid => 'local:9004/base-9004-disk-0.qcow2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/9004/base-9004-disk-1.qcow2",
+                expected => {
+                    content => 'images',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    parent => undef,
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '9004',
+                    volid => 'local:9004/base-9004-disk-1.qcow2',
+                },
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, templates, snippets, backup',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => ['vztmpl', 'iso', 'backup', 'snippets'],
+        cases => [
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/template/cache/alpine-3.10-default_20190626_amd64.tar.xz",
+                expected => {
+                    content => 'vztmpl',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'txz',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:vztmpl/alpine-3.10-default_20190626_amd64.tar.xz',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/template/cache/archlinux-base_20190924-1_amd64.tar.gz",
+                expected => {
+                    content => 'vztmpl',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'tgz',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:vztmpl/archlinux-base_20190924-1_amd64.tar.gz',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/template/cache/debian-10.0-standard_10.0-1_amd64.tar.gz",
+                expected => {
+                    content => 'vztmpl',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'tgz',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/template/cache/debian-11.0-standard_11.0-1_amd64.tar.bz2",
+                expected => {
+                    content => 'vztmpl',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'tbz2',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:vztmpl/debian-11.0-standard_11.0-1_amd64.tar.bz2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/template/iso/archlinux-2020.02.01-x86_64.iso",
+                expected => {
+                    content => 'iso',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'iso',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:iso/archlinux-2020.02.01-x86_64.iso',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/template/iso/debian-8.11.1-amd64-DVD-1.iso",
+                expected => {
+                    content => 'iso',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'iso',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:iso/debian-8.11.1-amd64-DVD-1.iso',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/template/iso/debian-9.12.0-amd64-netinst.iso",
+                expected => {
+                    content => 'iso',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'iso',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:iso/debian-9.12.0-amd64-netinst.iso',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/template/iso/proxmox-ve_6.1-1.iso",
+                expected => {
+                    content => 'iso',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'iso',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:iso/proxmox-ve_6.1-1.iso',
+                },
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-19253-2020_02_03-19_57_43.tar.gz",
+                expected => {
+                    content => 'backup',
+                    ctime => 1580759863,
+                    format => 'tar.gz',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '19253',
+                    volid => 'local:backup/vzdump-lxc-19253-2020_02_03-19_57_43.tar.gz',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/dump/vzdump-lxc-19254-2019_01_21-19_29_19.tar",
+                expected => {
+                    content => 'backup',
+                    ctime => 1548098959,
+                    format => 'tar',
+                    size => $DEFAULT_SIZE,
+                    subtype => 'lxc',
+                    vmid => '19254',
+                    volid => 'local:backup/vzdump-lxc-19254-2019_01_21-19_29_19.tar',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/snippets/hookscript.pl",
+                expected => {
+                    content => 'snippets',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'snippet',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:snippets/hookscript.pl',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/snippets/userconfig.yaml",
+                expected => {
+                    content => 'snippets',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'snippet',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:snippets/userconfig.yaml',
+                },
+            },
+            {
+                # fileparse needs / at the end
+                file => "$DEFAULT_STORAGE_PATH/private/1234/",
+                expected => undef,
+            },
+            {
+                # fileparse needs / at the end
+                file => "$DEFAULT_STORAGE_PATH/private/1234/subvol-1234-disk-0.subvol/",
+                expected => undef,
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, parent, non-matching',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => ['images'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/1234/vm-1234-disk-0.qcow2",
+                parent => '../ssss/base-4321-disk-0.qcow2',
+                expected => {
+                    content => 'images',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    parent => '../ssss/base-4321-disk-0.qcow2',
+                    size => $DEFAULT_SIZE,
+                    used => $DEFAULT_USED,
+                    vmid => '1234',
+                    volid => 'local:1234/vm-1234-disk-0.qcow2',
+                },
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, non-matching',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => [sort keys $DEFAULT_SCFG->{content}->%*],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/ssss/base-4321-disk-0.raw",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/images/ssss/vm-1234-disk-0.qcow2",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/template/iso/yet-again-a-installation-disk.dvd",
+                expected => undef,
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/template/cache/debian-10.0-standard_10.0-1_amd64.zip.gz",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/private/subvol-19254-disk-0/19254",
+                expected => undef,
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-openvz-16112-2020_03_30-21_39_30.zip.gz",
+                expected => undef,
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tgz.lzo",
+                expected => undef,
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-qemu-16110-2020_03_30-21_12_40.vma.xz",
+                expected => undef,
+            },
+            {
+                file =>
+                    "$DEFAULT_STORAGE_PATH/dump/vzdump-qemu-16110-2020_03_30-21_12_40.vms.gz",
+                expected => undef,
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, valid file names for import',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => ['import'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/import.ova',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ovf",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ovf',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/import.ovf',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/some-disk.qcow2",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/some-disk.qcow2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/some-disk.vmdk",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'vmdk',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/some-disk.vmdk',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/some-raw-disk.raw",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'raw',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/some-raw-disk.raw',
+                },
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, non-matching file paths for import',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => ['import'],
+        cases => [
+            # Malformed file names
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ovff",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/importova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ov",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/diskraw",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/diskvmdk",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/disk.invalid",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/.ova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/.raw",
+                expected => undef,
+            },
+
+            # Trailing whitespace must not be trimmed
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova\t",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/disk.raw    ",
+                expected => undef,
+            },
+
+            # Whitespace in file name
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/something I want to import.ova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ .raw",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ disk .vmdk",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/disk .qcow2",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ import.ova",
+                expected => undef,
+            },
+
+            # Unsafe characters in file name
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/linux🐧-vm.ova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/🐪perl-playground🐪.ova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/fish_<><_<><_<><.ova",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/C:\\\\Windows\\Path.ova",
+                expected => undef,
+            },
+
+            # Content inside .ova files may only be specified as part
+            # of volume names, and may never appear when looked up as
+            # a file path
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova/disk.qcow2",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova/disk.raw",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova/disk.vmdk",
+                expected => undef,
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova/disk.invalid",
+                expected => undef,
+            },
+        ],
+    },
+    {
+        description => 'VMID: none, weird but valid file names for import',
+        storeid => $DEFAULT_STOREID,
+        scfg => $DEFAULT_SCFG,
+        vmid => undef,
+        vtypes => ['import'],
+        cases => [
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/import.ova.ova',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova.ova.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/import.ova.ova.ova',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/import.ova.ova.ova.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/import.ova.ova.ova.ova',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ova.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/ova.ova',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ova.ovf",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ovf',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/ova.ovf',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/ova.vmdk",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'vmdk',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/ova.vmdk',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/raw.raw.qcow2",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/raw.raw.qcow2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/raw.raw.qcow2.import.qcow2",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'qcow2',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/raw.raw.qcow2.import.qcow2',
+                },
+            },
+            {
+                file => "$DEFAULT_STORAGE_PATH/import/raw.raw.raw.your-boat.ova",
+                expected => {
+                    content => 'import',
+                    ctime => $DEFAULT_CTIME,
+                    format => 'ova',
+                    size => $DEFAULT_SIZE,
+                    volid => 'local:import/raw.raw.raw.your-boat.ova',
+                },
+            },
+        ],
+    },
 ];

 # provide static vmlist for tests
@@ -749,8 +921,8 @@ my $mock_stat = Test::MockModule->new('File::stat', no_auto => 1);
 $mock_stat->redefine(
     populate => sub {
         my (@st) = @_;
-        $st[7] = DEFAULT_SIZE;
-        $st[10] = DEFAULT_CTIME;
+        $st[7] = $DEFAULT_SIZE;
+        $st[10] = $DEFAULT_CTIME;

         my $result = $mock_stat->original('populate')->(@st);

@@ -765,8 +937,8 @@ $mock_fsi->redefine(
         my ($size, $format, $used, $parent, $ctime) =
             $mock_fsi->original('file_size_info')->(@_);

-        $size = DEFAULT_SIZE;
-        $used = DEFAULT_USED;
+        $size = $DEFAULT_SIZE;
+        $used = $DEFAULT_USED;

         return wantarray ? ($size, $format, $used, $parent, $ctime) : $size;
     },
@@ -776,53 +948,6 @@ my sub cmp_volinfo_by_volid {
     return $a->{volid} cmp $b->{volid};
 }

-my sub run_legacy_tests() {
-    my $sid = 'local';
-    my $types = [grep { $scfg->{content}->{$_} } keys $scfg->{content}->%*];
-
-    # run through test cases
-    foreach my $tt (@tests) {
-        my $vmid = $tt->{vmid};
-        my $files = $tt->{files};
-        my $expected = [sort cmp_volinfo_by_volid $tt->{expected}->@*];
-        my $description = $tt->{description};
-        my $parent = $tt->{parent};
-
-        # prepare environment
-        my $num = 0; #parent disks
-        for my $file (@$files) {
-            my ($name, $dir, $suffix) = fileparse($file, @BACKING_FILE_SUFFIXES);
-
-            make_path($dir, { verbose => 1, mode => 0755 });
-
-            if ($name) {
-                # using qemu-img to also be able to represent the backing device
-                my @cmd = ('/usr/bin/qemu-img', 'create', "$file", DEFAULT_SIZE);
-                push @cmd, ('-f', $suffix) if $suffix;
-                push @cmd, ('-u', '-b', @$parent[$num]) if $parent;
-                push @cmd, ('-F', $suffix) if $parent && $suffix;
-                $num++;
-
-                run_command([@cmd]);
-            }
-        }
-
-        my $got = eval {
-            my $volume_list = PVE::Storage::Plugin->list_volumes($sid, $scfg, $vmid, $types);
-            return [sort cmp_volinfo_by_volid $volume_list->@*];
-        };
-        $got = $@ if $@;
-
-        is_deeply($got, $expected, $description) || diag(explain($got));
-
-        # clean up after each test case, otherwise
-        # we get wrong results from leftover files
-        remove_tree($storage_dir, { verbose => 1 });
-    }
-
-    return;
-}
-
 my sub setup_test_env($test_params) {
     my ($storeid, $scfg) = $test_params->@{qw(storeid scfg)};

@@ -913,7 +1038,7 @@ my sub assert_test_params_keys_exist($test_params) {
 }

 sub main() {
-    plan tests => scalar(@tests) + scalar($test_param_list->@*) + 1;
+    plan tests => scalar($test_param_list->@*) + 1;

     # Keep the original vmlist around in order to check whether it was modified
     # after running all the tests. See:
@@ -925,8 +1050,6 @@ sub main() {
         run_test_for_params($test_params);
     }

-    run_legacy_tests();
-
     my $vmlist = PVE::Cluster::get_vmlist();

     is_deeply(
--
2.47.3





  parent reply	other threads:[~2026-04-22 11:19 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 11:12 [PATCH pve-storage, pve-manager v1 00/54] Fix #2884: Implement Subdirectory Scanning for Dir-Based Storage Types Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 01/54] test: plugin tests: run tests with at most 4 jobs Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 02/54] plugin, common: remove superfluous use of =pod command paragraph Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 03/54] common: add POD headings for groups of helpers Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 04/54] common: use Exporter module for PVE::Storage::Common Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 05/54] plugin: make get_subdir_files a proper subroutine and update style Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 06/54] plugin api: replace helpers w/ standalone subs, bump API version & age Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 07/54] common: prevent autovivification in plugin_get_vtype_subdir helper Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 08/54] plugin: break up needless if-elsif chain into separate if-blocks Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 09/54] plugin: adapt get_subdir_files helper of list_volumes API method Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 10/54] plugin: update code style of list_volumes plugin " Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 11/54] plugin: use closure for obtaining raw volume data in list_volumes Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 12/54] plugin: use closure for inner loop logic " Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 13/54] storage: update code style in function path_to_volume_id Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 14/54] storage: break up needless if-elsif chain in path_to_volume_id Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 15/54] storage: heave vtype file path parsing logic inside loop into helper Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 16/54] storage: clean up code that was moved into helper in path_to_volume_id Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 17/54] api: status: move content type assert for up-/downloads into helper Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 18/54] api: status: use helper from common module to get content directory Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 19/54] api: status: move up-/download file path parsing code into helper Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 20/54] api: status: simplify file content assertion logic for up-/download Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 21/54] test: guest import: add tests for PVE::GuestImport Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 22/54] tree-wide: introduce parsing module and replace usages of ISO_EXT_RE_0 Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 23/54] common: test: set up parser testing code, add tests for 'iso' vtype Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 24/54] tree-wide: replace usages of VZTMPL_EXT_RE_1 with parsing functions Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 25/54] tree-wide: replace usages of BACKUP_EXT_RE_2 " Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 26/54] tree-wide: replace usages of inline regexes for snippets with parsers Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 27/54] tree-wide: partially replace usages of regexes for 'import' vtype Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 28/54] tree-wide: replace remaining " Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 29/54] plugin: simplify recently refactored logic in parse_volname method Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 30/54] plugin: simplify recently refactored logic in get_subdir_files helper Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 31/54] storage: simplify recently refactored logic in path_to_volume_id sub Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 32/54] api: status: simplify recently added parsing helper for file transfers Max R. Carrara
2026-04-22 11:12 ` [PATCH pve-storage v1 33/54] plugin: use parsing helper in parse_volume_id sub Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 34/54] test: list volumes: reorganize and modernize test running code Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 35/54] test: list volumes: fix broken test checking for vmlist modifications Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 36/54] test: list volumes: introduce new format for test cases Max R. Carrara
2026-04-22 11:13 ` Max R. Carrara [this message]
2026-04-22 11:13 ` [PATCH pve-storage v1 38/54] test: list volumes: document behavior wrt. undeclared content types Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 39/54] plugin: correct comment in get_subdir_files helper Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 40/54] test: parse volname: modernize code Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 41/54] test: parse volname: adapt tests regarding 'import' volume type Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 42/54] test: parse volname: move VM disk test creation into separate block Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 43/54] test: parse volname: move backup file test creation into sep. block Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 44/54] test: parse volname: parameterize test case creation for some vtypes Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 45/54] test: volume id: modernize code Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 46/54] test: volume id: rename 'volname' test case parameter to 'file' Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 47/54] test: filesystem path: modernize code Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 48/54] fix #2884: implement nested subdir scanning and support 'iso' vtype Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 49/54] fix #2884: support nested subdir scanning for 'vztmpl' volume type Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 50/54] fix #2884: support nested subdir scanning for 'snippets' vtype Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 51/54] test: add more tests for 'import' vtype & guard against nested subdirs Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 52/54] test: add tests guarding against subdir scanning for vtypes Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-storage v1 53/54] storage api: mark old public regexes for removal, bump APIVER & APIAGE Max R. Carrara
2026-04-22 11:13 ` [PATCH pve-manager v1 54/54] fix #2884: ui: storage: add field for 'max-scan-depth' property Max R. Carrara

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=20260422111322.257380-38-m.carrara@proxmox.com \
    --to=m.carrara@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 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