From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id AA4D81FF164
	for <inbox@lore.proxmox.com>; Fri, 17 Jan 2025 12:37:30 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id E278FBFFD;
	Fri, 17 Jan 2025 12:37:26 +0100 (CET)
From: Daniel Herzig <d.herzig@proxmox.com>
To: Daniel Kral <d.kral@proxmox.com>
In-Reply-To: <d5d6248a-263f-45ed-8280-7ac1af8a2493@proxmox.com> (Daniel Kral's
 message of "Thu, 16 Jan 2025 16:18:49 +0100")
References: <20250113085608.99498-1-d.herzig@proxmox.com>
 <20250113085608.99498-3-d.herzig@proxmox.com>
 <d5d6248a-263f-45ed-8280-7ac1af8a2493@proxmox.com>
Date: Fri, 17 Jan 2025 12:36:53 +0100
Message-ID: <87bjw5n02y.fsf@proxmox.com>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.292 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 <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

Daniel Kral <d.kral@proxmox.com> writes:

> 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 <d.herzig@proxmox.com>
>> ---
>>   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.

Right, good point, this would make things more compact.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel