From: Richard Levitte Date: Thu, 30 Nov 2023 07:48:33 +0000 (+0100) Subject: test/recipes/01-test_symbol_presence.t: Ignore symbols starting with '__' X-Git-Tag: openssl-3.3.0-alpha1~534 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c63b7e861819db439551b52ea5594faec04b65c;p=thirdparty%2Fopenssl.git test/recipes/01-test_symbol_presence.t: Ignore symbols starting with '__' On some platforms, the compiler may add symbols that aren't ours and that we should ignore. They are generally expected to start with a double underscore, and thereby easy to detect. Fixes #22869 (partially) Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22880) --- diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t index 9efa9f8d2d6..66e5669e193 100644 --- a/test/recipes/01-test_symbol_presence.t +++ b/test/recipes/01-test_symbol_presence.t @@ -124,7 +124,13 @@ foreach (sort keys %stlibname) { # Return the result $_ } - grep(m|.* [BCDST] .*|, @$_); + # Drop any symbol starting with a double underscore, they + # are reserved for the compiler / system ABI and are none + # of our business + grep !m|^__|, + # Only look at external definitions + grep m|.* [BCDST] .*|, + @$_ ), } # Massage the mkdef.pl output to only contain global symbols