From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH kvm-unit-tests v2 03/12] scripts/mkstandalone: use common run function Date: Fri, 18 Dec 2015 12:02:39 +0100 Message-ID: <20151218110238.GB19139@potion.brq.redhat.com> References: <1450374823-7648-1-git-send-email-rkrcmar@redhat.com> <1450374823-7648-4-git-send-email-rkrcmar@redhat.com> <20151217190942.GC14168@hawk.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Paolo Bonzini To: Andrew Jones Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48816 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbbLRLCm (ORCPT ); Fri, 18 Dec 2015 06:02:42 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 5D6E18E6E3 for ; Fri, 18 Dec 2015 11:02:42 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20151217190942.GC14168@hawk.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: 2015-12-17 13:09-0600, Andrew Jones: > On Thu, Dec 17, 2015 at 06:53:34PM +0100, Radim Kr=C4=8Dm=C3=A1=C5=99= wrote: >> The biggest change is dependency on bash. An alternative would be t= o >> rewrite `run` in POSIX shell, but I think it's ok to presume that KV= M >> unit tests will run on a system where installing bash isn't a proble= m. >=20 > Hmm... as hard as I worked to avoid the dependency on bash for the > standalone tests, then I'm reluctant to give up on that. I do agree > that having the dependency for the printf-%q trick helps a ton in > making the code more maintainable though. And parts of run() would need to be rewritten as well ... I am not sure it's worth to invest the time. >> (We already depend on QEMU ...) >=20 > Dependency on qemu doesn't imply a dependency on bash. The idea behin= d > the standalone version of kvm-unit-tests tests is that you can receiv= e > one in your email and launch it. No, but its quite likely that the host has bash when something as big a= s QEMU is already there, or at least that it shouldn't be a huge problem to install it. >> Apart from that, there are changes in output and exit codes. >> - summary doesn't go to stderr >=20 > I wanted the summary on stderr so when you redirect the output of the > test to a file the output would directly diff with the corresponding > output in test.log from a system where run_tests.sh was used. Ok, stderr from qemu needs to be redirected too then. I will add an extra param to set file for __*log helpers or helpers tha= t redirect to stderr.