From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 04/27] standalone: Do not blunder on after errors Date: Wed, 16 Sep 2015 14:48:48 +0100 Message-ID: <1442411328.18856.69.camel@citrix.com> References: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> <1442410530-9665-5-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcD4u-0006t0-14 for xen-devel@lists.xenproject.org; Wed, 16 Sep 2015 13:48:52 +0000 In-Reply-To: <1442410530-9665-5-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-09-16 at 14:35 +0100, Ian Jackson wrote: > ./standalone's with_logging function would _log_ errors, but it > wouldn't exit immediately. As a result, the script would blunder on. > > Normally it wouldn't do very much more since most of the with_logging > calls are the last thing it does - but the exit status would be wrong > (0, from echo). > > As a result, for example, standalone-generate-dump-flight-runvars > would never properly report make-flight failures. > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell > --- > standalone | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/standalone b/standalone > index 873616a..60b6666 100755 > --- a/standalone > +++ b/standalone > @@ -194,6 +194,7 @@ with_logging() { > rc=${PIPESTATUS[0]} > if [ $rc -ne 0 ] ; then > echo "FAILED rc=${rc}" >&2 > + exit $rc > fi > } >