From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 227E81FF0A7 for ; Mon, 17 Aug 2026 14:00:35 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4FEE423E3C; Mon, 17 Aug 2026 13:59:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1786967969; bh=XcGPrDAI7k7BGL+cLxqlgSYK+/eCUOrohNFT39jGpdo=; h=Date:From:To:Subject:References:In-Reply-To:From; b=udsuLbqfCyiymb14Cy0jM8yedXNjJI4cGpdrGf8/+pzdlLjN4TfThFFRtZzy+S9Mg orQZThZ1L4PkGKk5QZOhj6MFrNHSOa+Tkz/YNDzIQE3fuTFVAo/wnO1eITPYlMQ+cy ZrChgabFv0NeSUbiA6atF5rAZg7kWIwHhrIMiZm8e3oF4bpAuGwuWYQUFJjD7r5jp7 rcjS96zBhVGUgCNevMsiEKYbVG26ITaanECzWi46nYYHd3/fCUORi0fuRdLa2eTIup 7IPe5ty/nLLDWh+aF0qROyBnz47cKIRQn8SioEUDl7baoXwj5uWUMCbTM6TLzQEJv4 jrQINNES3AxmQ== Date: Mon, 17 Aug 2026 13:59:28 +0200 From: Christian Ludwig To: Subject: [PATCH pve-storage 6/13] efi-firmware storage path to volume conversion test Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [192.168.217.185] X-ClientProxiedBy: kch1-mta09.win.genua.de (10.208.16.109) To kch1-mta07.win.genua.de (10.208.16.107) Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="----784E104200A5CB241E08DF6266F5AC41" X-SPAM-LEVEL: Spam detection results: 0 AWL 0.156 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record UNPARSEABLE_RELAY 0.001 Informational: message has unparseable relay lines Message-ID-Hash: 7EBKR2O3V5BS2AM6IXE44OP2NMKGTI4P X-Message-ID-Hash: 7EBKR2O3V5BS2AM6IXE44OP2NMKGTI4P X-MailFrom: christian_ludwig@genua.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Content-Filtered-By: Mailman/MimeDel 3.3.10 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ------784E104200A5CB241E08DF6266F5AC41 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Add test cases to check that storage paths under the efi-firmware/ subdirectory are correctly listed as efi-firmware content type volumes, regardless of file extension. Signed-off-by: Christian Ludwig --- src/test/list_volumes_test.pm | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm index 0876902..a1e98d1 100644 --- a/src/test/list_volumes_test.pm +++ b/src/test/list_volumes_test.pm @@ -72,6 +72,7 @@ my $scfg = { 'images' => 1, 'snippets' => 1, 'backup' => 1, + 'efi-firmware' => 1, }, }; @@ -462,6 +463,54 @@ my @tests = ( ], expected => [], # returns empty list }, + { + description => 'VMID: none, efi-firmware .fd files listed', + vmid => undef, + files => [ + "$storage_dir/efi-firmware/custom.fd", + "$storage_dir/efi-firmware/vendor-bios-v2.fd", + ], + expected => [ + { + 'content' => 'efi-firmware', + 'ctime' => DEFAULT_CTIME, + 'format' => 'raw', + 'size' => DEFAULT_SIZE, + 'volid' => 'local:efi-firmware/custom.fd', + }, + { + 'content' => 'efi-firmware', + 'ctime' => DEFAULT_CTIME, + 'format' => 'raw', + 'size' => DEFAULT_SIZE, + 'volid' => 'local:efi-firmware/vendor-bios-v2.fd', + }, + ], + }, + { + description => 'VMID: none, all efi-firmware files listed regardless of extension', + vmid => undef, + files => [ + "$storage_dir/efi-firmware/custom.fd", + "$storage_dir/efi-firmware/custom.iso", + ], + expected => [ + { + 'content' => 'efi-firmware', + 'ctime' => DEFAULT_CTIME, + 'format' => 'raw', + 'size' => DEFAULT_SIZE, + 'volid' => 'local:efi-firmware/custom.fd', + }, + { + 'content' => 'efi-firmware', + 'ctime' => DEFAULT_CTIME, + 'format' => 'raw', + 'size' => DEFAULT_SIZE, + 'volid' => 'local:efi-firmware/custom.iso', + }, + ], + }, ); # provide static vmlist for tests @@ -520,7 +569,7 @@ plan tests => $plan + 1; { my $sid = 'local'; - my $types = ['rootdir', 'images', 'vztmpl', 'iso', 'backup', 'snippets']; + my $types = ['rootdir', 'images', 'vztmpl', 'iso', 'backup', 'snippets', 'efi-firmware']; my @suffixes = ('qcow2', 'raw', 'vmdk', 'vhdx'); # run through test cases -- 2.34.1 ------784E104200A5CB241E08DF6266F5AC41--