[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 3/3] ts-memdisk-try-append: Call selecthost


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Tue, 10 Mar 2020 12:08:02 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Roger Pau Monné <royger@xxxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Mar 2020 12:08:28 +0000
  • Ironport-sdr: DcIK2qiyICbau3bp5JUYA5QlQUWaDM4O4a4S6OJqvFYJyOgy5ErxpBaEi1h5RLMn0sTfZ7INla LeJKdZrMLVzqVc7YD4juofc3VpmLFsciAng4T98JRL/U2rJylJ9ZftvGlG0Y/kKchzBC0+r4os b79goq3JNJiXPZIzWUVZkuUN/1ms6+f7wwuJnv2bkUi5/UVMgpWFYOdLTfr9LFqzSMIaMAiM84 8/aWliL4UxsvaQ17sLWPQ+UE2kSgeX0/xYeHQFEvAfWlmlvBjc0hkWHUL7Hzy9LH74a+YdCOVy +fE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In 7f49abaa0ff91d6dc1592ea80f10211c52fb03c4
  arch replumbing: Replace many $r{arch} with $[g]ho->{Arch}
I accidentally broke this, by not spotting that the perl fragment
did not call selecthost and has no $ho.

Fix this as follows:
  * Pass all of the -try-append arguments to the perl rune.
  * Include a simple replica of the arg parsing of
    ts-freebsd-host-install (notably, we don't parse options,
    and instead assume the host comes last).
  * Call selecthost.

Compared to the situation prior to 7f49abaa0ff9, we now check that the
host is allocated to us, etc., before looking at what arch the job
specifies.  Additionally, we would now honour host_arch if it were
different to arch.  (Currently, it isn't.)

CC: Roger Pau Monné <royger@xxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-memdisk-try-append | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ts-memdisk-try-append b/ts-memdisk-try-append
index 2fe18f45..4b54eff0 100755
--- a/ts-memdisk-try-append
+++ b/ts-memdisk-try-append
@@ -23,8 +23,13 @@ arch=`perl -I. -e '
                 use Osstest::TestSupport;
 
                 tsreadconfig();
+
+               our $whhost = pop @ARGV; # arg parsing bodge
+               $whhost ||= "host";
+               our $ho = selecthost($whhost);
+
                 print $ho->{Arch} or die $!;
-              '`
+              ' "$@"`
 
 case "$arch" in
 amd64)
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.