From patchwork Tue Nov 14 18:59:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Morey-Chaisemartin X-Patchwork-Id: 10058139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 383F2602A7 for ; Tue, 14 Nov 2017 18:59:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C4162621B for ; Tue, 14 Nov 2017 18:59:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2080128EED; Tue, 14 Nov 2017 18:59:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B063C2621B for ; Tue, 14 Nov 2017 18:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbdKNS7h (ORCPT ); Tue, 14 Nov 2017 13:59:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:39653 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbdKNS7h (ORCPT ); Tue, 14 Nov 2017 13:59:37 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5B396AB02 for ; Tue, 14 Nov 2017 18:59:36 +0000 (UTC) From: Nicolas Morey-Chaisemartin Subject: [PATCH rdma-core 3/5] buildlib: add script to check ABI To: linux-rdma@vger.kernel.org References: <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8@suse.de> Openpgp: preference=signencrypt Message-ID: Date: Tue, 14 Nov 2017 19:59:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0 MIME-Version: 1.0 In-Reply-To: <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8@suse.de> Content-Language: fr-xx-classique+reforme1990 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add travis-checkabi which generates a dump of all rdma-core libraries ABI and checks them against a ref if they exists. Signed-off-by: Nicolas Morey-Chaisemartin Cc: stable@linux-rdma.org # v15 --- buildlib/travis-checkabi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 buildlib/travis-checkabi diff --git a/buildlib/travis-checkabi b/buildlib/travis-checkabi new file mode 100755 index 00000000..7afa3b59 --- /dev/null +++ b/buildlib/travis-checkabi @@ -0,0 +1,28 @@ +#!/bin/bash + +# Stop on error +set -e +# Echo all commands to Travis log +set -x + +REF_DIR=buildlib/ABI +NEW_DIR=build-abi/ABI + +./buildlib/gen-abi + +# Current ABI not available ! +if [ ! -d $NEW_DIR ]; then + echo "ERROR: Missing ABI description files" >&2 + exit 1 +fi +# No reference ABI to match against. +if [ ! -d $REF_DIR ]; then + echo "INFO: Skipping ABI check. No reference available" + exit 0 +fi + +for FILE in $(find $NEW_DIR -name "*.dump"); do + DUMP=$(basename $FILE) + LIBNAME=$(echo $DUMP | sed -e 's/\(.*\).so.*/\1/') + ./buildlib/abi-checker/abi-compliance-checker.pl -l $LIBNAME -old $REF_DIR/$DUMP -new $NEW_DIR/$DUMP +done