From patchwork Wed Jul 26 09:19:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9864445 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 5AAD56038C for ; Wed, 26 Jul 2017 09:22:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 543F928384 for ; Wed, 26 Jul 2017 09:22:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490A72872F; Wed, 26 Jul 2017 09:22:19 +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 C464528384 for ; Wed, 26 Jul 2017 09:22:18 +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 1daIUI-0006Og-C4; Wed, 26 Jul 2017 09:20:14 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daIUH-0006Oa-D9 for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 09:20:13 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id EA/9C-02181-CCE58795; Wed, 26 Jul 2017 09:20:12 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsWyU9JRQvdMXEW kwY9trBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aew4fYClrFKpadXMrUwLhNoIuRk0NCwE9i /YOJbCA2i4CqRPfNucwgNpuAjsTFuTvB4iICvhKb/s4Cs4UFciS+9i1kBbF5BTwlVnx+zN7Fy MUhJHCLUeLo093sEAlBiZMzn7CA2MxAgxbs/gTUzAFkS0ss/8cBYnIKeEn8PRMMUiEqoCJxcu UaJhBbSEBRon/eAzaI09Iljs7cyDaBkW8WkqGzkAydhTB0ASPzKkaN4tSistQiXSMTvaSizPS MktzEzBxdQwNjvdzU4uLE9NScxKRiveT83E2MwECrZ2Bg3MH46rjfIUZJDiYlUd5JphWRQnxJ +SmVGYnFGfFFpTmpxYcYZTg4lCR4nWKBcoJFqempFWmZOcCQh0lLcPAoifBGg6R5iwsSc4sz0 yFSpxh1Oeb83vGFSYglLz8vVUqc92UMUJEASFFGaR7cCFj8XWKUlRLmZWRgYBDiKUgtys0sQZ V/xSjOwagkzGsKsoonM68EbtMroCOYgI6YM6MU5IiSRISUVANj0crFEvfaV39naBHct+JZoEz wyjO+N0tczl5/8FT07wuNR2K7Xr09fqTz5Fu9FV2Ryz62/tq41z59/Qv1TcUrmTP7r7E9+Ppe 5gDn9cbfC1h+lbr/rIiWv9I0/ftLgZyYE3MO/e9mFzn85p5KnIHYwtNLF2+5ZV8bUDslUaru4 c+X3ZPkPpYvuKrEUpyRaKjFXFScCAA2gxCjugIAAA== X-Env-Sender: prvs=37357d374=roger.pau@citrix.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1501060811!107238470!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45477 invoked from network); 26 Jul 2017 09:20:12 -0000 Received: from smtp.ctxuk.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jul 2017 09:20:12 -0000 X-IronPort-AV: E=Sophos;i="5.40,414,1496102400"; d="scan'208";a="49949843" Date: Wed, 26 Jul 2017 10:19:42 +0100 From: Roger Pau Monne To: Ian Jackson , Message-ID: <20170726091942.6konfo4ckidv4tju@dhcp-3-128.uk.xensource.com> References: <20170725150032.9225-1-roger.pau@citrix.com> <20170725150032.9225-6-roger.pau@citrix.com> <22903.24924.854274.14175@mariner.uk.xensource.com> <20170726081433.tgs7utlqyb4uacwc@dhcp-3-128.uk.xensource.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170726081433.tgs7utlqyb4uacwc@dhcp-3-128.uk.xensource.com> User-Agent: NeoMutt/20170714 (1.8.3) X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL03.citrite.net (10.69.22.127) Subject: Re: [Xen-devel] [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build 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 On Wed, Jul 26, 2017 at 09:14:33AM +0100, Roger Pau Monne wrote: > On Tue, Jul 25, 2017 at 04:18:52PM +0100, Ian Jackson wrote: > > Roger Pau Monne writes ("[PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build"): > > > And use it in order to install the hosts for the next FreeBSD flight. > > ... > > > +case "$branch" in > > > +freebsd-*) > > > + IFS=$'\n' > > > > That's quite brave, but I don't object. I would have piped the output > > into `read' or something. > > I have the following which can be applied on top and is IMHO better, I > also don't fancy playing with IFS. I can push a new branch with this > folded if that's more convenient. After our IRC conversation about here strings and failure, the following one using pipes is probably better. ---8<--- diff --git a/cr-daily-branch b/cr-daily-branch index 91f73ad8..bbb1d765 100755 --- a/cr-daily-branch +++ b/cr-daily-branch @@ -136,9 +136,8 @@ esac case "$branch" in freebsd-*) - IFS=$'\n' - for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do + ./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ + while read anointed; do # Check if the anointed version matches OLD_VERSION, # or else force a new flight, even if OLD_REVISION matches # NEW_REVISION. @@ -150,7 +149,6 @@ freebsd-*) break fi done - unset IFS ;; esac @@ -305,9 +303,8 @@ freebsd) ;; esac -IFS=$'\n' -for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do +./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ +while read anointed; do # Retrieve previous successful FreeBSD build for each arch. freebsd_arch=${anointed##* } freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" @@ -316,7 +313,6 @@ for anointed in \ export ${freebsd_envvar}=${flight_job/ /.} fi done -unset IFS if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\ @@ -525,9 +521,8 @@ case "$branch" in freebsd-*) if grep '^tolerable$' $mrof >/dev/null 2>&1 && $OSSTEST_ANOINT && [ "x$OSSTEST_BLESSING" == "xreal" ]; then - IFS=$'\n' - for anointed in `./mg-anoint list-prepared \ - "freebsd build $freebsd_branch *"`; do + ./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ + while read anointed; do # Update anointed versions # NB: failure to update an anointed build for a specific arch # should not be fatal, and it's not an issue if one of the @@ -538,7 +533,6 @@ freebsd-*) echo "Anointed artifacts from build-$freebsd_arch-freebsd" fi done - unset IFS fi ;; esac