From nobody Wed May 14 12:45:52 2025 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525107865844352.64405856440567; Mon, 30 Apr 2018 10:04:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1512330BEA54; Mon, 30 Apr 2018 17:04:24 +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 B719C8089C; Mon, 30 Apr 2018 17:04:23 +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 4C290180005A; Mon, 30 Apr 2018 17:04:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3UGrBP4015823 for ; Mon, 30 Apr 2018 12:53:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3C532166BAE; Mon, 30 Apr 2018 16:53:11 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-197.brq.redhat.com [10.40.204.197]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A91C2166BAD for ; Mon, 30 Apr 2018 16:53:10 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 30 Apr 2018 18:52:59 +0200 Message-Id: <20180430165303.6124-5-abologna@redhat.com> In-Reply-To: <20180430165303.6124-1-abologna@redhat.com> References: <20180430165303.6124-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/8] tests: Stop mocking canonicalize_file_name() 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 30 Apr 2018 17:04:24 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since we've dropped all usages from the library, mocking it has become entirely pointless. Signed-off-by: Andrea Bolognani --- tests/virpcimock.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 9a5e6b4cec..001b320683 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -39,7 +39,6 @@ static int (*real_lstat)(const char *path, struct stat *s= b); static int (*real___lxstat)(int ver, const char *path, struct stat *sb); static int (*real_stat)(const char *path, struct stat *sb); static int (*real___xstat)(int ver, const char *path, struct stat *sb); -static char *(*real_canonicalize_file_name)(const char *path); static int (*real_open)(const char *path, int flags, ...); static int (*real_close)(int fd); static DIR * (*real_opendir)(const char *name); @@ -811,7 +810,6 @@ init_syms(void) VIR_MOCK_REAL_INIT(access); VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); VIR_MOCK_REAL_INIT_ALT(stat, __xstat); - VIR_MOCK_REAL_INIT(canonicalize_file_name); VIR_MOCK_REAL_INIT(open); VIR_MOCK_REAL_INIT(close); VIR_MOCK_REAL_INIT(opendir); @@ -982,25 +980,6 @@ stat(const char *path, struct stat *sb) return ret; } =20 -char * -canonicalize_file_name(const char *path) -{ - char *ret; - - init_syms(); - - if (STRPREFIX(path, SYSFS_PCI_PREFIX)) { - char *newpath; - if (getrealpath(&newpath, path) < 0) - return NULL; - ret =3D real_canonicalize_file_name(newpath); - VIR_FREE(newpath); - } else { - ret =3D real_canonicalize_file_name(path); - } - return ret; -} - int open(const char *path, int flags, ...) { --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list