From nobody Mon Feb 9 21:21:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com ARC-Seal: i=1; a=rsa-sha256; t=1566404058; cv=none; d=zoho.com; s=zohoarc; b=AVBH5Aauyn6IH7WeUaC8mkKpI3ANA2akhdZRw2pEeehFZfrPPubx6qIs4dhLiCp+2v9L0gBA4Lp8wsGfxxSwJZpQS7TIbeNgZvwLzZHBuayE6p8otrxrSvOxySDoSAq8ISNqnCKbMl3Q6yc45wtsnMrAjqpMdRAY5mA+8/L2Jew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566404058; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ymhnymu3NRRYJHGvYIaemw1OjLkIdBWgZDZUXwsyYCQ=; b=Vd9fIqmCHm8R0kseafPMIxmGmIbQKLO4TOi4D7OXJ5JPGc6vdbpIXOIqxwZrduY0RNGUT0hP/1buoR7A8ZsYsPSVuBrYzPF6gUgoTdg9DFamT1QJqfVG+74u1l9frEkZewDn/aOH9kiTiSlA5MykU6LWW4yJpkb7YujpEcQnzH4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566404058041305.5416526526908; Wed, 21 Aug 2019 09:14:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA713970DA; Wed, 21 Aug 2019 16:14:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E4ED1001B09; Wed, 21 Aug 2019 16:14:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4916C24FDF; Wed, 21 Aug 2019 16:14:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7LGEAl7016869 for ; Wed, 21 Aug 2019 12:14:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id EAF2A79B3; Wed, 21 Aug 2019 16:14:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E651E799C for ; Wed, 21 Aug 2019 16:14:10 +0000 (UTC) Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC6B1307D9CF for ; Wed, 21 Aug 2019 16:14:01 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id A0DE042ED2 for ; Wed, 21 Aug 2019 16:13:56 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kXAAG2_DDkeA for ; Wed, 21 Aug 2019 19:13:55 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id CC34542ED9 for ; Wed, 21 Aug 2019 19:13:54 +0300 (MSK) Received: from localhost (172.17.128.60) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Wed, 21 Aug 2019 19:13:54 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1566404035; x=1568218436; bh=rYxAoq7H47nOi1nrQwnzhtoVP977IuBHTJ3 7D1xXWTY=; b=EZJCsEW3PMezqc7WG1cOdhk8NfYLV6piZ05j8MyuB1u9aLexAFg b4aTEf09kM1m8DgOCr8cbRmled9oSxmGdopgyLMvEJcTP8mZNFZLXohCIFjBuVXS xDET1X7K9ElOyaDWCF9q3ldedYFn1abS+rnX1CYjuqKAb+UELntwrUOI= X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Date: Wed, 21 Aug 2019 19:13:22 +0300 Message-ID: <20190821161323.1583-11-r.bolshakov@yadro.com> In-Reply-To: <20190821161323.1583-1-r.bolshakov@yadro.com> References: <20190821161323.1583-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.128.60] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) X-Greylist: Sender passed SPF test, ACL 264 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 21 Aug 2019 16:14:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 21 Aug 2019 16:14:02 +0000 (UTC) for IP:'89.207.88.252' DOMAIN:'mta-02.yadro.com' HELO:'mta-01.yadro.com' FROM:'r.bolshakov@yadro.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS) 89.207.88.252 mta-02.yadro.com 89.207.88.252 mta-02.yadro.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Roman Bolshakov Subject: [libvirt] [PATCH 10/11] tests: Avoid gnulib replacements in mocks X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Aug 2019 16:14:17 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" gnulib headers change stat, lstat and open to replacement functions, even for function definitions. This effectively disables standard library overrides in virfilewrapper and virmockstathelpers since they are never reached. Rename the functions and provide a declartion that uses correct assembler name for the mocks. This fixes firmware lookup in domaincapstest on macOS. Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrang=C3=A9 --- tests/virfilewrapper.c | 5 +++++ tests/virmockstathelpers.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index 067cb30657..20cb2f4464 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -157,7 +157,12 @@ int access(const char *path, int mode) return real_access(newpath ? newpath : path, mode); } =20 +#ifdef __APPLE__ +int _open(const char *path, int flags, ...) __asm("_open"); +int _open(const char *path, int flags, ...) +#else int open(const char *path, int flags, ...) +#endif { VIR_AUTOFREE(char *) newpath =3D NULL; va_list ap; diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c index 1f6f831bed..4ddb0dfec1 100644 --- a/tests/virmockstathelpers.c +++ b/tests/virmockstathelpers.c @@ -192,7 +192,12 @@ static int virMockStatRedirect(const char *path, char = **newpath); #endif =20 #ifdef MOCK_STAT +# ifdef __APPLE__ +int _stat(const char *path, struct stat *sb) __asm("_stat$INODE64"); +int _stat(const char *path, struct stat *sb) +# else int stat(const char *path, struct stat *sb) +# endif { VIR_AUTOFREE(char *) newpath =3D NULL; =20 @@ -262,8 +267,13 @@ __xstat64(int ver, const char *path, struct stat64 *sb) #endif =20 #ifdef MOCK_LSTAT +# ifdef __APPLE__ +int _lstat(const char *path, struct stat *sb) __asm("_lstat$INODE64"); +int _lstat(const char *path, struct stat *sb) +# else int lstat(const char *path, struct stat *sb) +# endif { VIR_AUTOFREE(char *) newpath =3D NULL; =20 --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list