summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2023-11-30 09:02:25 +0100
committerRichard Levitte <levitte@openssl.org>2023-12-04 09:59:16 +0100
commitcc493c03045105ba8f339d1b914a9ae7b36d4301 (patch)
treebb74b7bd8ce871daed5d7931990d2144025dc5a3 /test
parent44288415caad757cd27ed32acfa57014e305defa (diff)
test/recipes/01-test_symbol_presence.t: Treat common symbols specially
Common symbols (type 'C' in the 'nm' output) are allowed to be defined more than once. This makes test/recipes/01-test_symbol_presence.t reflect that. Fixes #22869 (partially) Fixes #22837 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22880) (cherry picked from commit 4ff5137ff5fb896e0273d274110517e3c7adb8cf)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/01-test_symbol_presence.t41
1 files changed, 26 insertions, 15 deletions
diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
index 66e5669e19..222b1886ae 100644
--- a/test/recipes/01-test_symbol_presence.t
+++ b/test/recipes/01-test_symbol_presence.t
@@ -114,23 +114,34 @@ foreach (sort keys %stlibname) {
my @arrays = ( \@stlib_lines );
push @arrays, \@shlib_lines unless disabled('shared');
foreach (@arrays) {
+ my %commons;
+ foreach (@$_) {
+ if (m|^(.*) C .*|) {
+ $commons{$1}++;
+ }
+ }
+ foreach (sort keys %commons) {
+ note "Common symbol: $_";
+ }
+
@$_ =
sort
- map {
- # Drop the first space and everything following it
- s| .*||;
- # Drop OpenSSL dynamic version information if there is any
- s|\@\@.+$||;
- # Return the result
- $_
- }
- # 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] .*|,
- @$_ ),
+ ( map {
+ # Drop the first space and everything following it
+ s| .*||;
+ # Drop OpenSSL dynamic version information if there is any
+ s|\@\@.+$||;
+ # Return the result
+ $_
+ }
+ # 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|.* [BDST] .*|,
+ @$_ ),
+ keys %commons;
}
# Massage the mkdef.pl output to only contain global symbols