Skip to content

Commit

Permalink
Fix test/recipes/01-test_symbol_presence.t to disregard version info
Browse files Browse the repository at this point in the history
The output of 'nm -DPg' contains version info attached to the symbols,
which makes the test fail.  Simply dropping the version info makes the
test work again.

Fixes openssl#16810 (followup)

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#16840)
  • Loading branch information
levitte committed Oct 14, 2021
1 parent 19b30f1 commit 73970cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/recipes/01-test_symbol_presence.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ foreach my $libname (@libnames) {
note "Number of lines in \@def_lines before massaging: ", scalar @def_lines;

# Massage the nm output to only contain defined symbols
@nm_lines = sort map { s| .*||; $_ } grep(m|.* [BCDST] .*|, @nm_lines);
@nm_lines =
sort
map {
# Drop the first space and everything following it
s| .*||;
# Drop OpenSSL dynamic version information if there is any
s|\@\@OPENSSL_[0-9._]+[a-z]?$||;
# Return the result
$_
}
grep(m|.* [BCDST] .*|, @nm_lines);

# Massage the mkdef.pl output to only contain global symbols
# The output we got is in Unix .map format, which has a global
Expand Down

0 comments on commit 73970cb

Please sign in to comment.