From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D05A41FF16F for ; Thu, 16 Jan 2025 16:19:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B51B92C822; Thu, 16 Jan 2025 16:19:22 +0100 (CET) Message-ID: Date: Thu, 16 Jan 2025 16:18:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Daniel Herzig References: <20250113085608.99498-1-d.herzig@proxmox.com> <20250113085608.99498-3-d.herzig@proxmox.com> Content-Language: en-US From: Daniel Kral In-Reply-To: <20250113085608.99498-3-d.herzig@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.012 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v2 2/12] qemuserver: add helper function for mocking files X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 1/13/25 09:55, Daniel Herzig wrote: > This stub function can be used for mocking a file's existance in testruns. > > Signed-off-by: Daniel Herzig > --- > PVE/QemuServer.pm | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index 5cde94a1..d07c170e 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -8999,4 +8999,9 @@ sub delete_ifaces_ipams_ips { > } > } > > +sub file_exists { > + my $file_path = shift; > + return -e $file_path > +} > + > 1; nit: I think this could be squashed into patch #3. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel