[PATCH] tests: add a test for symbol hiding side effects

David Bremner david at tethera.net
Thu Jun 23 03:24:08 PDT 2011


On Wed, 22 Jun 2011 09:02:36 -0300, david at tethera.net wrote:
> From: David Bremner <bremner at debian.org>
> 
> The worry here is that a binary linking with libnotmuch might lose
> access to Xapian::Error symbols because libnotmuch hides them.

After some helpful feedback from jrollins and amdragon on IRC, I have
pushed an updated version of this. The guts of the updated test are as
follows:

run_test(){
    result=$(LD_LIBRARY_PATH=../../lib ./symbol-test 2>&1)
}

output="A Xapian exception occurred opening database: Couldn't stat 'fakedb/.notmuch/xapian'
caught No chert database found at path \`./nonexistant'"

g++ -o symbol-test -I../../lib ../symbol-test.cc -L../../lib -lnotmuch -lxapian
mkdir -p fakedb/.notmuch
test_expect_success 'running test' run_test
test_begin_subtest 'checking output'
test_expect_equal "$result" "$output" 
test_done


More information about the notmuch mailing list