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 14:41:45 +0200 Message-ID: <20160510124145.GC12472@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> 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]:57862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbcEJMlt (ORCPT ); Tue, 10 May 2016 08:41:49 -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 8080585542 for ; Tue, 10 May 2016 12:41:48 +0000 (UTC) Content-Disposition: inline In-Reply-To: <5731C9F1.80003@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2016-05-10 13:45+0200, Paolo Bonzini: > On 19/04/2016 09:19, Andrew Jones wrote: >> On Fri, Apr 15, 2016 at 10:52:50PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99= wrote: >>> # extra_params in the config file may contain backticks that n= eed to be >>> - # expanded, so use eval to start qemu >>> - eval $cmdline >>> + # expanded, so use eval to start qemu. Same for $RUNTIME_log_= stdout. >>> + summary=3D$(eval $cmdline > >(eval "tee -a $RUNTIME_log_stdout= " | extract_summary)) >>=20 >> The depth of our stdout resolution is getting insane. Oh well, let's= see >> how deep we can go before we throw our hands up and just rewrite all= these >> bash scripts in python. >=20 > Why not just use a pipe here? >=20 > eval $cmdline 2>> $RUNTIME_log_stderr \ > | eval tee -a "$RUNTIME_log_stdout" | extract_summary >=20 > Anything I am missing? >=20 >>> ret=3D$? Simple pipeline would not return the return value of `eval $cmdline`, s= o it seemed nicer with a redirection.