From nobody Mon Feb 9 23:03:57 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556707809; cv=none; d=zoho.com; s=zohoarc; b=Yqe1ee4FLByVBHqyefbnl78uFB2izec3jNxAFf2QbwtRUbR0U6gbK5ejX/XN8LEwjwvAx2QXFX5GGL5YPXyd7oLYWWt+S40b7NI2CFhc2oTzhPdxWKFh/0jzLEyz2o4cctwrrCJ7jRcoSVgr6ti5G7yv2CDnKmNs5cd9vPbWQck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556707809; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LMT/YdGRaNu6/bfzTUNNBz40E/bIIguR/LL3zfwygJ8=; b=gfZmehkp/esPmBBTfFC0tGlaGr54pVcLbt+rLY+sxACW34zoMA35fQU3tOUPb6lWnJeauBMVzcUQhqaD6gO/Q731LMC49Se5alvuVbMHX2zeNepUYaHXPlQ47m1ldoZHZHC0QptZxYjfl3aWfiaAkXho5ZYuYv6++3ASBC66uZA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155670780920879.21349932924409; Wed, 1 May 2019 03:50:09 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLmnG-0005YE-93; Wed, 01 May 2019 10:48:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLmnE-0005WT-GA for xen-devel@lists.xenproject.org; Wed, 01 May 2019 10:48:52 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b2ea397e-6bfe-11e9-bf70-4f86bc047861; Wed, 01 May 2019 10:48:48 +0000 (UTC) X-Inumbo-ID: b2ea397e-6bfe-11e9-bf70-4f86bc047861 X-IronPort-AV: E=Sophos;i="5.60,417,1549929600"; d="scan'208";a="84837302" From: Ian Jackson To: Date: Wed, 1 May 2019 11:48:31 +0100 Message-ID: <20190501104839.21621-8-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190501104839.21621-1-ian.jackson@eu.citrix.com> References: <20190501104839.21621-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH v2 07/15] arch replumbing: Replace many $r{arch} with $[g]ho->{Arch} X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" No functional change with existing flights. But the effect is that now, generally, ts-* scripts and the support code will honour host_arch, if it is set, in preference to arch. This patch contains only replacements of $r{arch} with $ho->{Arch} or $gho->{Arch}. In fact, perhaps surprisingly, there were no locations where $gho was wanted rather than $ho (I have double checked this). Exceptions, where we left $r{arch} alone, are: * make-flight: a comment, which we are about to deal with; * ts-kernel-build: we are going to support cross building and $r{arch} is going to be the architecture of the kernel we want rather than of the build host. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 14 +++++++------- Osstest/TestSupport.pm | 4 ++-- ts-freebsd-build | 2 +- ts-host-install | 6 +++--- ts-memdisk-try-append | 2 +- ts-xen-build-prep | 4 ++-- ts-xen-install | 8 ++++---- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 8abd6aed..911d8905 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -444,7 +444,7 @@ sub setupboot_grub2 ($$$$) { # Grub2 on jessie/stretch ARM* doesn't do multiboot, so we must chainl= oad. my $need_uefi_chainload =3D get_host_property($ho, "firmware", "") eq "uefi" && - $ho->{Suite} =3D~ m/jessie|stretch/ && $r{arch} =3D~ m/^arm/; + $ho->{Suite} =3D~ m/jessie|stretch/ && $ho->{Arch} =3D~ m/^arm/; =20 my $parsemenu=3D sub { my $f=3D bl_getmenu_open($ho, $rmenu, "$stash/$ho->{Name}--grub.cf= g.1"); @@ -749,7 +749,7 @@ END sub preseed_microcode($$) { my ($ho,$sfx) =3D @_; - my $prop =3D "MicrocodeUpdate".ucfirst($r{arch}); + my $prop =3D "MicrocodeUpdate".ucfirst($ho->{Arch}); return unless $c{$prop}; logm("ucode=3D$prop $c{$prop}"); my $ucode =3D get_filecontents("$c{Images}/$c{$prop}"); @@ -1134,7 +1134,7 @@ sub di_installer_path ($) { # useable for constructing host paths as well as guest paths my ($ho) =3D @_; =20 - return $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'. + return $ho->{Tftp}{DiBase}.'/'.$ho->{Arch}.'/'. ($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite})) .'-'.$ho->{Suite}; } @@ -1340,8 +1340,8 @@ END # Userland_setarch personality to restore using setarch my $kern_arch =3D $kern_arch_info->{Kernel_Debian}; if ($kern_arch && - $ho->{Flags}{"arch-$r{arch}"} && !$ho->{Flags}{"arch-$kern_arch"}) { - # We check the flag for $r{arch} because for various reasons + $ho->{Flags}{"arch-$ho->{Arch}"} && !$ho->{Flags}{"arch-$kern_arch"}) { + # We check the flag for $ho->{Arch} because for various reasons # it may not be set. For example, in standalone mode it is # currently not normally necessary to set any arch hostflags. # In that situation we bet that the kern arch can be used; @@ -1356,7 +1356,7 @@ END } if ($kern_arch) { my $setarch =3D "setarch $kern_arch_info->{Userland_setarch}"; - logm("Using $kern_arch kernel for $r{arch} userland ($setarch)"); + logm("Using $kern_arch kernel for $ho->{Arch} userland ($setarch)"); preseed_hook_command($ho, 'late_command', $sfx, <{Arch} kernels end up being the default so shuffle them # where update-grub will not find them for f in /boot/vmlinu*; do dpkg-divert --rename --divert "/boot/~disable~\${f##*/}" "\$f" diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 18566d32..d87b6c89 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2918,8 +2918,8 @@ sub setup_netboot_local_uefi ($) { # i386 is X64 because when we are trying to install i386 # on a UEFI box, it's actually an amd64-capable UEFI box # which expects a 64-bit EFI loader - die "EFI arch" unless $efi_archs{ $r{arch} }; - my $efi =3D $efi_archs{ $r{arch} }; + die "EFI arch" unless $efi_archs{ $ho->{Arch} }; + my $efi =3D $efi_archs{ $ho->{Arch} }; setup_netboot_bootcfg($ho, <{Arch} END =20 # Build process as documented in the handbook: diff --git a/ts-host-install b/ts-host-install index 3c14f171..4bfa2f5e 100755 --- a/ts-host-install +++ b/ts-host-install @@ -61,7 +61,7 @@ our %timeout=3D qw(ReadPreseed 350 our $kern_arch_info; =20 if ($build) { - if ($r{arch} eq 'i386') { + if ($ho->{Arch} eq 'i386') { $kern_arch_info =3D { Kernel_Debian =3D> 'amd64', Userland_setarch =3D> 'i386', @@ -262,7 +262,7 @@ END push @dicmdline, "domain=3D$c{TestHostDomain}"; push @dicmdline, get_host_property($ho, "install-append $ho->{Suite}", ''), - get_host_property($ho, "install-append $ho->{Suite} $r{arch}", ''); + get_host_property($ho, "install-append $ho->{Suite} $ho->{Arch}", = ''); =20 my $console =3D get_host_native_linux_console($ho); =20 @@ -280,7 +280,7 @@ END =20 push @hocmdline, get_host_property($ho, "linux-boot-append $ho->{Suite}", ''), - get_host_property($ho, "linux-boot-append $ho->{Suite} $r{arch}", = ''); + get_host_property($ho, "linux-boot-append $ho->{Suite} $ho->{Arch}= ", ''); =20 $xopts{ipappend} =3D $ipappend; setup_netboot_di($ho, $kernel, "/$initrd", \@dicmdline, \@hocmdline, diff --git a/ts-memdisk-try-append b/ts-memdisk-try-append index f6ec2fd5..ce39d5a7 100755 --- a/ts-memdisk-try-append +++ b/ts-memdisk-try-append @@ -23,7 +23,7 @@ arch=3D`perl -e ' use Osstest::TestSupport; =20 tsreadconfig(); - print $r{arch} or die $!; + print $ho->{Arch} or die $!; '` =20 case "$arch" in diff --git a/ts-xen-build-prep b/ts-xen-build-prep index c38ab36d..0f07648e 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -246,7 +246,7 @@ END if ($ho->{Suite} !~ m/lenny|squeeze/) { target_install_packages($ho, 'libfdt-dev'); } - if ($r{arch} eq 'amd64' && $ho->{Suite} !~ m/squeeze|lenny/) { + if ($ho->{Arch} eq 'amd64' && $ho->{Suite} !~ m/squeeze|lenny/) { target_install_packages($ho, 'libc6-dev-i386'); } } @@ -269,4 +269,4 @@ if (!$ho->{Flags}{'no-reinstall'}) { gitcache_setup($ho); } =20 -host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch}); +host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$ho->{Arch}); diff --git a/ts-xen-install b/ts-xen-install index 9f78a75f..2d3c644d 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -64,7 +64,7 @@ sub packages () { if ($ho->{Suite} !~ m/lenny|squeeze/) { target_install_packages($ho, qw(libfdt1)); } - if ($r{arch} eq 'i386') { + if ($ho->{Arch} eq 'i386') { target_install_packages($ho, qw(libc6-xen)); } target_install_packages($ho, @{toolstack($ho)->{ExtraPackages}}) @@ -92,7 +92,7 @@ sub some_extradebs ($) { target_install_packages($ho, qw(rsync)) unless $rsync_installed++; target_putfile_root($ho,300, "$path/.", $ontarget, '-r'); } elsif ($path =3D~ m{\.deb$}) { - $path =3D~ s{_\.deb}{ "_$r{arch}.deb" }e; + $path =3D~ s{_\.deb}{ "_$ho->{Arch}.deb" }e; logm("$cfgvar: installing $path"); $ontarget =3D basename($path); $dpkgopts =3D '-iB'; @@ -115,7 +115,7 @@ sub extradebs () { =20 # $c{ DebianExtraPackages___ } my $firmware =3D get_host_property($ho, "firmware", "bios"); - some_extradebs([ 'DebianExtraPackages', $firmware, $r{arch}, $suite ]); + some_extradebs([ 'DebianExtraPackages', $firmware, $ho->{Arch}, $suite= ]); } =20 sub extract () { @@ -193,7 +193,7 @@ sub setupboot () { my $xenhopt=3D "conswitch=3Dx watchdog noreboot async-show-all"; =20 my $cons=3D get_host_property($ho, 'XenSerialConsole', - $r{arch} =3D~ m/^arm/ ? 'dtuart' + $ho->{Arch} =3D~ m/^arm/ ? 'dtuart' : 'com1'); =20 if ( $cons eq "com1" ) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel