From nobody Sat Feb 7 08:41:18 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 1714985520972343.44712801334265; Mon, 6 May 2024 01:52:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id CCA621C8A; Mon, 6 May 2024 04:51:59 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AA2061C52; Mon, 6 May 2024 04:43:24 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5F49F1B92; Mon, 6 May 2024 04:43:16 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 E20F71B8D for ; Mon, 6 May 2024 04:43:15 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-581-vj3dzv97NAWZMvqv9ASfWA-1; Mon, 06 May 2024 04:43:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 B404A3C025D7 for ; Mon, 6 May 2024 08:43:13 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F0C240C6CC1 for ; Mon, 6 May 2024 08:43:13 +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: vj3dzv97NAWZMvqv9ASfWA-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 02/13] qemuxml2argvmock: Drop link time dependency on qemuFDPassDirectNew() Date: Mon, 6 May 2024 10:42:59 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 3TUHSAARAJPLKIBGUULP6UMZNOGQX5K2 X-Message-ID-Hash: 3TUHSAARAJPLKIBGUULP6UMZNOGQX5K2 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"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1714985521223100001 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