From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55D49A034F; Thu, 25 Feb 2021 12:15:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B8611607D2; Thu, 25 Feb 2021 12:15:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id F0C3B16077D for ; Thu, 25 Feb 2021 12:15:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614251711; 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; bh=9iCIRQIgm9cKkHLuKUAd2sjn9G93DclckkscVjFVIts=; b=WDfBuTLB8BhxIFnrbhM57quRK/aCg/OHk+gDggjjY/z9+wzkhYYNqzw9fQmkKZQXRsGm6C 15NXEwVj3kiDQNsMAEGZCWRt4hlwSKfJm0hqDuFp0F2p3nPaZmokvTGf4n+wWogXFEtSCH ViMxkh9cDfxet8qpshf3SjeMyQGuDPU= 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-168-w7Gy7Id5O1O7J4y-K1ZcmQ-1; Thu, 25 Feb 2021 06:15:09 -0500 X-MC-Unique: w7Gy7Id5O1O7J4y-K1ZcmQ-1 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 BAC9DBBEE6; Thu, 25 Feb 2021 11:15:08 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 372B719C48; Thu, 25 Feb 2021 11:15:06 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com Date: Thu, 25 Feb 2021 12:14:57 +0100 Message-Id: <20210225111457.32540-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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] devtools: catch symbol duplicates in version map X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Add a check on versioned symbol duplicates in map files. Signed-off-by: David Marchand --- This check could be added to buildtools/check-symbols.sh so that regular developers catch the issue when building their changes... Opinions? --- devtools/check-symbol-maps.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index c3cbcaf720..a430de7f64 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -35,6 +35,21 @@ if [ -n "$orphan_symbols" ] ; then ret=1 fi +find_duplicate_symbols () +{ + for map in $(find lib drivers -name '*.map') ; do + ! buildtools/map-list-symbol.sh $map | \ + sort | uniq -c | grep -v " 1 $map" + done +} + +duplicate_symbols=$(find_duplicate_symbols) +if [ -n "$duplicate_symbols" ] ; then + echo "Found duplicates in symbol map file:" + echo "$duplicate_symbols" + ret=1 +fi + find_orphan_windows_symbols () { for def in $(find lib drivers -name '*_exports.def') ; do -- 2.23.0