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 1BA75A00C4; Mon, 14 Nov 2022 15:17:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 012D540150; Mon, 14 Nov 2022 15:17:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 21EAA4014F for ; Mon, 14 Nov 2022 15:17:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668435432; 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=Hj4ItZbBM86Xs9xSvBHVLSUe9pRWgIC/Bc9DyuW7Y+s=; b=cPGgKEO/H0IVEvCsa6kW4anbuM+p7rRjixyvB1ZgepFNCZfPEHMzTgDHXA/4wlw63dIos5 vsR6JV8+gagFiFuKbChtwcERwbeT+QYDQCC/MW/PiaUL/zXLf+yjYtauJZZwMxo6oVMCbB +QNaY1a/iR554GUEoIpu5x+yF7h4uKQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-316-TVceoLx9MDq12qzi9xSX8g-1; Mon, 14 Nov 2022 09:17:09 -0500 X-MC-Unique: TVceoLx9MDq12qzi9xSX8g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2AA20185A794; Mon, 14 Nov 2022 14:17:09 +0000 (UTC) Received: from localhost.localdomain (ovpn-192-54.brq.redhat.com [10.40.192.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0628492B16; Mon, 14 Nov 2022 14:17:07 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: omer.yamac@ceng.metu.edu.tr, Thomas Monjalon Subject: [PATCH] devtools: catch empty symbol maps Date: Mon, 14 Nov 2022 15:16:51 +0100 Message-Id: <20221114141651.1255306-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 version.map are now optional for drivers if no symbol is exported. Having no symbol exported from a library does not make sense. Catch all empty maps and warn about them. Example: $ ./devtools/check-symbol-maps.sh Found empty maps: drivers/crypto/uadk/version.map drivers/net/gve/version.map drivers/net/idpf/version.map Signed-off-by: David Marchand --- devtools/check-symbol-maps.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 32e1fa5c8f..0a6062de26 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -60,4 +60,18 @@ if [ -n "$local_miss_maps" ] ; then ret=1 fi +find_empty_maps () +{ + for map in $@ ; do + [ $(buildtools/map-list-symbol.sh $map | wc -l) != '0' ] || echo $map + done +} + +empty_maps=$(find_empty_maps $@) +if [ -n "$empty_maps" ] ; then + echo "Found empty maps:" + echo "$empty_maps" + ret=1 +fi + exit $ret -- 2.38.1