From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH kvm-unit-tests 1/6] lib/report: allow test skipping Date: Tue, 15 Dec 2015 13:54:49 +0100 Message-ID: <20151215125449.GA20852@potion.brq.redhat.com> References: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> <1450128261-21170-2-git-send-email-rkrcmar@redhat.com> <20151214220019.GB3633@hawk.localdomain> <20151214221219.GF3633@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]:41909 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbbLOMyx (ORCPT ); Tue, 15 Dec 2015 07:54:53 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id F0ED08E254 for ; Tue, 15 Dec 2015 12:54:52 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20151214221219.GF3633@hawk.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: 2015-12-14 16:12-0600, Andrew Jones: > On Mon, Dec 14, 2015 at 04:00:19PM -0600, Andrew Jones wrote: >> On Mon, Dec 14, 2015 at 10:24:16PM +0100, Radim Kr=C4=8Dm=C3=A1=C5=99= wrote: >> > --- >> > diff --git a/lib/libcflat.h b/lib/libcflat.h >> > -void va_report_xfail(const char *msg_fmt, bool xfail, bool cond, = va_list va) >> > +void va_report(const char *msg_fmt, bool pass, bool xfail, bool s= kip, va_list va) >>=20 >> Line greater than 80 char here. Yes, that was supposed to induce an = eye >> roll. But... this file doesn't have any "long" lines yet, so we coul= d >> continue avoiding them. Ah, yeah, young'uns these days ... >> > diff --git a/run_tests.sh b/run_tests.sh >> > index fad22a935b00..4d813b9a7084 100755 >> > --- a/run_tests.sh >> > +++ b/run_tests.sh >> > @@ -55,12 +55,15 @@ function run() >> > # extra_params in the config file may contain backticks that = need to be >> > # expanded, so use eval to start qemu >> > eval $cmdline >> test.log >> > + # The first bit of return value is too hard to use, just skip= it. >> > + # Unit-tests' return value is shifted by one. >> > + case $(($? >> 1)) in >> > + 0) echo -ne "\e[32mPASS\e[0m" ;; >> > + 77) echo -ne "skip" ;; >>=20 >> Why not "\e[31mSKIP\e[0m"? (and without those escape sequences echo = doesn't >> need -e) >=20 > oops, copy+paste error, I meant to put use color code 33 (yellow). Will do. (I started with yellow SKIP, but then kept white skip as I didn't research the reason why it was chosen.)