From patchwork Fri Jul 28 15:26:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9869073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C6326038F for ; Fri, 28 Jul 2017 15:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB6E7288B2 for ; Fri, 28 Jul 2017 15:30:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E060A288E5; Fri, 28 Jul 2017 15:30:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C736288EE for ; Fri, 28 Jul 2017 15:30:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db7Bg-000502-1e; Fri, 28 Jul 2017 15:28:24 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db7Be-0004yt-QZ for xen-devel@lists.xenproject.org; Fri, 28 Jul 2017 15:28:22 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id F3/9C-03406-6185B795; Fri, 28 Jul 2017 15:28:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsXitHSDva5oRHW kQfcFI4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNeN/xzPmgi28FUs+X2BvYHzL1cXIySEh4C+x deUpZhCbTUBH4uLcnWxdjBwcIgIqErf3GoCEmQVCJFqPfWEHsYUFoiRefTvCAmKzCKhKLOq7B hbnFbCUmPrlETPESD2JtxNfMILYnAJWEo0v57GC2EJANfum9TBB1AtKnJz5hAVivqZE6/bf7B C2vETz1tnMEPWKEv3zHrBNYOSbhaRlFpKWWUhaFjAyr2JUL04tKkst0rXUSyrKTM8oyU3MzNE 1NDDTy00tLk5MT81JTCrWS87P3cQIDDQGINjBeHdTwCFGSQ4mJVHem2bVkUJ8SfkplRmJxRnx RaU5qcWHGGU4OJQkeNvDgHKCRanpqRVpmTnAkIdJS3DwKInwSoOkeYsLEnOLM9MhUqcYdTleT fj/jUmIJS8/L1VKnHcNSJEASFFGaR7cCFj8XWKUlRLmZQQ6SoinILUoN7MEVf4VozgHo5Iw7y qQKTyZeSVwm14BHcEEdMTEpkqQI0oSEVJSDYzZj264fLLLLjf59XPTec7l3d3X2Oo1kjgrDLr Vn77QEKhMshEI+RD5naX3fvDWKY/f7Ldw4N7usumC1MTDTk92z90mfmorg4Uf6ypJrgqfb9sy RbSPPjRZo7mzm7V/195/C1lMHdTf95y5z/nsFW9Ac9iVh5a/T+vv6hM8P5lj/sr8vI+2j5iVW IozEg21mIuKEwEuNfmsugIAAA== X-Env-Sender: prvs=375b3df75=roger.pau@citrix.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1501255699!68830968!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9055 invoked from network); 28 Jul 2017 15:28:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 28 Jul 2017 15:28:21 -0000 X-IronPort-AV: E=Sophos;i="5.40,425,1496102400"; d="scan'208";a="441766845" From: Roger Pau Monne To: Date: Fri, 28 Jul 2017 16:26:33 +0100 Message-ID: <20170728152637.20301-8-roger.pau@citrix.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170728152637.20301-1-roger.pau@citrix.com> References: <20170728152637.20301-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH OSSTEST 07/11] ts-freebsd-host-install: add option to test memdisk options X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is needed in order to figure out which memdisk options should be used to boot the images on each specific box. Note that upon success the script stores the tentative host property in the runvars. Signed-off-by: Roger Pau Monné --- ts-freebsd-host-install | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 483b9aec..3b0ab970 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -41,6 +41,25 @@ use Osstest::TestSupport; tsreadconfig(); +if ($r{'arch'} !~ m/amd64/g) { + logm("Arch $r{'arch'} not supported!"); + exit 0; +} + +our $bootonly; +our $memdisk_append; +while (@ARGV && $ARGV[0] =~ m/^-/g) { + if ($ARGV[0] =~ m/^--memdiskappend=(.*)/) { + $memdisk_append = $1; + } elsif ($ARGV[0] eq "--testboot") { + $memdisk_append //= ""; + $bootonly = 1; + } else { + die "Unknown argument $ARGV[0]"; + } + shift @ARGV; +} + our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); @@ -95,7 +114,7 @@ END # Setup the pxelinux config file logm("Booting from installer image at $pxeimg"); - setup_netboot_memdisk($ho, $pxeimg); + setup_netboot_memdisk($ho, $pxeimg, $memdisk_append); } sub install () { @@ -247,6 +266,12 @@ power_state($ho, 1); logm("Waiting for the installer to boot"); await_tcp(get_timeout($ho,'reboot',$timeout), 5, $ho); +if ($bootonly) { + hostprop_putative_record($ho, "MemdiskAppend", $memdisk_append) + if $memdisk_append; + exit 0; +} + # Next boot will be from local disk setup_netboot_local($ho);