From: Andrew Jones Subject: Re: [PATCH kvm-unit-tests 3/3] report: move blank line to better side of SUMMARY Date: Thu, 22 Dec 2016 11:53:29 +0100 Message-ID: <20161222105329.vci64zdghrasvr2f@kamzik.brq.redhat.com> References: <20161219162305.20455-1-drjones@redhat.com> <20161219162305.20455-4-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pbonzini@redhat.com, rkrcmar@redhat.com, lvivier@redhat.com, thuth@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55072 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbcLVKxd (ORCPT ); Thu, 22 Dec 2016 05:53:33 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 168E34D6A1 for ; Thu, 22 Dec 2016 10:53:33 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20161219162305.20455-4-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Dec 19, 2016 at 05:23:05PM +0100, Andrew Jones wrote: > Currently test.log gets output of the form > > test1-command-line > test1-output > > SUMMARY: > test2-command-line > test2-output > > SUMMARY: > test3-command-line > ... > > Having a blank line before SUMMARY, and not after, it makes it > tough to group lines by eye. Change it to > > test1-command-line > test1-output > SUMMARY: > > test2-command-line > test2-output > SUMMARY: > > test3-command-line > ... > > The empty line is moved from report_summary to runtime in order > to remove it altogether when running tests individually or as a > standalone. > > Signed-off-by: Andrew Jones > --- > scripts/runtime.bash | 1 + > lib/report.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/runtime.bash b/scripts/runtime.bash > index 11a40a92183a..9c1bc3b3b3fe 100644 > --- a/scripts/runtime.bash > +++ b/scripts/runtime.bash > @@ -108,6 +108,7 @@ function run() > summary=$(eval $cmdline 2> >(RUNTIME_log_stderr) \ > > >(tee >(RUNTIME_log_stdout $kernel) | extract_summary)) > ret=$? > + [ "$STANDALONE" != "yes" ] && echo > >(RUNTIME_log_stdout $kernel) Hmm, even though this works, because of how we define RUNTIME_log_stdout (eventually using '>> test.log'), I should have used '>>' here as well for correctness. Paolo, Assuming we want to merge this patch, will you fix it up on commit? Or should I send a v2? Thanks, drew > > if [ $ret -eq 0 ]; then > echo "`PASS` $1 $summary" > diff --git a/lib/report.c b/lib/report.c > index fc0ef494f412..e24e81382f9e 100644 > --- a/lib/report.c > +++ b/lib/report.c > @@ -109,7 +109,7 @@ int report_summary(void) > { > spin_lock(&lock); > > - printf("\nSUMMARY: %d tests", tests); > + printf("SUMMARY: %d tests", tests); > if (failures) > printf(", %d unexpected failures", failures); > if (xfailures) > -- > 2.9.3 >