From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH][RFC] kvm-unit-tests: report: add report_skip Date: Tue, 17 Jun 2014 14:46:30 +0200 Message-ID: <53A038A6.1050503@redhat.com> References: <1403007674-18481-1-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Andrew Jones , jan.kiszka@siemens.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754962AbaFQMqg (ORCPT ); Tue, 17 Jun 2014 08:46:36 -0400 In-Reply-To: <1403007674-18481-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 17/06/2014 14:21, Andrew Jones ha scritto: > would look better as > > report(msg1, cond1) -> FAIL > report_skip(msg2, !cond1, cond1 && cond2) -> SKIP > report_skip(msg3, !cond1, cond1 && cond3) -> SKIP I think a lot of the time there is other code before the report that you want to skip. Is anything more a "report_skip(msg1);" (that print a SKIP message) that useful? So you can do if (!(msr & 0x1000) { report_skip("Frob bit 12 of msr"); return; } Unless what you really want is not a SKIP but an expected failure, then I agree with the idea. Something like report_xfail(msg2, cond1, cond2) would print: PASS if cond1 = false, cond2 = true FAIL if cond1 = false, cond2 = false XPASS if cond1 = true, cond2 = true XFAIL if cond1 = true, cond2 = false An XPASS would ultimately exit with status 1, just like a FAIL. Paolo