From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 1/3] cs-adjust-flight: Add job-status to report job stats Date: Mon, 5 Oct 2015 14:53:24 +0100 Message-ID: <1444053204.5302.6.camel@citrix.com> References: <1443787531.11707.80.camel@citrix.com> <1443787549-7467-1-git-send-email-ian.campbell@citrix.com> <22034.21862.669291.965109@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <22034.21862.669291.965109@mariner.uk.xensource.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 Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2015-10-05 at 11:48 +0100, Ian Jackson wrote: > > + }); > > +} > > This output format is awkward, isn't it ? > > Would it be too horrible to omit `$job ' if the spec was a literal and > can therefore only match one item ? You can test that with something > like > print "$job " or die $! if defined spec_re($jobs); Yes I can make this work I think. I wasn't too sure about having the output differ depending on the parameters like this, but I think it probably is best. > > + *) > > + echo >&2 "ERROR: $status" > > + exit 1 > > Do we not have `fail' in scope ? It doesn't look like it, the script doesn't source anything at all so there's certainly no path to mgi-common. The rest of the script is already doing explicit echo + exit. I could tack on a cleanup. > Also TBH I'm not sure you need to be > this careful anyway... Belt and braces ;-) > > + if [ $# -ne 1 ] ; then > > + echo "get-job-status: Need job" >&2 > > + exit 1 > > `fail' again ? > > Ian.