From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests PATCH v3 3/6] arch-run: reduce return code ambiguity Date: Wed, 2 Mar 2016 17:05:08 +0100 Message-ID: <56D70F34.8050507@redhat.com> References: <1456772003-27911-1-git-send-email-drjones@redhat.com> <1456772003-27911-4-git-send-email-drjones@redhat.com> <56D609AC.80303@redhat.com> <20160302125659.GA2007@potion.brq.redhat.com> <56D6FC58.9010307@redhat.com> <20160302154237.GA2354@potion.brq.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: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55659 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755451AbcCBQFN (ORCPT ); Wed, 2 Mar 2016 11:05:13 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 5B10835A804 for ; Wed, 2 Mar 2016 16:05:12 +0000 (UTC) In-Reply-To: <20160302154237.GA2354@potion.brq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/03/2016 16:42, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >> > I'm not sure how you would have something on stderr, except on the= very >> > last line? The idea being that 1) the test only writes to stdout = 2) >> > QEMU only writes to stderr 3) QEMU exits after writing to stderr. = If >> > this is true, the proposed assignment/printf pair works just fine. >=20 > QEMU prints some warnings without immediately exiting, e.g. > warning: host doesn't support requested feature: CPUID.01H:ECX.vmx = [bit 5] >=20 > So it's possible that stdout is printed after stderr. Preserving the > visible output could be less confusing in these rare cases. I agree > with the late printf if you think that the ugly code is not worth it. Perhaps we can add an "stderr:" line if $errors is not empty, so that i= t is clear that the order is not maintained. Paolo