From patchwork Wed Jul 26 08:14:33 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: 9864361 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 75321603F9 for ; Wed, 26 Jul 2017 08:18:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6282D28737 for ; Wed, 26 Jul 2017 08:18:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 576DB28740; Wed, 26 Jul 2017 08:18:17 +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 880592873D for ; Wed, 26 Jul 2017 08:18:16 +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 1daHTG-0001KH-JD; Wed, 26 Jul 2017 08:15:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daHTF-0001KB-7f for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 08:15:05 +0000 Received: from [85.158.143.35] by server-6.bemta-6.messagelabs.com id 7F/B8-03937-88F48795; Wed, 26 Jul 2017 08:15:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRWlGSWpSXmKPExsWyU9JRQrfdvyL S4PxzfYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNeP5ocSCPrGKbec3szQwThPoYuTkkBDwk5j6 rpsRxGYRUJV4fWMlG4jNJqAjcXHuTjBbREBb4sWqdWA2s4CKxKl5XSwgtrBAgsT7zoVgNq+Ap 8SHey/AaoQEZjNKHHkbDBEXlDg58wkLRK+OxILdn4BqOIBsaYnl/zhAwpwCDhJ71q0FaxUFGn 9y5RomiDGKEv3zHrBBnJku0TZhIesERv5ZSKbOQjJ1FsLUBYzMqxjVi1OLylKLdE30kooy0zN KchMzc3QNDcz0clOLixPTU3MSk4r1kvNzNzECg48BCHYwdl/2P8QoycGkJMo7ybQiUogvKT+l MiOxOCO+qDQntfgQowwHh5IEL5MfUE6wKDU9tSItMwcYBzBpCQ4eJRHeEJA0b3FBYm5xZjpE6 hSjLsec3zu+MAmx5OXnpUqJ85qAFAmAFGWU5sGNgMXkJUZZKWFeRqCjhHgKUotyM0tQ5V8xin MwKgnz6oBM4cnMK4Hb9AroCCagI+bMKAU5oiQRISXVwNizjn3jusNTRbY/ncx7qo436LXjgQ+ TH5SVmFu5C77z1t4nN3frIcOpUcei2jZz3m2xbrMJcti0duqU6y8W/b1htNPy/h+eTlnRpbr+ c4WWmufHVrRPEvl85OyFEFHx2A/ZOS8rtt9Yva49N/1vue1TF5OfO/p1p04/zVj1dDljqvdsy /A5fteUWIozEg21mIuKEwFU9xzoxAIAAA== X-Env-Sender: prvs=37357d374=roger.pau@citrix.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1501056903!71488152!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 48793 invoked from network); 26 Jul 2017 08:15:03 -0000 Received: from smtp.eu.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-3.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jul 2017 08:15:03 -0000 X-IronPort-AV: E=Sophos;i="5.40,414,1496102400"; d="scan'208";a="49946452" Date: Wed, 26 Jul 2017 09:14:33 +0100 From: Roger Pau Monne To: Ian Jackson Message-ID: <20170726081433.tgs7utlqyb4uacwc@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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <22903.24924.854274.14175@mariner.uk.xensource.com> User-Agent: NeoMutt/20170714 (1.8.3) X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL03.citrite.net (10.69.22.127) Cc: xen-devel@lists.xenproject.org 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 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. ---8<--- diff --git a/cr-daily-branch b/cr-daily-branch index 91f73ad8..66e7e88b 100755 --- a/cr-daily-branch +++ b/cr-daily-branch @@ -136,9 +136,7 @@ esac case "$branch" in freebsd-*) - IFS=$'\n' - for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do + 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. @@ -149,8 +147,7 @@ freebsd-*) skipidentical=false break fi - done - unset IFS + done <<< `./mg-anoint list-prepared "freebsd build $freebsd_branch *"` ;; esac @@ -305,9 +302,7 @@ freebsd) ;; esac -IFS=$'\n' -for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do +while read anointed; do # Retrieve previous successful FreeBSD build for each arch. freebsd_arch=${anointed##* } freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" @@ -315,8 +310,7 @@ for anointed in \ flight_job=`./mg-anoint retrieve "$anointed"` export ${freebsd_envvar}=${flight_job/ /.} fi -done -unset IFS +done <<< `./mg-anoint list-prepared "freebsd build $freebsd_branch *"` if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\ @@ -525,9 +519,7 @@ 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 + 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 @@ -537,8 +529,8 @@ freebsd-*) $flight build-$freebsd_arch-freebsd; then echo "Anointed artifacts from build-$freebsd_arch-freebsd" fi - done - unset IFS + done <<< `./mg-anoint list-prepared \ + "freebsd build $freebsd_branch *"` fi ;; esac