From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST 2/5] cs-adjust-flight: Add job-status to report job stats Date: Tue, 6 Oct 2015 15:56:24 +0100 Message-ID: <1444143384.5302.209.camel@citrix.com> References: <1444055694.5302.9.camel@citrix.com> <1444055708-15836-2-git-send-email-ian.campbell@citrix.com> <22035.56899.387780.489817@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <22035.56899.387780.489817@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 Tue, 2015-10-06 at 15:44 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST 2/5] cs-adjust-flight: Add job > -status to report job stats"): > > The return code of sg-run-job does not reflect the state of the job, > > which is instead written to the database. For the benefit of running > > tests in a loop until failure add a command to retrieve the status to > > stdout. > ... > > +job_status() { > > + flight=$1; shift > > + job=$1; shift > > + > > + status=$(OSSTEST_CONFIG=$config \ > > + ./cs-adjust-flight $flight job-status $job) > > + echo "$status" > > +} > > This is rather odd. Why do you capture the value in a variable and > then pass it to echo ? You could just let the job_status command > print its output directly. It was previously echo "${status#* }" (or something like that). I should have changed it. Ian.