From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5DAFDA04DB; Fri, 16 Oct 2020 12:27:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 398751ECA9; Fri, 16 Oct 2020 12:27:30 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 86E331EC9D for ; Fri, 16 Oct 2020 12:27:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602844046; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=2xW51EzdNYWaR0V4RBEetu+Xb1/LR9WBvQhNQCi1H40=; b=NkVpmQU6v6qUwzSMPw6rpqFgFOhKCasylLH+uPi2ciAmqoj5qF4ubWMp8BvFtJ7j0+BldF P0sp51sUkAVc2NZJZ+q2W3E+ztBX4PUWuv1Z/vwnYIhPbyOPc+0/JXkB67+dzoacI68n5D zUDm6mx1ejgSDoS5wsDJNcU0xnxXmt4= 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-242-XIuLj7_UNsOUwLrvSk3Nlg-1; Fri, 16 Oct 2020 06:27:24 -0400 X-MC-Unique: XIuLj7_UNsOUwLrvSk3Nlg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41BDA18A0766; Fri, 16 Oct 2020 10:27:23 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1242A60C15; Fri, 16 Oct 2020 10:27:21 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net Date: Fri, 16 Oct 2020 12:27:11 +0200 Message-Id: <20201016102711.11926-2-david.marchand@redhat.com> In-Reply-To: <20201016102711.11926-1-david.marchand@redhat.com> References: <20201016093806.20061-1-david.marchand@redhat.com> <20201016102711.11926-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v2 2/2] devtools: check Windows export files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Updating export files (supposed to disappear at some point, but still there) might be missed when removing symbols in the API / map files. Add a check for this case. Signed-off-by: David Marchand --- Changelog since v1: - invert logic, as .def files are the exception, - reuse orphan denomination, --- devtools/check-symbol-maps.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 7fdfaa11c4..dae92f77a4 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -7,6 +7,8 @@ cd $(dirname $0)/.. # speed up by ignoring Unicode details export LC_ALL=C +ret=0 + find_orphan_symbols () { for map in $(find lib drivers -name '*.map') ; do @@ -30,5 +32,24 @@ orphan_symbols=$(find_orphan_symbols) if [ -n "$orphan_symbols" ] ; then echo "Found only in symbol map file:" echo "$orphan_symbols" | sed 's,^,\t,' - exit 1 + ret=1 fi + +find_orphan_windows_symbols () +{ + for def in $(find lib drivers -name '*_exports.def') ; do + map=${def/_exports.def}_version.map + for sym in $(grep -v ^EXPORTS $def); do + grep -q $sym $map || echo $sym + done + done +} + +orphan_windows_symbols=$(find_orphan_windows_symbols) +if [ -n "$orphan_windows_symbols" ] ; then + echo "Found only in Windows export file:" + echo "$orphan_windows_symbols" | sed 's,^,\t,' + ret=1 +fi + +exit $ret -- 2.23.0