From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763627846; cv=none; d=zohomail.com; s=zohoarc; b=j3wLCdgpgdlh18yoSYkerr5Y5fzvRd7T6bi+TFcxevbQyNUyR7UOWX1g/g6CjKjKaj8mHwGuIAIayUJnfC51Epkh2unOvc+NTCS+E82M7H5f1bYCqXYnmT2IQ/44Leh+YrOTXwO3ICg4U2qGLSllmDSDasrk+lIA43Tib+TBypA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763627846; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=CqmcuH6QWGX9JpX3IHgf3Z3sauugrEdLV3sSnCWlppM=; b=CfbEkVjs+clcETC6C82BF0b+pt73lZgMOoiCfmohMMdeVfl2cL/j3i57ap6GNAaDcSn0pbVqGk3mhn5KPYPD9WV/KmyrzE1n1g89Ll6CW/D8pZDPv04kl0HkxypvrmucQfqvNAAhi2BivkIJ0PHc/nncO7HwBos9n7K6sniBdXE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763627846372955.0654002305715; Thu, 20 Nov 2025 00:37:26 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id C1F9644663; Thu, 20 Nov 2025 03:37:25 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B2F93417E7; Thu, 20 Nov 2025 03:36:31 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9148C44053; Thu, 20 Nov 2025 03:33:06 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 39D3941BEB for ; Thu, 20 Nov 2025 03:33:03 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-Vy7KPuSfOWCVb3EYuhsSfg-1; Thu, 20 Nov 2025 03:33:01 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 63DE3195608A for ; Thu, 20 Nov 2025 08:33:00 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B39111800451 for ; Thu, 20 Nov 2025 08:32:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CqmcuH6QWGX9JpX3IHgf3Z3sauugrEdLV3sSnCWlppM=; b=hh2diXZogMcARU19a33H2gGX16VgXrfTCk+g6xOl9foVKaEvoy+ZRiUorm1KIBsYQ3WbCf G12yjC/K9AvvF1RvLB5aO5qCx5T0ZCArgdabq2rSarsGCbKjiUv2dzAzsE+nD61mUmB2Di HLWI2xua+uyJP6MPwAvGIog5sG/bRaY= X-MC-Unique: Vy7KPuSfOWCVb3EYuhsSfg-1 X-Mimecast-MFC-AGG-ID: Vy7KPuSfOWCVb3EYuhsSfg_1763627580 To: devel@lists.libvirt.org Subject: [PATCH 1/9] libvirt_esx.syms: Put proper header file name into comment Date: Thu, 20 Nov 2025 09:32:46 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wi6P-AB31XarmqARYD4GLDHP__OqfWhVHM5nJcRfyGM_1763627580 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4JKEZLOW267FUB4ZLBUBJQUIJR5IV64V X-Message-ID-Hash: 4JKEZLOW267FUB4ZLBUBJQUIJR5IV64V X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763627848978018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The esxVI_DateTime_ConvertToCalendarTime() symbol is declared in esx_vi_types.h header file. Reflect this in the corresponding .syms file. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/libvirt_esx.syms | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index 3c14b94aeb..023fecbe94 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -5,6 +5,9 @@ # esx/esx_util.h esxUtil_EscapeDatastoreItem; esxUtil_ParseDatastorePath; + + +# esx/esx_vi_types.h esxVI_DateTime_ConvertToCalendarTime; =20 # Let emacs know we want case-insensitive sorting --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763627974; cv=none; d=zohomail.com; s=zohoarc; b=I36UJMAeWX4kM9zVcsO1CeSAgRmqLSudk1Hr5N0+eoAWx4UETY0qu4g7izh1b9I3jtC9vWfYc/4qOWNjVy6MxHMQy6PScPcGuIeDT36hZM2GWFiZuGgvOPyfHsShV7QgkaTbF5SlAVmR1y43Xq/OXA3gUxyGHtX5n3uey+UjUiQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763627974; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=JWKdOJa47wKeUeRNal2nKh+zuO8uAgkGGz1c+ALXmK4=; b=jzbjcVdm5f/nz1N0mDex9AJX1t3V2QqiW6x6G8oD7D1M7NgB/DJ4URGRr9po6oOn4sLG+EedNso55kys7uuNi5UMUMIy10nSf6MAXMpmLrSG3dTZdHp35a5su1ORjsNcuTn5n2mRL0M3sHzX6B7p1JJ1PRG8oUc6RvqUl9Cvxvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763627974053473.7904184834948; Thu, 20 Nov 2025 00:39:34 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 8184C44052; Thu, 20 Nov 2025 03:39:33 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 5D4C941AB2; Thu, 20 Nov 2025 03:37:01 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9FD7644051; Thu, 20 Nov 2025 03:33:08 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CA02944051 for ; Thu, 20 Nov 2025 03:33:03 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-u8jOULJ6MW24m9Vni_mgOA-1; Thu, 20 Nov 2025 03:33:02 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 69ABC1800473 for ; Thu, 20 Nov 2025 08:33:01 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C2B2618004A3 for ; Thu, 20 Nov 2025 08:33:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWKdOJa47wKeUeRNal2nKh+zuO8uAgkGGz1c+ALXmK4=; b=CBon5xOcbtu5+TNCNxIxWjkkOroDmilIdK4suLyxn8iS6yscfk7ljDEiHGA9uR559MDGiv zSl0Wf8d3XwlLWmh9ZIj6DLn2ut0JOb14XEJ4HygOvJE906PNxlRy/30YEnqdsyKf52vEq c1kDadmyHHunbRvYEBCZVu5qIS3mx/Q= X-MC-Unique: u8jOULJ6MW24m9Vni_mgOA-1 X-Mimecast-MFC-AGG-ID: u8jOULJ6MW24m9Vni_mgOA_1763627581 To: devel@lists.libvirt.org Subject: [PATCH 2/9] esx: Expose esxParseVMXFileName() for tests Date: Thu, 20 Nov 2025 09:32:47 +0100 Message-ID: <007174e3551ef13a40039ef15f1a9ee08384340c.1763627556.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: QDRskPTG_FoTx2ZhH4omUFqrzna9OE0Z7lB-6Z3TTNU_1763627581 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BYT6JVLCV6NN232VGTZOLAOFTWAK2TVZ X-Message-ID-Hash: BYT6JVLCV6NN232VGTZOLAOFTWAK2TVZ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763627975316018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik So far, our vmx2xmltest uses a custom .parseFileName callback. And it kind of makes sense because the one that's used in production (esxParseVMXFileName()) does some HTTP requests which we don't want to do in our test suite. But this creates other sorts of problems and the idea is to have the test ditch custom parse callback and stick with the production one. But for now, just expose it. With it, the esxVMX_Data struct is exposed too as it is passed into the function (via 'opaque' argument). Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_driver.c | 13 +++---------- src/esx/esx_driverpriv.h | 27 +++++++++++++++++++++++++++ src/libvirt_esx.syms | 4 ++++ 3 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 src/esx/esx_driverpriv.h diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 34c0e28d31..6452a33b7c 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -33,11 +33,12 @@ #include "vmx.h" #include "virtypedparam.h" #include "esx_driver.h" +#define LIBVIRT_ESX_DRIVERPRIV_H_ALLOW +#include "esx_driverpriv.h" #include "esx_interface_driver.h" #include "esx_network_driver.h" #include "esx_storage_driver.h" #include "esx_private.h" -#include "esx_vi.h" #include "esx_vi_methods.h" #include "esx_util.h" #include "esx_stream.h" @@ -50,14 +51,6 @@ VIR_LOG_INIT("esx.esx_driver"); =20 static int esxDomainGetMaxVcpus(virDomainPtr domain); =20 -typedef struct _esxVMX_Data esxVMX_Data; - -struct _esxVMX_Data { - esxVI_Context *ctx; - char *datastorePathWithoutFileName; -}; - - =20 static void esxFreePrivate(esxPrivate **priv) @@ -124,7 +117,7 @@ esxFreePrivate(esxPrivate **priv) * exception and need special handling. Parse the datastore name and use it * to lookup the datastore by name to verify that it exists. */ -static int +int esxParseVMXFileName(const char *fileName, void *opaque, char **out, diff --git a/src/esx/esx_driverpriv.h b/src/esx/esx_driverpriv.h new file mode 100644 index 0000000000..c947866d4e --- /dev/null +++ b/src/esx/esx_driverpriv.h @@ -0,0 +1,27 @@ +/* + * esx_driverpriv.h: private declarations for ESX driver + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef LIBVIRT_ESX_DRIVERPRIV_H_ALLOW +# error "esx_driverpriv.h may only be included by esx_driver.c or test sui= tes" +#endif /* LIBVIRT_ESX_DRIVERPRIV_H_ALLOW */ + +#pragma once + +#include "esx_vi.h" + +typedef struct _esxVMX_Data esxVMX_Data; + +struct _esxVMX_Data { + esxVI_Context *ctx; + char *datastorePathWithoutFileName; +}; + + +int +esxParseVMXFileName(const char *fileName, + void *opaque, + char **out, + bool allow_missing); diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index 023fecbe94..6a61b7019c 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -2,6 +2,10 @@ # These symbols are dependent upon --with-esx via WITH_ESX # =20 +# esx/esx_driverpriv.h +esxParseVMXFileName; + + # esx/esx_util.h esxUtil_EscapeDatastoreItem; esxUtil_ParseDatastorePath; --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763627901; cv=none; d=zohomail.com; s=zohoarc; b=gLgq/RTy9pv0R4P4c1FfNZ+hbw0b0b/ESA5NDx3gP8t2aaQK421SlUi7DG3Gz3/l+SA66VwVuoVJqrOHJJ6JuV5bmLosba0PqlQKVp66U7xkJYWO9nzqwGe/vd7R7Tj81FP3815AZOZ+F2PzEP0UPl31L2qH0uu1OaouQvzzkaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763627901; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=IbL7asr4xaNwUuEAY7lviUXaB0i6u+wl0p2viRSIt/I=; b=HI2EYnjcztUaq6HjuKuqsYNXtPgOeETnjk6oG86G9C1BgoghUHCU21FMDYwJz37qzVroq7HXVhsENZgOy34DHQ/UXM6j0wK42QnmMhcpXnho6OkDFBWl3bWkEwnB3EZ3Fs4oU8MvFNTr2zrnXAS3ecoq9WXAU1hjuM7/qJfPxQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763627901345611.3073392509672; Thu, 20 Nov 2025 00:38:21 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id B21BD440B3; Thu, 20 Nov 2025 03:38:20 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 854064418C; Thu, 20 Nov 2025 03:36:49 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id AB52844050; Thu, 20 Nov 2025 03:33:06 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 08AA744055 for ; Thu, 20 Nov 2025 03:33:05 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-344-Sou3gooVMNOyOY1nImt8IQ-1; Thu, 20 Nov 2025 03:33:03 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 94A281954B17 for ; Thu, 20 Nov 2025 08:33:02 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E48BC1800451 for ; Thu, 20 Nov 2025 08:33:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IbL7asr4xaNwUuEAY7lviUXaB0i6u+wl0p2viRSIt/I=; b=Tz7H6xcg4yg8UAkgRe6/JoLkWxFd/L+ATJT/xK3dVe767iYgbjQUdGJmF1Esh2lCP8W/2p 1T5qVRqpSZg1ZCAAx5JDH78mFkfdCatEuw9ml/9NkvKv+5sE3Cr997gReH1SMZSIbx4Fyu XxEGwod8ILJtla9M1GYnrLNswniaYHA= X-MC-Unique: Sou3gooVMNOyOY1nImt8IQ-1 X-Mimecast-MFC-AGG-ID: Sou3gooVMNOyOY1nImt8IQ_1763627582 To: devel@lists.libvirt.org Subject: [PATCH 3/9] esx: Make esxVI_LookupDatastoreList() mockable Date: Thu, 20 Nov 2025 09:32:48 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: em5CKv11NcAwmmwnXA70P3M812jo-AA7Vznuj5qjjiQ_1763627582 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MCHKCJISMT2NGE7YOFY2DOHINYYBZEMW X-Message-ID-Hash: MCHKCJISMT2NGE7YOFY2DOHINYYBZEMW X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763627903058018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This function is going to be mocked soon. Annotate and export it. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_vi.h | 2 +- src/libvirt_esx.syms | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h index b5eeaa750e..854f3fc61a 100644 --- a/src/esx/esx_vi.h +++ b/src/esx/esx_vi.h @@ -397,7 +397,7 @@ int esxVI_LookupVirtualMachineByUuidAndPrepareForTask bool autoAnswer); =20 int esxVI_LookupDatastoreList(esxVI_Context *ctx, esxVI_String *propertyNa= meList, - esxVI_ObjectContent **datastoreList); + esxVI_ObjectContent **datastoreList) ATTRIBU= TE_MOCKABLE; =20 int esxVI_LookupDatastoreByName(esxVI_Context *ctx, const char *name, esxVI_String *propertyNameList, diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index 6a61b7019c..30883ab629 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -11,6 +11,10 @@ esxUtil_EscapeDatastoreItem; esxUtil_ParseDatastorePath; =20 =20 +# esx/esx_vi.h +esxVI_LookupDatastoreList; + + # esx/esx_vi_types.h esxVI_DateTime_ConvertToCalendarTime; =20 --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628024; cv=none; d=zohomail.com; s=zohoarc; b=FFchoObfmHLNtF825NOlqVBRLvciNJJsCVMC9eBmSEt90obZbaVfrKCJOv/BSWtgt4i/fCAoGUWwoU/ezHrDKy4nj9l1EDBxfaePm8iIIqjZbZ48TX8QmLTv9P2xt2PwiQm9PwjzZhyZbV0A73WnTJ5EDk/39cdF7xE44k4R1r4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628024; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Rtf+spbyTXL8ngBHa74Xs+GOuySgol6H1/Wh824QGJQ=; b=J4QaigAM9xeaLrcyHUOreyRCPk1ho4MX4Iu9LX22SLXD8bh41RUlr3Zf4J6+RfewK64gnL1KKXcd8Ec5q6O3VRXR1uqhiRB0+1PEXlndIsm+ZldN1pRWfiGxqXiJb8+LseQr44zIywdvaxwcFKboIVeTQiz+mO2vtAJwi0vwbm4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763628024067787.6805628977538; Thu, 20 Nov 2025 00:40:24 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3A27144224; Thu, 20 Nov 2025 03:40:20 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 4BAF544329; Thu, 20 Nov 2025 03:37:12 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id DFB6441BEB; Thu, 20 Nov 2025 03:33:08 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id AB50A41BEB for ; Thu, 20 Nov 2025 03:33:06 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-sON_HwqsP4O2cE0k_Oz04g-1; Thu, 20 Nov 2025 03:33:04 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A24BB1800372 for ; Thu, 20 Nov 2025 08:33:03 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F3759180049F for ; Thu, 20 Nov 2025 08:33:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rtf+spbyTXL8ngBHa74Xs+GOuySgol6H1/Wh824QGJQ=; b=KZ1b/IGJfZ+Mq3WpJWvaCJxo5BM/c1m5qLdEgQI9NE4KO/Jj8bHRLmNzgK9ijd6QTgO5Gd 0/y8/16fZsI5HGzbp3xPqBWYHx9hu5O7GSNe5QygkVsXm7nk5OGucR0gBY4UTAAIdbkEtB dmPZeH7LSP3DviLouBowrZMECr13n3g= X-MC-Unique: sON_HwqsP4O2cE0k_Oz04g-1 X-Mimecast-MFC-AGG-ID: sON_HwqsP4O2cE0k_Oz04g_1763627583 To: devel@lists.libvirt.org Subject: [PATCH 4/9] esx: Make esxVI_LookupDatastoreHostMount() mockable Date: Thu, 20 Nov 2025 09:32:49 +0100 Message-ID: <9aa12ab6e52a4ba0513c5002d10ab3685c1f4104.1763627556.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fyT-PTaZ0cG3D2yhcXlevlnecVcv1_dCEzjcTt6srjo_1763627583 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DV6FMXX4XOAPZB6B4WVPDD7F2DDMZKFE X-Message-ID-Hash: DV6FMXX4XOAPZB6B4WVPDD7F2DDMZKFE X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628025457018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This function is going to be mocked soon. Annotate and export it. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_vi.h | 2 +- src/libvirt_esx.syms | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h index 854f3fc61a..a4ec0ab48c 100644 --- a/src/esx/esx_vi.h +++ b/src/esx/esx_vi.h @@ -413,7 +413,7 @@ int esxVI_LookupDatastoreByAbsolutePath(esxVI_Context *= ctx, int esxVI_LookupDatastoreHostMount(esxVI_Context *ctx, esxVI_ManagedObjectReference *datastore, esxVI_DatastoreHostMount **hostMount, - esxVI_Occurrence occurrence); + esxVI_Occurrence occurrence) ATTRIBUTE_= MOCKABLE; =20 int esxVI_LookupTaskInfoByTask(esxVI_Context *ctx, esxVI_ManagedObjectReference *task, diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index 30883ab629..503a995aa5 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -12,6 +12,7 @@ esxUtil_ParseDatastorePath; =20 =20 # esx/esx_vi.h +esxVI_LookupDatastoreHostMount; esxVI_LookupDatastoreList; =20 =20 --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628072; cv=none; d=zohomail.com; s=zohoarc; b=HC5lc3z4dLNHUO0QZIUV6oMAkmcSAXyOB976/VyVC9Mp5xyZmR7ccOMpi+2xeMI1uW3gFmp4eoyLeUkFxTS4i3KUf34FmNDQTmRx08lWMJ1SPmkYsoFRXJassqMYknxP7t4Mt1vC0t5FQJE7xj3EaVAoZYJ8rzR2kKfQGJRMdWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628072; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=ez7KZGeq2cI+pyBHoGmht8dffZ6FH6jWWl4L49PD9As=; b=ZDRq5BT34C7PH33gS7NcIfqmoWfyUgoMLy0mKvFJV6HLJiaxigR1d5eoTMz3g4HLIPGk7hxy49DxmtXqxNu/NjCW6wiymPHTlDnB4/S5TUoVtWbERD987EI5IrZXa80hLcaqrLnSp62KrPN/+XHbeimpFu5VrzeKYXX2wzyMqJY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 176362807214798.50002819090594; Thu, 20 Nov 2025 00:41:12 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 84D3344190; Thu, 20 Nov 2025 03:41:11 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A5EF24426E; Thu, 20 Nov 2025 03:37:16 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 252C344051; Thu, 20 Nov 2025 03:33:09 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A812741C09 for ; Thu, 20 Nov 2025 03:33:07 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-yFie2sP1OuuBh1BDzPfOhg-1; Thu, 20 Nov 2025 03:33:05 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B32811954B11 for ; Thu, 20 Nov 2025 08:33:04 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0E02E180049F for ; Thu, 20 Nov 2025 08:33:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ez7KZGeq2cI+pyBHoGmht8dffZ6FH6jWWl4L49PD9As=; b=EI2aKwokJZLIvQp1Pv8hxQdx+HyvLSrqdR6S4fWV/5J6TGH7r/eX7o4FfhPTxdaJxgqimf JD53SD9PRzLbHFNBchAC0GbqmRXhRznppInKMWsTFvc3/cOwhWNzJ8G9k3U2faR2dTDh91 /O5OuuThIjKhxEKnNhrlsreHtkdW+f0= X-MC-Unique: yFie2sP1OuuBh1BDzPfOhg-1 X-Mimecast-MFC-AGG-ID: yFie2sP1OuuBh1BDzPfOhg_1763627584 To: devel@lists.libvirt.org Subject: [PATCH 5/9] esx: Make esxVI_LookupDatastoreByName() mockable Date: Thu, 20 Nov 2025 09:32:50 +0100 Message-ID: <0789f1dda768b1ec3e57b59bd85d7b7d867ee579.1763627556.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lq_fU3c7UVRprbR2Zn6pb6LXnhcJznwbNc93yV8pVmA_1763627584 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ZNGBAHJSCJOF3AANTV6EIQGBPHHVUMB4 X-Message-ID-Hash: ZNGBAHJSCJOF3AANTV6EIQGBPHHVUMB4 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628073656018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This function is going to be mocked soon. Annotate and export it. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_vi.h | 2 +- src/libvirt_esx.syms | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h index a4ec0ab48c..b083ef2b0c 100644 --- a/src/esx/esx_vi.h +++ b/src/esx/esx_vi.h @@ -402,7 +402,7 @@ int esxVI_LookupDatastoreList(esxVI_Context *ctx, esxVI= _String *propertyNameList int esxVI_LookupDatastoreByName(esxVI_Context *ctx, const char *name, esxVI_String *propertyNameList, esxVI_ObjectContent **datastore, - esxVI_Occurrence occurrence); + esxVI_Occurrence occurrence) ATTRIBUTE_MOC= KABLE; =20 int esxVI_LookupDatastoreByAbsolutePath(esxVI_Context *ctx, const char *absolutePath, diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index 503a995aa5..d05684fd97 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -12,6 +12,7 @@ esxUtil_ParseDatastorePath; =20 =20 # esx/esx_vi.h +esxVI_LookupDatastoreByName; esxVI_LookupDatastoreHostMount; esxVI_LookupDatastoreList; =20 --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628152; cv=none; d=zohomail.com; s=zohoarc; b=hCO2ZuJFNyGqK+XpPg1VyxI7FaLcIKYSDf59eYQh30rHAAYaG5bYGkFMW7wiVU2YGajiVg9JjPUifVD+zQIkqg0e5Lr67QCc1xmMVF14QnxhviFUJQDpqlbPGbQZmx7JSjHeTIU4YajmRxl0bgtAL8X86/ca6eeY6SKq8NENrYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628152; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=3qq4IMXgWa95Fies3FqkO4nPJyxJMA8JCnM+vWKKuKc=; b=kDISdomrDPFsohrqZJ60KHi+2uz3izn6lUPp7waCYBsVxolNOuEFWQJMSj44QVrsJ/iqSD+fmytZTxnZYQDK1piy72CAQqh6olAhtagUosd7qawbvy2RA/7qTRwD5CXcTNhlqdWJ/AdaXzlEfPsVtdwBpS8B/Wbz3c/Ok9+5pXU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763628152069184.45358612175733; Thu, 20 Nov 2025 00:42:32 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3397A44197; Thu, 20 Nov 2025 03:42:31 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 019D63F313; Thu, 20 Nov 2025 03:37:21 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9D5FD41C0F; Thu, 20 Nov 2025 03:33:09 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 74FD43FCA6 for ; Thu, 20 Nov 2025 03:33:08 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-igVPelI7MiWmTolPU_5XeQ-1; Thu, 20 Nov 2025 03:33:06 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B7B931800372 for ; Thu, 20 Nov 2025 08:33:05 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D47E180049F for ; Thu, 20 Nov 2025 08:33:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3qq4IMXgWa95Fies3FqkO4nPJyxJMA8JCnM+vWKKuKc=; b=E+nvBQzzYbsde4AAEwxBonN00DGcHbYkByQ/x3y1iy8JZS+rXPDnT5FPiEOyTzbEo0C9QM A28lGHP/N3d4n9oJMKJTROnPd4OWaFyFMSU7UnezKlZtk+9vOHHnB4YHz6/puDdQulq/1+ KsRTmsrT6UMaiQ2NBCaWNke5fCtI3gI= X-MC-Unique: igVPelI7MiWmTolPU_5XeQ-1 X-Mimecast-MFC-AGG-ID: igVPelI7MiWmTolPU_5XeQ_1763627585 To: devel@lists.libvirt.org Subject: [PATCH 6/9] tests: Introduce vmx2xmlmock Date: Thu, 20 Nov 2025 09:32:51 +0100 Message-ID: <9a2629aee6de47c0abd8fe22d09ebba95f81e048.1763627556.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 6SB4CezKTjw988BOJwRBpnNw4MumaGA32qXYpGTh8OU_1763627585 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H7C2KSOVUI7GZBONRM4JS4TNCSI2ITRY X-Message-ID-Hash: H7C2KSOVUI7GZBONRM4JS4TNCSI2ITRY X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628154208018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik If we want vmx2xmltest to use actual file name parser that's used in production (esxParseVMXFileName()) we need a mock to stop it from doing any HTTP requests and also to return predictable data. So far, the function can call three functions that do HTTP requests: esxVI_LookupDatastoreList(), esxVI_LookupDatastoreHostMount() and esxVI_LookupDatastoreByName(). Mock all three of them. And since their implementation uses some other symbols (like allocators or _AppendToList() helpers) we need to expose these symbols too. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/libvirt_esx.syms | 10 ++++++ tests/meson.build | 3 ++ tests/vmx2xmlmock.c | 79 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 tests/vmx2xmlmock.c diff --git a/src/libvirt_esx.syms b/src/libvirt_esx.syms index d05684fd97..d228e2bef7 100644 --- a/src/libvirt_esx.syms +++ b/src/libvirt_esx.syms @@ -18,8 +18,18 @@ esxVI_LookupDatastoreList; =20 =20 # esx/esx_vi_types.h +esxVI_AnyType_Alloc; esxVI_DateTime_ConvertToCalendarTime; =20 + +# esx/esx/esx_vi_types.generated.h +esxVI_DatastoreHostMount_Alloc; +esxVI_DynamicProperty_Alloc; +esxVI_DynamicProperty_AppendToList; +esxVI_HostMountInfo_Alloc; +esxVI_ObjectContent_Alloc; +esxVI_ObjectContent_AppendToList; + # Let emacs know we want case-insensitive sorting # Local Variables: # sort-fold-case: t diff --git a/tests/meson.build b/tests/meson.build index 0d76d37959..9adf172b7f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -553,6 +553,9 @@ if conf.has('WITH_VMX') { 'name': 'vmx2xmltest' }, { 'name': 'xml2vmxtest' }, ] + mock_libs +=3D [ + { 'name': 'vmx2xmlmock', 'deps': [ esx_dep ] }, + ] endif =20 if conf.has('WITH_JSON') diff --git a/tests/vmx2xmlmock.c b/tests/vmx2xmlmock.c new file mode 100644 index 0000000000..ce4a9a426b --- /dev/null +++ b/tests/vmx2xmlmock.c @@ -0,0 +1,79 @@ +#include + +#include "internal.h" +#include "esx_vi.h" + +int +esxVI_LookupDatastoreList(esxVI_Context *ctx G_GNUC_UNUSED, + esxVI_String *propertyNameList, + esxVI_ObjectContent **datastoreList) +{ + esxVI_String *tmp; + + for (tmp =3D propertyNameList; tmp; tmp =3D tmp->_next) { + esxVI_ObjectContent *obj =3D NULL; + + if (STREQ(tmp->value, "summary.name")) { + esxVI_DynamicProperty *prop =3D NULL; + + esxVI_ObjectContent_Alloc(&obj); + + esxVI_DynamicProperty_Alloc(&prop); + prop->name =3D g_strdup("summary.name"); + + esxVI_AnyType_Alloc(&prop->val); + prop->val->type =3D esxVI_Type_String; + prop->val->other =3D g_strdup("xsd:string"); + prop->val->value =3D g_strdup("datastore"); + prop->val->string =3D prop->val->value; + esxVI_DynamicProperty_AppendToList(&obj->propSet, prop); + } + + if (obj) { + esxVI_ObjectContent_AppendToList(datastoreList, obj); + } + } + + return 0; +} + + +int +esxVI_LookupDatastoreHostMount(esxVI_Context *ctx G_GNUC_UNUSED, + esxVI_ManagedObjectReference *datastore G_G= NUC_UNUSED, + esxVI_DatastoreHostMount **hostMount, + esxVI_Occurrence occurrence G_GNUC_UNUSED) +{ + esxVI_DatastoreHostMount *hm =3D NULL; + + esxVI_DatastoreHostMount_Alloc(&hm); + esxVI_HostMountInfo_Alloc(&hm->mountInfo); + hm->mountInfo->path =3D g_strdup("/non/existent"); + hm->mountInfo->accessMode =3D g_strdup("readWrite"); + hm->mountInfo->accessible =3D esxVI_Boolean_True; + + *hostMount =3D hm; + return 0; +} + + +int +esxVI_LookupDatastoreByName(esxVI_Context *ctx G_GNUC_UNUSED, + const char *name, + esxVI_String *propertyNameList G_GNUC_UNUSED, + esxVI_ObjectContent **datastore, + esxVI_Occurrence occurrence G_GNUC_UNUSED) +{ + esxVI_ObjectContent *obj =3D NULL; + + if (STREQ(name, "missing") || STREQ(name, "ds")) { + *datastore =3D NULL; + return 0; + } + + /* No need to return anything useful, empty object is fine. */ + esxVI_ObjectContent_Alloc(&obj); + esxVI_ObjectContent_AppendToList(datastore, obj); + + return 0; +} --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628243; cv=none; d=zohomail.com; s=zohoarc; b=SxbryWKbRZsfxZFQmZy/ygoGI2icCukSpBxsrf7Q0UVvC1URgMIkzipYyw6jfKywB3YefmbRa9WCLYh34ZzZmdyhpOszMHiBEn0K1xNjDu2cCploWZg8Sg3Wx+GdKjoP2XGzF7jhNuEnQZPrN+B5FJEyXqqX+ql3ahLWCGFjsbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628243; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=ulW22UllAUbzuXpF9WisbdQWGrDJF9xaEeOX83sAImw=; b=kRvp5RxFOdx7SHFhSBKoWRdIct8AJdcq13f/I56EW75FFOsMn/8gVS16uBJbGKR2TlEDaIa4shaUhRbVF/4wtexQoAnewfAlImFFJzOFHdIf/Uo5/kgryVaXxLbMnDOcjl0/iUv7U1bPlHRvlA9I+/oczjGicm1+O+M8WFc3XLc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763628243404880.4752071647669; Thu, 20 Nov 2025 00:44:03 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id B94E941ABD; Thu, 20 Nov 2025 03:44:02 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id CBFBD4460B; Thu, 20 Nov 2025 03:37:24 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1202541BEB; Thu, 20 Nov 2025 03:33:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3C12041C09 for ; Thu, 20 Nov 2025 03:33:09 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-JOAyXZlPNpuIjrJ06nTOaA-1; Thu, 20 Nov 2025 03:33:07 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BD3AF1956096 for ; Thu, 20 Nov 2025 08:33:06 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2259918004A3 for ; Thu, 20 Nov 2025 08:33:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ulW22UllAUbzuXpF9WisbdQWGrDJF9xaEeOX83sAImw=; b=RWGpxFDkODxEo/NsK168toBLGrRpceOt3GHpGuywUIiEanM32Gng3GrmfRz8codoJMkyNt IXx2FJB0ddq79bWZON/yyOxKEs7Yg8YK/SU0j65qJ1LYeyfpmQM4/XgWrNpWJKrACJZNkM v9bCf4WECgqxjDIhpwYkWvQoALc61bw= X-MC-Unique: JOAyXZlPNpuIjrJ06nTOaA-1 X-Mimecast-MFC-AGG-ID: JOAyXZlPNpuIjrJ06nTOaA_1763627586 To: devel@lists.libvirt.org Subject: [PATCH 7/9] vmx2xmltest: Drop custom file name parse function Date: Thu, 20 Nov 2025 09:32:52 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lOFspa4LT4_vG00vt9AWESp1en3oeHRhup-WhnFqRgU_1763627586 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BNR23RDTYZ4ZKGMP63WVANTN4I4Q6J4V X-Message-ID-Hash: BNR23RDTYZ4ZKGMP63WVANTN4I4Q6J4V X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628244227018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Having a custom file name parsing function in vmx2xml that's different to the one used in production (esxParseVMXFileName()) might have served us well, but it also defeats the point of having a unit test. More specifically, if there's a bug in esxParseVMXFileName() then our unit test would not catch it. But now that we have vmx2xmlmock the custom parsing function can be dropped and the test can use the real one. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- tests/meson.build | 2 +- tests/vmx2xmltest.c | 61 +++++++-------------------------------------- 2 files changed, 10 insertions(+), 53 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 9adf172b7f..cd53e48aa4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -550,7 +550,7 @@ endif =20 if conf.has('WITH_VMX') tests +=3D [ - { 'name': 'vmx2xmltest' }, + { 'name': 'vmx2xmltest', 'include': [ esx_inc_dir ], 'link_with': [ es= x_lib ] }, { 'name': 'xml2vmxtest' }, ] mock_libs +=3D [ diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index bcd95ed87d..cb8e04af0d 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -8,6 +8,8 @@ =20 # include "internal.h" # include "vmx/vmx.h" +# define LIBVIRT_ESX_DRIVERPRIV_H_ALLOW +# include "esx_driverpriv.h" =20 # define VIR_FROM_THIS VIR_FROM_VMWARE =20 @@ -104,60 +106,12 @@ testCompareHelper(const void *data) return ret; } =20 -static int -testParseVMXFileName(const char *fileName, - void *opaque G_GNUC_UNUSED, - char **src, - bool allow_missing) -{ - g_autofree char *copyOfFileName =3D NULL; - char *tmp =3D NULL; - char *saveptr =3D NULL; - char *datastoreName =3D NULL; - char *directoryAndFileName =3D NULL; - - *src =3D NULL; - - if (STRPREFIX(fileName, "/vmfs/volumes/")) { - /* Found absolute path referencing a file inside a datastore */ - copyOfFileName =3D g_strdup(fileName); - - /* Expected format: '/vmfs/volumes//' */ - if ((tmp =3D STRSKIP(copyOfFileName, "/vmfs/volumes/")) =3D=3D NUL= L || - (datastoreName =3D strtok_r(tmp, "/", &saveptr)) =3D=3D NULL || - (directoryAndFileName =3D strtok_r(NULL, "", &saveptr)) =3D=3D= NULL) { - return -1; - } - - if (STREQ(datastoreName, "missing") || - STRPREFIX(directoryAndFileName, "missing")) { - if (allow_missing) - return 0; - - virReportError(VIR_ERR_INTERNAL_ERROR, - "Referenced missing file '%s'", fileName); - return -1; - } - - *src =3D g_strdup_printf("[%s] %s", datastoreName, directoryAndFil= eName); - } else if (STRPREFIX(fileName, "/")) { - /* Found absolute path referencing a file outside a datastore */ - *src =3D g_strdup(fileName); - } else if (strchr(fileName, '/') !=3D NULL) { - /* Found relative path, this is not supported */ - return -1; - } else { - /* Found single file name referencing a file inside a datastore */ - *src =3D g_strdup_printf("[datastore] directory/%s", fileName); - } - - return 0; -} =20 static int mymain(void) { int ret =3D 0; + esxVMX_Data data =3D { 0 }; =20 # define DO_TEST_FULL(file, should_fail) \ do { \ @@ -180,8 +134,10 @@ mymain(void) if (!(xmlopt =3D virVMXDomainXMLConfInit(caps))) return EXIT_FAILURE; =20 - ctx.opaque =3D NULL; - ctx.parseFileName =3D testParseVMXFileName; + data.datastorePathWithoutFileName =3D (char*) "[datastore] directory"; + + ctx.opaque =3D &data; + ctx.parseFileName =3D esxParseVMXFileName; ctx.formatFileName =3D NULL; ctx.autodetectSCSIControllerModel =3D NULL; ctx.datacenterPath =3D NULL; @@ -296,7 +252,8 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, + VIR_TEST_MOCK("vmx2xml")) =20 #else =20 --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628450; cv=none; d=zohomail.com; s=zohoarc; b=KSiakuzB5Zw7B2MAPB1BGei/nr9Y4MbH3DEr9hYhg04XcZ5M5oS/hKe9zJZdpDcddoJJb/pvv/dG+M9bfP7QdBNDrTWdTatQz1Ldti5yEs7QX6LBbm3QZqQQ4xL8mckqMWkQzBkwrHMnL26KXzY5AOuSIxjZkNckrJY3qUmi5jg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628450; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=MCOjAcLPTYsx5qDjd4aKgkTPawhwwOU/oHFU1bf21t0=; b=IqZCgwIpewCTa5o0EcTd6ZlAZmTqa2KZMqB1qolWwuoZVKc2GCaJrh+NTIAZhRywpqZK/uKWitUABpH7WsUeGY54Qu8CsTO80snI04M0knWFaJ3vQZ7rwRf2droXDpsb3wkDk0x2ZrUIH/lWaGApzcg6FVK/XYHRHneVyhzp0kA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763628450123697.4406355665847; Thu, 20 Nov 2025 00:47:30 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7E52B418B7; Thu, 20 Nov 2025 03:47:29 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 3B15644884; Thu, 20 Nov 2025 03:37:34 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 8551041C09; Thu, 20 Nov 2025 03:33:13 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BA22F41C09 for ; Thu, 20 Nov 2025 03:33:11 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-641-y13nu2ehNfKEXZYelLO4BQ-1; Thu, 20 Nov 2025 03:33:08 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C4EF818011EF for ; Thu, 20 Nov 2025 08:33:07 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2B414180049F for ; Thu, 20 Nov 2025 08:33:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MCOjAcLPTYsx5qDjd4aKgkTPawhwwOU/oHFU1bf21t0=; b=erwDt5fr8K/m5b0xF3oSgn6dkcdyGmq09NavcUSJaGSvXzP4wItdVP+pYXy6ZZqWFBmV62 DSa1oVC6gP8y2Fm8LY1pJXFsK3cJynT3ct/0+WO9oAPazmSsiv/v/cXRCasle1IUlkTtds ZixwhowMc/UZwO23UicstEvwfj9pTlU= X-MC-Unique: y13nu2ehNfKEXZYelLO4BQ-1 X-Mimecast-MFC-AGG-ID: y13nu2ehNfKEXZYelLO4BQ_1763627587 To: devel@lists.libvirt.org Subject: [PATCH 8/9] esx: Allow disk images in subdirectories Date: Thu, 20 Nov 2025 09:32:53 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hBr4ajMORw-zT1RD8n5U5bShNF3PDAUIgKAZALE0t6I_1763627587 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4ZMULCUQMRV24KS2W3NJXIOCYNZURX5Z X-Message-ID-Hash: 4ZMULCUQMRV24KS2W3NJXIOCYNZURX5Z X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628450617018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The esxParseVMXFileName() function parses path to a disk image trying to replace some "known" patterns (e.g. datastore paths). A simple filename is treated as a path relative to .vmx file. But disk images (and thus filenames) can be in a subdirectory, relative to the .vmx file. For instance: subfolder/disk.vmdk Adapt our parser to this fact. Resolves: https://issues.redhat.com/browse/RHEL-122751 Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_driver.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 6452a33b7c..9f965811b1 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -72,9 +72,11 @@ esxFreePrivate(esxPrivate **priv) * Parse a file name from a .vmx file and convert it to datastore path for= mat * if possible. A .vmx file can contain file names in various formats: * - * - A single name referencing a file in the same directory as the .vmx fi= le: + * - A single name referencing a file in the same directory as the .vmx fi= le, + * or in a subdirectory: * * test1.vmdk + * subdir/test2.vmdk * * - An absolute file name referencing a file in a datastore that is mount= ed at * /vmfs/volumes/: @@ -106,8 +108,9 @@ esxFreePrivate(esxPrivate **priv) * * Firstly this functions checks if the given file name contains a separat= or. * If it doesn't then the referenced file is in the same directory as the = .vmx - * file. The datastore name and directory of the .vmx file are passed to t= his - * function via the opaque parameter by the caller of virVMXParseConfig. + * file, or in a subdirectory. The datastore name and directory of the .vmx + * file are passed to this function via the opaque parameter by the caller= of + * virVMXParseConfig. * * Otherwise query for all known datastores and their mount directories. T= hen * try to find a datastore with a mount directory that is a prefix to the = given @@ -138,7 +141,7 @@ esxParseVMXFileName(const char *fileName, =20 *out =3D NULL; =20 - if (!strchr(fileName, '/') && !strchr(fileName, '\\')) { + if (*fileName !=3D '/' && !strchr(fileName, '\\')) { /* Plain file name, use same directory as for the .vmx file */ *out =3D g_strdup_printf("%s/%s", data->datastorePathWithoutFileNa= me, fileName); --=20 2.51.0 From nobody Fri Nov 21 09:59:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763628362; cv=none; d=zohomail.com; s=zohoarc; b=dv0xXuQ1BL7vg6o2lmMt7Lj8ZBZHPdNEhXGH5jJGOkpBlGWj037qRnbWNPjIGzCMkc9qw04/fdljhrfLN6Nhum7oLdgXEyXxIjwwmlc/NEKMbsQEoF496cKs60poYQ6Sfh1sHQV5ChSVemr05dN3mh+CmO8BkFysf4+q5vXTLSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763628362; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=zTwkfx+dl9S0Q270palJgPFsn3XJLAzIOI6tPouZhuE=; b=nv/uoJI3tuctqD9O1LOkzrj2EOySxuesY4ywqHiRmknO0dagH8P7/50SmbGvWCsY8k2eyUhBp9OU75P+1MCtEtw5BdKXbRdDYIKvqok2JVCOV3CB6y2UBxLrEQORHKdu9W8ifzb1I+ihy4shfvXt87zC9jDgrPnrusI6HEpGxR0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763628359495921.9761286691667; Thu, 20 Nov 2025 00:45:59 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id C50F444192; Thu, 20 Nov 2025 03:45:58 -0500 (EST) Received: from [172.19.199.53] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 2005A4434B; Thu, 20 Nov 2025 03:37:30 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 09BB844050; Thu, 20 Nov 2025 03:33:12 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8EF8E41BEB for ; Thu, 20 Nov 2025 03:33:11 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-jpPJoniGMtG3h06yHCZmMQ-1; Thu, 20 Nov 2025 03:33:09 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CB5B3195608E for ; Thu, 20 Nov 2025 08:33:08 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 30D341800876 for ; Thu, 20 Nov 2025 08:33:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763627591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zTwkfx+dl9S0Q270palJgPFsn3XJLAzIOI6tPouZhuE=; b=gmMivxEp0Zwt7BiWHoNkHE2YP3LZAK46hgynrEMB7/SCHsNR0ZCa9sss4Ojd11MphChQqO /tS3kkBJCfpKlPLQwgcG5762KyzaBVdO+2y8sMVNZ0QVc20AtnLKv4VqeVrfymbJULsmGC /NAzB4X4n2o9eH1QK5eWBVjnQAo2CBc= X-MC-Unique: jpPJoniGMtG3h06yHCZmMQ-1 X-Mimecast-MFC-AGG-ID: jpPJoniGMtG3h06yHCZmMQ_1763627588 To: devel@lists.libvirt.org Subject: [PATCH 9/9] vmx2xmltest: Add a test case for disks in subfolder Date: Thu, 20 Nov 2025 09:32:54 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: J0SS48eHkCDcPyLxq8IEAeT-JNaWWjPIHkWMO8Y8PpY_1763627588 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WQY22SF62QS56QQ4YLAFFWLOQKMAOTBT X-Message-ID-Hash: WQY22SF62QS56QQ4YLAFFWLOQKMAOTBT X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763628366468018900 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This test case demonstrates correctness of the previous fix. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- tests/vmx2xmldata/esx-in-the-wild-17.vmx | 106 +++++++++++++++++++++++ tests/vmx2xmldata/esx-in-the-wild-17.xml | 46 ++++++++++ tests/vmx2xmltest.c | 1 + 3 files changed, 153 insertions(+) create mode 100644 tests/vmx2xmldata/esx-in-the-wild-17.vmx create mode 100644 tests/vmx2xmldata/esx-in-the-wild-17.xml diff --git a/tests/vmx2xmldata/esx-in-the-wild-17.vmx b/tests/vmx2xmldata/e= sx-in-the-wild-17.vmx new file mode 100644 index 0000000000..ebbf76b449 --- /dev/null +++ b/tests/vmx2xmldata/esx-in-the-wild-17.vmx @@ -0,0 +1,106 @@ +.encoding =3D "UTF-8" +config.version =3D "8" +virtualHW.version =3D "20" +vmci0.present =3D "TRUE" +floppy0.present =3D "FALSE" +svga.vramSize =3D "8388608" +numvcpus =3D "2" +memSize =3D "4096" +tools.upgrade.policy =3D "manual" +sched.cpu.units =3D "mhz" +vm.createDate =3D "1760939758649227" +usb_xhci.present =3D "TRUE" +scsi0.virtualDev =3D "lsisas1068" +scsi0.present =3D "TRUE" +sata0.present =3D "TRUE" +sata0:0.deviceType =3D "cdrom-image" +sata0:0.fileName =3D "/vmfs/volumes/f84f070c-0d65498d/win-iso/windows_11_x= 64_official_dvd.iso" +sata0:0.present =3D "TRUE" +scsi0:0.deviceType =3D "scsi-hardDisk" +scsi0:0.fileName =3D "esx8.0-win11-with-second-disk-in-subfolder.vmdk" +sched.scsi0:0.shares =3D "normal" +sched.scsi0:0.throughputCap =3D "off" +scsi0:0.present =3D "TRUE" +ethernet0.allowGuestConnectionControl =3D "FALSE" +ethernet0.virtualDev =3D "e1000e" +ethernet0.networkName =3D "Mgmt Network" +ethernet0.addressType =3D "vpx" +ethernet0.generatedAddress =3D "00:50:56:a5:b8:68" +ethernet0.present =3D "TRUE" +displayName =3D "esx8.0-win11-with-second-disk-in-subfolder" +guestOS =3D "windows2019srvNext-64" +chipset.motherboardLayout =3D "i440bx" +toolScripts.afterPowerOn =3D "TRUE" +toolScripts.afterResume =3D "TRUE" +toolScripts.beforeSuspend =3D "TRUE" +toolScripts.beforePowerOff =3D "TRUE" +tools.syncTime =3D "FALSE" +tools.guest.desktop.autolock =3D "TRUE" +uuid.bios =3D "42 25 6e c1 e0 66 93 64-3d d1 36 a0 b7 52 63 dd" +vc.uuid =3D "50 25 0f 27 53 8b 50 91-a4 3b a5 0c e9 5f 23 82" +nvram =3D "esx8.0-win11-with-second-disk-in-subfolder.nvram" +svga.present =3D "TRUE" +pciBridge0.present =3D "TRUE" +pciBridge4.present =3D "TRUE" +pciBridge4.virtualDev =3D "pcieRootPort" +pciBridge4.functions =3D "8" +pciBridge5.present =3D "TRUE" +pciBridge5.virtualDev =3D "pcieRootPort" +pciBridge5.functions =3D "8" +pciBridge6.present =3D "TRUE" +pciBridge6.virtualDev =3D "pcieRootPort" +pciBridge6.functions =3D "8" +pciBridge7.present =3D "TRUE" +pciBridge7.virtualDev =3D "pcieRootPort" +pciBridge7.functions =3D "8" +hpet0.present =3D "TRUE" +RemoteDisplay.maxConnections =3D "-1" +sched.cpu.latencySensitivity =3D "normal" +disk.EnableUUID =3D "TRUE" +vmxstats.filename =3D "esx8.0-win11-x86_64-latest.scoreboard" +numa.autosize.cookie =3D "20012" +numa.autosize.vcpu.maxPerVirtualNode =3D "2" +cpuid.coresPerSocket.cookie =3D "2" +vm.genidX =3D "2627911129287880091" +pciBridge0.pciSlotNumber =3D "17" +pciBridge4.pciSlotNumber =3D "21" +pciBridge5.pciSlotNumber =3D "22" +pciBridge6.pciSlotNumber =3D "23" +pciBridge7.pciSlotNumber =3D "24" +scsi0.pciSlotNumber =3D "160" +ethernet0.pciSlotNumber =3D "192" +usb_xhci.pciSlotNumber =3D "224" +sata0.pciSlotNumber =3D "32" +scsi0.sasWWID =3D "50 05 05 61 e0 66 93 60" +vmotion.checkpointFBSize =3D "8388608" +vmotion.checkpointSVGAPrimarySize =3D "8388608" +vmotion.svga.mobMaxSize =3D "8388608" +vmotion.svga.graphicsMemoryKB =3D "8192" +monitor.phys_bits_used =3D "45" +softPowerOff =3D "TRUE" +tools.remindInstall =3D "TRUE" +migrate.hostLog =3D "esx8.0-win11-with-second-disk-in-subfolder-1b240d0d.h= log" +sched.cpu.min =3D "0" +sched.cpu.shares =3D "normal" +sched.mem.min =3D "0" +sched.mem.minSize =3D "0" +sched.mem.shares =3D "normal" +migrate.encryptionMode =3D "opportunistic" +ftcpt.ftEncryptionMode =3D "ftEncryptionOpportunistic" +viv.moid =3D "52300e6b-6a64-4109-b144-f3efe9426650:vm-545:2azK3dLANCIEKysf= Zbstuwb/2iSvArcsaQpXPpR56RY=3D" +sched.swap.derivedName =3D "/vmfs/volumes/124778e2-48604a5f/esx8.0-win11-w= ith-second-disk-in-subfolder/esx8.0-win11-with-second-disk-in-subfolder-547= 4484f.vswp" +uuid.location =3D "56 4d 73 7b a7 00 67 05-e5 0a b7 00 56 d4 1e 54" +vm.genid =3D "3571897048718482545" +scsi0:0.redo =3D "" +scsi0:1.deviceType =3D "scsi-hardDisk" +scsi0:1.fileName =3D "subfolder/esx8.0-win11-with-second-disk-in-subfolder= _1.vmdk" +sched.scsi0:1.shares =3D "normal" +sched.scsi0:1.throughputCap =3D "off" +scsi0:1.present =3D "TRUE" +scsi0:1.redo =3D "" +vmci0.id =3D "-1219337251" +cleanShutdown =3D "TRUE" +usb_xhci:4.present =3D "TRUE" +usb_xhci:4.deviceType =3D "hid" +usb_xhci:4.port =3D "4" +usb_xhci:4.parent =3D "-1" diff --git a/tests/vmx2xmldata/esx-in-the-wild-17.xml b/tests/vmx2xmldata/e= sx-in-the-wild-17.xml new file mode 100644 index 0000000000..ae66de7431 --- /dev/null +++ b/tests/vmx2xmldata/esx-in-the-wild-17.xml @@ -0,0 +1,46 @@ + + esx8.0-win11-with-second-disk-in-subfolder + 42256ec1-e066-9364-3dd1-36a0b75263dd + 3191ed70-eb21-9c71-2478-373fb27fed9b + 4194304 + 4194304 + 2 + + 2000 + + + hvm + + + destroy + restart + destroy + + + + +
+ + + + +
+ + + + + +
+ + + + + + + + + + + diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index cb8e04af0d..fcca765bed 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -223,6 +223,7 @@ mymain(void) DO_TEST("esx-in-the-wild-14"); DO_TEST("esx-in-the-wild-15"); DO_TEST("esx-in-the-wild-16"); + DO_TEST("esx-in-the-wild-17"); =20 DO_TEST("gsx-in-the-wild-1"); DO_TEST("gsx-in-the-wild-2"); --=20 2.51.0