[pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jul 29 13:15:18 CEST 2025


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 src/test/parse_volname_test.pm     | 10 ----------
 src/test/path_to_volume_id_test.pm | 11 +++--------
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/test/parse_volname_test.pm b/src/test/parse_volname_test.pm
index 9e96842..0d077a9 100644
--- a/src/test/parse_volname_test.pm
+++ b/src/test/parse_volname_test.pm
@@ -90,11 +90,6 @@ my $tests = [
     #
     # container rootdir
     #
-    {
-        description => 'Container rootdir, sub directory',
-        volname => "rootdir/$vmid",
-        expected => ['rootdir', "$vmid", "$vmid"],
-    },
     {
         description => 'Container rootdir, subvol',
         volname => "$vmid/subvol-$vmid-disk-0.subvol",
@@ -182,11 +177,6 @@ my $tests = [
         expected =>
             "unable to parse directory volume name 'vztmpl/debian-10.0-standard_10.0-1_amd64.zip.gz'\n",
     },
-    {
-        description => 'Failed match: Container rootdir, subvol',
-        volname => "rootdir/subvol-$vmid-disk-0",
-        expected => "unable to parse directory volume name 'rootdir/subvol-$vmid-disk-0'\n",
-    },
     {
         description => 'Failed match: VM disk image, linked, vhdx',
         volname => "$vmid/base-$vmid-disk-0.vhdx/$vmid/vm-$vmid-disk-0.vhdx",
diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm
index 9a5ecbb..ab7e276 100644
--- a/src/test/path_to_volume_id_test.pm
+++ b/src/test/path_to_volume_id_test.pm
@@ -138,10 +138,10 @@ my @tests = (
     },
 
     {
-        description => 'Rootdir',
-        volname => "$storage_dir/private/1234/", # fileparse needs / at the end
+        description => 'Rootdir, folder subvol, legacy naming',
+        volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
         expected => [
-            'rootdir', 'local:rootdir/1234',
+            'ct-vol', 'local:1234/subvol-1234-disk-0.subvol',
         ],
     },
     {
@@ -203,11 +203,6 @@ my @tests = (
         volname => "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.zip.gz",
         expected => [''],
     },
-    {
-        description => 'Rootdir as subvol, wrong path',
-        volname => "$storage_dir/private/subvol-19254-disk-0/",
-        expected => [''],
-    },
     {
         description => 'Backup, wrong format, openvz, zip.gz',
         volname => "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.zip.gz",
-- 
2.47.2





More information about the pve-devel mailing list