Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 23FD9429E25 for ; Mon, 28 Nov 2011 23:06:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R4mQuO40YMCC for ; Mon, 28 Nov 2011 23:06:21 -0800 (PST) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 962C7429E21 for ; Mon, 28 Nov 2011 23:06:21 -0800 (PST) Received: from rocinante.cs.unb.ca (m3.kereda.com [207.194.238.3] (may be forged)) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pAT76DH8013456 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 29 Nov 2011 03:06:16 -0400 Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.76) (envelope-from ) id 1RVHXC-0005C8-NN; Mon, 28 Nov 2011 22:51:18 -0800 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test/symbol-hiding: compare exported symbols with existing one Date: Mon, 28 Nov 2011 22:51:16 -0800 Message-Id: <1322549476-17208-3-git-send-email-bremner@debian.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1322549476-17208-1-git-send-email-bremner@debian.org> References: <1309142545-30590-1-git-send-email-david@tethera.net> <1322549476-17208-1-git-send-email-bremner@debian.org> Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 07:06:22 -0000 We assume that any symbol starting with notmuch_ in lib/*.o should be exported, and that only those symbols should be exported. --- test/symbol-hiding | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/test/symbol-hiding b/test/symbol-hiding index 6d4e4ff..68f0d1b 100755 --- a/test/symbol-hiding +++ b/test/symbol-hiding @@ -24,4 +24,10 @@ test_expect_success 'running test' run_test test_begin_subtest 'checking output' test_expect_equal "$result" "$output" + +test_begin_subtest 'comparing existing to exported symbols' +objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL +sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED +test_expect_equal_file EXPORTED ACTUAL + test_done -- 1.7.5.4