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 13F551FF0A7 for ; Mon, 17 Aug 2026 11:37:08 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 54D4723B7E; Mon, 17 Aug 2026 11:36:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1786958969; bh=GwPCY6aRuuemL6UZswXAHvjexo4C6LxGwmX5Hk6ORa4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=t0YWuWGMtlaU7pHju/HLVCakxebb+cNZcUeUo8h+oh2JOjw8VcZAdMGxn0Zgw14Tr 0ESlJEKqvZqBBN0cnJMfF6YE/xHqA67NdtK5z1/U8/Yo8R+2wf5eK2/xDS+td7nDxW 86WByJYY7c4f/Bl8msZq8V/Rid0D/zw7A3eFYerNOcWvg6I2KwmBrRyBAP84kGhmY5 g93kvMGMhPz7b2ZM0TBPgPEECBh12kt2hTyOoJSloh9pfdhtlxZ5v7w2b7Z7dOszFb lpGH3rI/qkinSfjx0BnJcptAjU7uE8Um8H1czwVeQBFw0Wk4GHAs39MWqyMYstXaZl dBkq1beIvM2wA== Date: Mon, 17 Aug 2026 11:29:27 +0200 From: Christian Ludwig To: , <-b@genua.de>, 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="----766B9C13328CC1E9B88AD08C4C1AFD3A" X-SPAM-LEVEL: Spam detection results: 0 DKIM_INVALID 0.1 DKIM or DK signature exists, but is not valid DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: ELKSKKV6NRH4LHQBUCZIPD7HJUQLCWK6 X-Message-ID-Hash: ELKSKKV6NRH4LHQBUCZIPD7HJUQLCWK6 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: ------766B9C13328CC1E9B88AD08C4C1AFD3A 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 ------766B9C13328CC1E9B88AD08C4C1AFD3A--