From patchwork Fri Oct 20 13:47:00 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: 10020305 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 D0A7B60211 for ; Fri, 20 Oct 2017 13:49:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8C601FF1E for ; Fri, 20 Oct 2017 13:49:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD83D28EF3; Fri, 20 Oct 2017 13:49:31 +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 66A5528EFE for ; Fri, 20 Oct 2017 13:49:31 +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 1e5XeB-0005rK-CF; Fri, 20 Oct 2017 13:47:35 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Xe9-0005qA-E3 for xen-devel@lists.xenproject.org; Fri, 20 Oct 2017 13:47:33 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id 19/A1-32649-47EF9E95; Fri, 20 Oct 2017 13:47:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXitHRDpG7Jv5e RBp8+clt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlfPv9hLfgpULH8wz6mBsb7vF2MnBwSAv4S DReOs4HYbAI6Ehfn7gSyOThEBFQkbu81AAkzC4RItB77wg5iCwskSNxpmMkIYrMIqEpMmrANL M4rYCnR13MVrFVCQE/ix3ZDEJNTwEri32Z+kAohoIpNl6YzQ1QLSpyc+YQFYrqmROv23+wQtr xE89bZzBD1ihL98x6wTWDkm4WkZRaSlllIWhYwMq9iVC9OLSpLLdK10EsqykzPKMlNzMzRNTQ w1stNLS5OTE/NSUwq1kvOz93ECAwyBiDYwXih3fkQoyQHk5Iob2Dly0ghvqT8lMqMxOKM+KLS nNTiQ4wyHBxKErwmf4FygkWp6akVaZk5wHCHSUtw8CiJ8L7+A5TmLS5IzC3OTIdInWLU5ei4e fcPkxBLXn5eqpQ4rzHIDAGQoozSPLgRsNi7xCgrJczLCHSUEE9BalFuZgmq/CtGcQ5GJWFeG5 ApPJl5JXCbXgEdwQR0BLv9C5AjShIRUlINjBVln5W5fI8q7S9U6fvHmNwtuG5fhNvepQXWb79 W7BU54Sy+2HA7p9mVwDW759kLnHI04Zi5ojhlmuo5ybLPcgVbY7IVH2oEdfjaMx4OKX14yPPw NlGJkDXTtCYfDhPZoRM31U97Y75NiuHL7Ta9ncdCvhW/TwqM4pf+GDftst2mC5LCaUZCSizFG YmGWsxFxYkArrdC6rgCAAA= X-Env-Sender: prvs=4592c6fb6=roger.pau@citrix.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1508507249!103662427!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 11154 invoked from network); 20 Oct 2017 13:47:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 20 Oct 2017 13:47:31 -0000 X-IronPort-AV: E=Sophos;i="5.43,405,1503360000"; d="scan'208";a="447328200" From: Roger Pau Monne To: Date: Fri, 20 Oct 2017 14:47:00 +0100 Message-ID: <20171020134702.41255-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.13.5 (Apple Git-94) In-Reply-To: <20171020134702.41255-1-roger.pau@citrix.com> References: <20171020134702.41255-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v12 29/33] ts-freebsd-host-install: add arguments to test memdisk append 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 when passed the --recordappend argument upon success the script stores the tentative host property in the runvars. Signed-off-by: Roger Pau Monné --- Changes since v2: - Fix commit message. Changes since v1: - Provide a --recordappend argument to force the recording the memdisk parameters. - Exit gracefully if a bootonly test is attempted against a non-supported architecture. - Use NONE instead of an empty string when calling setup_netboot_memdisk if nothing should be appended. - Do not perform any arch test in ts-freebsd-host-install. --- ts-freebsd-host-install | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 483b9aec..50af5dd3 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -41,6 +41,23 @@ use Osstest::TestSupport; tsreadconfig(); +our $bootonly; +our $memdisk_append; +our $record_append; +while (@ARGV && $ARGV[0] =~ m/^-/g) { + if ($ARGV[0] =~ m/^--memdiskappend=(.*)/) { + $memdisk_append = $1; + } elsif ($ARGV[0] eq "--testboot") { + $memdisk_append //= "NONE"; + $bootonly = 1; + } elsif ($ARGV[0] eq "--recordappend") { + $record_append = 1; + } else { + die "Unknown argument $ARGV[0]"; + } + shift @ARGV; +} + our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); @@ -95,7 +112,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 +264,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 $record_append; + exit 0; +} + # Next boot will be from local disk setup_netboot_local($ho);