]> git.cworth.org Git - notmuch/commitdiff
test/T360-symbol-hiding.sh: trim extra output from readelf
authorDavid Bremner <david@tethera.net>
Tue, 15 Dec 2020 20:45:09 +0000 (16:45 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 25 Dec 2020 15:36:33 +0000 (11:36 -0400)
readelf on (at least) ppc64le sometimes generates some extension to
the Ndx name inside '[]'. Remove this output to allow our simple
column based parsing to work.

test/T360-symbol-hiding.sh

index 3f00dd383b87f664fe1abac8eb632b88485deb9a..729b9d720a2c9e53d853e9c6b3436a352367a2cc 100755 (executable)
@@ -26,7 +26,7 @@ test_begin_subtest 'checking output'
 test_expect_equal "$result" "$output"
 
 test_begin_subtest 'comparing existing to exported symbols'
-readelf -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | \
+readelf -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e 's/\[[^]]*\]//' |\
     awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $8}' | sort -u > ACTUAL
 sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p' $NOTMUCH_SRCDIR/lib/notmuch.h | sort -u > EXPORTED
 test_expect_equal_file EXPORTED ACTUAL