From: Tomi Ollila Date: Wed, 10 Sep 2014 10:04:00 +0000 (+0300) Subject: Re: [PATCH] test: simplify T360-symbol-hiding, use nm instead of objdump X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=565ac208450e03c098b0d7f5c47db9e187a82208;p=notmuch-archives.git Re: [PATCH] test: simplify T360-symbol-hiding, use nm instead of objdump --- diff --git a/ae/20910a455938dcb9b774ea3ae5f327e3d3330b b/ae/20910a455938dcb9b774ea3ae5f327e3d3330b new file mode 100644 index 000000000..62e15c5c5 --- /dev/null +++ b/ae/20910a455938dcb9b774ea3ae5f327e3d3330b @@ -0,0 +1,94 @@ +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 149C0431FBD + for ; Wed, 10 Sep 2014 03:04:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 TKYDjAmPxaKE for ; + Wed, 10 Sep 2014 03:04:14 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8D97D431FBC + for ; Wed, 10 Sep 2014 03:04:14 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 2D77610008C; + Wed, 10 Sep 2014 13:04:01 +0300 (EEST) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH] test: simplify T360-symbol-hiding, + use nm instead of objdump +In-Reply-To: <1410331271-1403-1-git-send-email-david@tethera.net> +References: <1410331271-1403-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.18.1+93~gaa65b5d (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +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: Wed, 10 Sep 2014 10:04:22 -0000 + +On Wed, Sep 10 2014, David Bremner wrote: + +> After yet another variation in objdump output caused this test to fail +> (on a Debian port, no less), I decided whatever putative benefit we +> get from looking at the object files instead of the library isn't +> worth the maintenence headache. +> +> This version uses nm -P. nm -P should be portable, and fixed format. +> It purposely doesn't use the -D argument, since that is non-POSIX and +> nm on GNU/Linux seems do the right thing without it. +> +> It still won't work out of the box on e.g. Mac OS/X. I think the right +> thing to do there is to move some more configuration information into +> sh.config. + +LGTM. + +Tomi + +> --- +> test/T360-symbol-hiding.sh | 2 +- +> 1 file changed, 1 insertion(+), 1 deletion(-) +> +> diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh +> index 636ec91..8fc4bdf 100755 +> --- a/test/T360-symbol-hiding.sh +> +++ b/test/T360-symbol-hiding.sh +> @@ -26,7 +26,7 @@ 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 +> +nm -P $TEST_DIRECTORY/../lib/libnotmuch.so | awk '$2 == "T" && $1 ~ "^notmuch" {print $1}' | sort | uniq > ACTUAL +> sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED +> test_expect_equal_file EXPORTED ACTUAL +> +> -- +> 2.1.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch