Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrew Jones <drjones@redhat.com>, jan.kiszka@siemens.com
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH][RFC] kvm-unit-tests: report: add report_skip
Date: Tue, 17 Jun 2014 14:46:30 +0200	[thread overview]
Message-ID: <53A038A6.1050503@redhat.com> (raw)
In-Reply-To: <1403007674-18481-1-git-send-email-drjones@redhat.com>

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

  reply	other threads:[~2014-06-17 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 12:21 [PATCH][RFC] kvm-unit-tests: report: add report_skip Andrew Jones
2014-06-17 12:46 ` Paolo Bonzini [this message]
2014-06-17 13:53   ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A038A6.1050503@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=drjones@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox