From patchwork Wed Jan 20 15:06:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60038 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3228557lbb; Wed, 20 Jan 2016 07:09:01 -0800 (PST) X-Received: by 10.31.160.150 with SMTP id j144mr25496105vke.59.1453302541172; Wed, 20 Jan 2016 07:09:01 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id 11si34579579vkb.169.2016.01.20.07.09.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Jan 2016 07:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0KF6QDU003546; Wed, 20 Jan 2016 10:06:26 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0KF6OLa013960 for ; Wed, 20 Jan 2016 10:06:24 -0500 Received: from colepc.redhat.com (ovpn-113-198.phx2.redhat.com [10.3.113.198]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0KF6OXc002670; Wed, 20 Jan 2016 10:06:24 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 20 Jan 2016 10:06:21 -0500 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] build: predictably generate systemtap tapsets (bz 1173641) X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com The generated output is dependent on perl hashtable ordering, which gives different results for i686 and x86_64. Fix this by sorting the hash keys before iterating over them https://bugzilla.redhat.com/show_bug.cgi?id=1173641 --- src/rpc/gensystemtap.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/rpc/gensystemtap.pl b/src/rpc/gensystemtap.pl index 2467300..7b80fbf 100755 --- a/src/rpc/gensystemtap.pl +++ b/src/rpc/gensystemtap.pl @@ -72,7 +72,7 @@ function libvirt_rpc_auth_name(type, verbose) { EOF my $first = 1; -foreach my $type (keys %auth) { +foreach my $type (sort(keys %auth)) { my $cond = $first ? "if" : "} else if"; $first = 0; print " $cond (type == ", $type, ") {\n"; @@ -95,7 +95,7 @@ function libvirt_rpc_type_name(type, verbose) { EOF $first = 1; -foreach my $type (keys %type) { +foreach my $type (sort(keys %type)) { my $cond = $first ? "if" : "} else if"; $first = 0; print " $cond (type == ", $type, ") {\n"; @@ -118,7 +118,7 @@ function libvirt_rpc_status_name(status, verbose) { EOF $first = 1; -foreach my $status (keys %status) { +foreach my $status (sort(keys %status)) { my $cond = $first ? "if" : "} else if"; $first = 0; print " $cond (status == ", $status, ") {\n"; @@ -141,7 +141,7 @@ function libvirt_rpc_program_name(program, verbose) { EOF $first = 1; -foreach my $prog (keys %funcs) { +foreach my $prog (sort(keys %funcs)) { my $cond = $first ? "if" : "} else if"; $first = 0; print " $cond (program == ", $funcs{$prog}->{id}, ") {\n"; @@ -165,7 +165,7 @@ function libvirt_rpc_procedure_name(program, version, proc, verbose) { EOF $first = 1; -foreach my $prog (keys %funcs) { +foreach my $prog (sort(keys %funcs)) { my $cond = $first ? "if" : "} else if"; $first = 0; print " $cond (program == ", $funcs{$prog}->{id}, " && version == ", $funcs{$prog}->{version}, ") {\n";