Skip to content

Commit

Permalink
scripts: get_abi.pl: make undefined search more deterministic
Browse files Browse the repository at this point in the history
Sort keys on hashes during undefined search, in order to
make the script more deterministic.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/5dc55fd42e632a24a48f95212aa6c6bc4b2d11fd.1632865873.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
mchehab authored and gregkh committed Sep 29, 2021
1 parent 654e4d5 commit e5c044c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/get_abi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ sub check_undefined_symbols {
my $next_i = 0;
my $start_time = times;

@files = sort @files;

my $last_time = $start_time;

# When either debug or hint is enabled, there's no sense showing
Expand Down Expand Up @@ -909,16 +911,16 @@ sub undefined_symbols {
}
}
# Compile regexes
foreach my $l (keys %leaf) {
foreach my $l (sort keys %leaf) {
my @expr;
foreach my $w(split /\xac/, $leaf{$l}->{what}) {
foreach my $w(sort split /\xac/, $leaf{$l}->{what}) {
push @expr, qr /^$w$/;
}
$leaf{$l}->{expr} = \@expr;
}

# Take links into account
foreach my $link (keys %aliases) {
foreach my $link (sort keys %aliases) {
my $abs_file = $aliases{$link};
graph_add_link($abs_file, $link);
}
Expand Down

0 comments on commit e5c044c

Please sign in to comment.