From nobody Mon Feb 9 04:45:33 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1715092214999420.37397381528; Tue, 7 May 2024 07:30:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D98C318F0; Tue, 7 May 2024 10:30:13 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0BBDB1DF1; Tue, 7 May 2024 10:28:44 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D4C2F16D5; Tue, 7 May 2024 10:28:37 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3F89D17B1 for ; Tue, 7 May 2024 10:28:37 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-312-UHWgVhdzOIuK9L9oPGMADw-1; Tue, 07 May 2024 10:28:35 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 709908027FD for ; Tue, 7 May 2024 14:28:35 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C2DC3C25 for ; Tue, 7 May 2024 14:28:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: UHWgVhdzOIuK9L9oPGMADw-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH v2 02/10] qemuxml2argvmock: Drop link time dependency on qemuFDPassDirectNew() Date: Tue, 7 May 2024 16:28:24 +0200 Message-ID: <1e10882b7e329180eb0e9782c541b5fd788ec9f8.1715091914.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: ZB4444UO5VF3FBL2ARDLCRX3DSU3LAEN X-Message-ID-Hash: ZB4444UO5VF3FBL2ARDLCRX3DSU3LAEN X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1715092215202100001 While Linux linker has no trouble resolving the symbols, valgrind does. It has probably something to do with the fact that we don't tell what symbols to export from mock libraries. Anyway, just resolve the symbol at runtime. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- tests/qemuxml2argvmock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 9cc97199c4..7bcad7284d 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -40,6 +40,8 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 +static qemuFDPassDirect * (*real_qemuFDPassDirectNew)(const char *name, in= t *fd); + long virGetSystemPageSize(void) { return 4096; @@ -212,6 +214,10 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUS= ED, size_t vhostfdSize =3D net->driver.virtio.queues; size_t i; =20 + if (!real_qemuFDPassDirectNew) { + VIR_MOCK_REAL_INIT(qemuFDPassDirectNew); + } + if (!vhostfdSize) vhostfdSize =3D 1; =20 @@ -222,7 +228,7 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUSE= D, g_autofree char *name =3D g_strdup_printf("vhostfd-%s%zu", net->in= fo.alias, i); int fd =3D STDERR_FILENO + 42 + i; =20 - netpriv->vhostfds =3D g_slist_prepend(netpriv->vhostfds, qemuFDPas= sDirectNew(name, &fd)); + netpriv->vhostfds =3D g_slist_prepend(netpriv->vhostfds, real_qemu= FDPassDirectNew(name, &fd)); } =20 netpriv->vhostfds =3D g_slist_reverse(netpriv->vhostfds); --=20 2.43.2 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org