From nobody Thu May 2 15:35:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612435729; cv=none; d=zohomail.com; s=zohoarc; b=Nlun6FhhuzXaoLjCH9uMLGDCDeCT/4LUura5LHSF93KJEAIB+1b5Yq6F/FI3ADnRoBD8R4db6NJSScrmffjXlyR8BtMSFzvt9M4gjwyIRO7Meq2F0sFDkMi+Tpl3wWH9MAfGKKwwnmpA05aPlubWDjfB0xnDD7GaN5YQCwVDAhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612435729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Hs5lijXKKNwQJklgeRhmMNuxwSjWQV2Qs8IRjhTppOQ=; b=YF6jAj8QggJtXUTrt8sl8wC6/5tNMSuaSoYoLQGGqLearBL7WQZryTvNrITvpodzVsMtLUs9srFDIpwrcn1MfZhEcMUGEXc12zwh4i+7JJpKqwclbq10DqPCkfaVoJwtKS1RsaHHa1l+IxTzfKC4vfKqyR7Vxx+9NBJCwlBkzn8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612435729454152.91419927189304; Thu, 4 Feb 2021 02:48:49 -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-600-gAEFBXamOF-HFixFnQ_GHg-1; Thu, 04 Feb 2021 05:48:46 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74B2F100A62A; Thu, 4 Feb 2021 10:48:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE9CEE166; Thu, 4 Feb 2021 10:48:38 +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 E686118095CB; Thu, 4 Feb 2021 10:48:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 114AmXPk002400 for ; Thu, 4 Feb 2021 05:48:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 78431722CF; Thu, 4 Feb 2021 10:48:33 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76F08722E7; Thu, 4 Feb 2021 10:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612435728; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Hs5lijXKKNwQJklgeRhmMNuxwSjWQV2Qs8IRjhTppOQ=; b=OV5Q4flsYran8S6ECYQiiaX5yLZeiMMBWurfQ125jSydMVF+Z2pAqUhgSMGOTuoe+kC+ac aC38NAnMbjzwsFFhyx99cLZkrLzKMzF61WOSMHbdP/MDXf0c8rLi1emXh/dZ6hUTnUNMOD Z8ZAKW0jEYCVBctOB/I9rQQB2Ie24oA= X-MC-Unique: gAEFBXamOF-HFixFnQ_GHg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] Revert "tests: Avoid gnulib replacements in mocks" Date: Thu, 4 Feb 2021 11:48:26 +0100 Message-Id: <20210204104826.164078-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: r.bolshakov@yadro.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.84 on 10.5.11.23 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" Now that we're no longer using gnulib, we can treat macOS the same as all other targets. This reverts commit 0ae6f5cea54d95c0d1dedf04a0a2accfe2529fb2 Signed-off-by: Andrea Bolognani --- Roman, this seems to work fine both locally and on Cirrus CI[1], but I'd like to have your thumbs up before pushing. Thanks! [1] https://gitlab.com/abologna/libvirt/-/jobs/1007362310 tests/virfilewrapper.c | 5 ----- tests/virmockstathelpers.c | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index ca2356b5c9..7034e22420 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -163,12 +163,7 @@ 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 { g_autofree char *newpath =3D NULL; va_list ap; diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c index 3bd2437ffe..49485cd360 100644 --- a/tests/virmockstathelpers.c +++ b/tests/virmockstathelpers.c @@ -204,12 +204,7 @@ 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 { g_autofree char *newpath =3D NULL; =20 @@ -279,13 +274,8 @@ __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 { g_autofree char *newpath =3D NULL; =20 --=20 2.26.2