test/T360-symbol-hiding.sh: trim extra output from readelf

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.
This commit is contained in:
David Bremner 2020-12-15 16:45:09 -04:00
parent f01f6405c9
commit 6d5d28c593

View file

@ -26,7 +26,7 @@ test_begin_subtest 'checking output'
test_expect_equal "$result" "$output" test_expect_equal "$result" "$output"
test_begin_subtest 'comparing existing to exported symbols' 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 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 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 test_expect_equal_file EXPORTED ACTUAL