From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH v3 8/9] run_tests: print summary Date: Tue, 10 May 2016 17:31:34 +0200 Message-ID: <20160510153134.GE12472@potion> References: <1460753571-20732-1-git-send-email-rkrcmar@redhat.com> <1460753571-20732-9-git-send-email-rkrcmar@redhat.com> <20160419071947.3v6fjnbdln47ddno@hawk.localdomain> <5731C9F1.80003@redhat.com> <20160510124145.GC12472@potion> <5731F10D.5030300@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Jones , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55379 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbcEJPbi (ORCPT ); Tue, 10 May 2016 11:31:38 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2BACB80E47 for ; Tue, 10 May 2016 15:31:38 +0000 (UTC) Content-Disposition: inline In-Reply-To: <5731F10D.5030300@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2016-05-10 16:32+0200, Paolo Bonzini: > On 10/05/2016 14:41, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >>> > eval $cmdline 2>> $RUNTIME_log_stderr \ >>> > | eval tee -a "$RUNTIME_log_stdout" | extract_summa= ry >>> >=20 >>> > Anything I am missing? >>> >=20 >>>>> >>> ret=3D$? >> Simple pipeline would not return the return value of `eval $cmdline`= , so >> it seemed nicer with a redirection. >=20 > Right... Two more attempts: >=20 > eval "$cmdline 2>> $RUNTIME_log_stderr > > >(tee -a $RUNTIME_log_stdout | extract_summary)" >=20 > (eval $cmdline) 2> >($RUNTIME_cmd_stderr) > > >(tee >($RUNTIME_cmd_stdout) | extract_summary= )" >=20 > (The latter requiring an extra useless uses of cat for test.log). >=20 > Would any of these work fine? The former one works. The latter would work if $RUNTIME_cmd_stdout accepted $kernel as an argument. summary=3D$(eval $cmdline > >(tee >(RUNTIME_log_stdout $kernel) | extract_summary)) Is that acceptable? (I will gladly degrade performance to have less code in eval.) Thanks.