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 C32B3A04DB; Fri, 16 Oct 2020 11:39:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25E561EC2D; Fri, 16 Oct 2020 11:39:01 +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 D10DC1EC2D for ; Fri, 16 Oct 2020 11:38:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602841137; 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=055+WqZssmuwhIcdubRC94TM6Phcmxm/CfP+QFThkcQ=; b=eHNI8WTqqdn7eU9DAC2jfp2OIX/uAhpxzP6oz57ic8tjXah+3fkTh0hGqmyRthEEP3P66X 3VFujj4ynGpmE2APPjv/boBcWpHwA4yVn5ijLnV5hOqySJl7oyvtHtUkmPRTQe1h2Dnqd9 vHO+lrqj07kj/q7XlHsP1fYz0dbA4F8= 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-320-HOxrV3zIPaO-lTEVz0xVHw-1; Fri, 16 Oct 2020 05:38:53 -0400 X-MC-Unique: HOxrV3zIPaO-lTEVz0xVHw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74A9A879516; Fri, 16 Oct 2020 09:38:52 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53C006EF58; Fri, 16 Oct 2020 09:38:51 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net Date: Fri, 16 Oct 2020 11:38:06 +0200 Message-Id: <20201016093806.20061-2-david.marchand@redhat.com> In-Reply-To: <20201016093806.20061-1-david.marchand@redhat.com> References: <20201016093806.20061-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 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 --- devtools/check-symbol-maps.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 7fdfaa11c4..4a77fde12b 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,25 @@ 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 + +validate_windows_exports () +{ + for map in $(find lib drivers -name '*.map') ; do + def=${map/_version.map}_exports.def + [ -e $def ] || continue + for sym in $(grep -v ^EXPORTS $def); do + grep -q $sym $map || echo $sym + done + done +} + +unknown_windows_symbols=$(validate_windows_exports) +if [ -n "$unknown_windows_symbols" ] ; then + echo "Found only in Windows export file:" + echo "$unknown_windows_symbols" | sed 's,^,\t,' + ret=1 fi + +exit $ret -- 2.23.0