linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] scripts: get_abi.pl: make undefined search more deterministic
Date: Tue, 28 Sep 2021 23:51:32 +0200	[thread overview]
Message-ID: <5dc55fd42e632a24a48f95212aa6c6bc4b2d11fd.1632865873.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <YVNOZ3GKcpRxPXzv@kroah.com>

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>
---
 scripts/get_abi.pl | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 841d889747c0..d32dcd7cca5d 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -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
@@ -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);
 	}
-- 
2.31.1


  reply	other threads:[~2021-09-28 21:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 10:14 [PATCH 0/3] get_abi: improve message output and fix a regression Mauro Carvalho Chehab
2021-09-28 10:14 ` [PATCH 1/3] scripts: get_abi.pl: use STDERR for search-string and show-hints Mauro Carvalho Chehab
2021-09-28 10:14 ` [PATCH 2/3] scripts: get_abi.pl: show progress Mauro Carvalho Chehab
2021-09-28 10:14 ` [PATCH 3/3] ABI: evm: place a second what at the next line Mauro Carvalho Chehab
2021-09-28 11:04 ` [PATCH 0/3] get_abi: improve message output and fix a regression Greg Kroah-Hartman
2021-09-28 12:27   ` Mauro Carvalho Chehab
2021-09-28 13:43     ` Mauro Carvalho Chehab
2021-09-28 17:19       ` Greg Kroah-Hartman
2021-09-28 17:18     ` Greg Kroah-Hartman
2021-09-28 21:51       ` Mauro Carvalho Chehab [this message]
2021-09-29  7:13         ` [PATCH] scripts: get_abi.pl: make undefined search more deterministic Greg Kroah-Hartman
2021-09-28 21:54       ` [PATCH 0/3] get_abi: improve message output and fix a regression Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5dc55fd42e632a24a48f95212aa6c6bc4b2d11fd.1632865873.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).