From nobody Mon Apr 29 04:14:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612520897; cv=none; d=zohomail.com; s=zohoarc; b=C3VcQn/ggBJWSQNfOcfl/i1v+pKZDxjfdh+2p8W/NAcKAD9FWIxp88w7GevT2i4vWqWiHmQ45NaIlVg99GFChtjOu4U21Z3S+58uCRgXcG5zR9mMbMg9IIEoRahzNK5h0TmgAmyF0YNA0tVMxDMjbqm7R3VrV+cI0kp7OiehZro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612520897; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=0mrD4zdusktZC3DC4xzcsdxuz2zXlk23bSUpUidFKno=; b=WJohrQdyr4+ngCZj2RIsX4BoEYjQelKwdp7K55DY/QDL0vuCU3AtqQSJWNgd9Obs0i9r2dKhy7rm1FSyZkYXHdeIHA9pOxEj/UI3spSCFDnGgsDId6S7zrLKCTCoOrHtcYuVR507Ly+Q3X/JzwNP19HErQGzpXwstUl++zl1N74= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612520897151339.330618517105; Fri, 5 Feb 2021 02:28:17 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-dMBfJyyEO5OicYjtFvSfJA-1; Fri, 05 Feb 2021 05:28:13 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30F3F804023; Fri, 5 Feb 2021 10:28:08 +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 0677F722F3; Fri, 5 Feb 2021 10:28:08 +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 C125C4E58D; Fri, 5 Feb 2021 10:28:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 115AS6HQ020476 for ; Fri, 5 Feb 2021 05:28:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id BD7875D9CC; Fri, 5 Feb 2021 10:28:06 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8BDF5D9D2 for ; Fri, 5 Feb 2021 10:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612520896; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0mrD4zdusktZC3DC4xzcsdxuz2zXlk23bSUpUidFKno=; b=LVBqFaBTADncwfkxd97QV2Lr0xt37Tnzo9PDWe8dCFczThZF5S8l4grnbGqQxjqWjEoWGj ZjOw7jfr/s/NUVxTk60FLNPj/ZYNwcWzlxEsZ3uZrWerHcCyf53KybjsOobwUeJ0G/wg5X br2q7J/MwR5TCNt0gGv1c5TbxF3OO1w= X-MC-Unique: dMBfJyyEO5OicYjtFvSfJA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] tests: Only mock $INODE64 symbols on x86_64 macOS Date: Fri, 5 Feb 2021 11:27:56 +0100 Message-Id: <20210205102756.335901-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The version of macOS running on Apple Silicon doesn't need to concern itself with backwards compatibility with 32-bit applications, and so it could jettison all the symbol aliasing shenanigans involved. https://gitlab.com/libvirt/libvirt/-/issues/121 Signed-off-by: Andrea Bolognani Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- tests/virfilewrapper.c | 2 +- tests/virmockstathelpers.c | 4 ++-- tests/virpcimock.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index ca2356b5c9..1369cfb766 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -56,7 +56,7 @@ static void init_syms(void) VIR_MOCK_REAL_INIT(access); VIR_MOCK_REAL_INIT(mkdir); VIR_MOCK_REAL_INIT(open); -# ifdef __APPLE__ +# if defined(__APPLE__) && defined(__x86_64__) VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64"); # else VIR_MOCK_REAL_INIT(opendir); diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c index 830dfe1085..9344345baa 100644 --- a/tests/virmockstathelpers.c +++ b/tests/virmockstathelpers.c @@ -161,7 +161,7 @@ static void virMockStatInit(void) debug =3D getenv("VIR_MOCK_STAT_DEBUG"); =20 #ifdef MOCK_STAT -# ifdef __APPLE__ +# if defined(__APPLE__) && defined(__x86_64__) VIR_MOCK_REAL_INIT_ALIASED(stat, "stat$INODE64"); # else VIR_MOCK_REAL_INIT(stat); @@ -181,7 +181,7 @@ static void virMockStatInit(void) fdebug("real __xstat64 %p\n", real___xstat64); #endif #ifdef MOCK_LSTAT -# ifdef __APPLE__ +# if defined(__APPLE__) && defined(__x86_64__) VIR_MOCK_REAL_INIT_ALIASED(lstat, "lstat$INODE64"); # else VIR_MOCK_REAL_INIT(lstat); diff --git a/tests/virpcimock.c b/tests/virpcimock.c index f6280fc8b5..d1c6220c57 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -936,7 +936,7 @@ init_syms(void) VIR_MOCK_REAL_INIT(__open_2); # endif /* ! __GLIBC__ */ VIR_MOCK_REAL_INIT(close); -# ifdef __APPLE__ +# if defined(__APPLE__) && defined(__x86_64__) VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64"); # else VIR_MOCK_REAL_INIT(opendir); --=20 2.26.2