All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Lucas Meneghel Rodrigues <lmr@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm-unit-test: more documentation and runner script
Date: Thu, 28 Feb 2013 11:51:40 +0200	[thread overview]
Message-ID: <20130228095140.GV23616@redhat.com> (raw)
In-Reply-To: <20130228094533.GB7806@redhat.com>

On Thu, Feb 28, 2013 at 11:45:33AM +0200, Michael S. Tsirkin wrote:
> On Thu, Feb 28, 2013 at 11:06:20AM +0200, Gleb Natapov wrote:
> > On Wed, Feb 27, 2013 at 11:40:37PM +0200, Michael S. Tsirkin wrote:
> > > On Wed, Feb 27, 2013 at 06:03:41PM -0300, Lucas Meneghel Rodrigues wrote:
> > > > On 02/27/2013 05:44 PM, Michael S. Tsirkin wrote:
> > > > >>>+Using qemu (supported since qemu 1.3):
> > > > >>>+qemu-system-x86_64 -enable-kvm -device pc-testdev -serial stdio -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel ./x86/msr.flat
> > > > >>
> > > > >>I think it is worth here to point out that with new qemu, after the
> > > > >>unittest is done, the exit status of qemu is 1, different from the
> > > > >>'old style', whose exit status in successful completion is 0.
> > > > 
> > > > ^ "comment above"
> > > > 
> > > > >>
> > > > >>>+exec ${command} "$@"
> > > > >>
> > > > >>^ What about checking the exit status of qemu here and print
> > > > >>something like "test $@ PASS" or "test $@ FAIL"?
> > > > >
> > > > >How do we know how to interpret it?
> > > > >Overall I think it's best to rely on test output
> > > > >than on return status.
> > > > 
> > > > See comment above. Well, test output may be good for humans, but it
> > > > is really not good for machines [1], that's why when the test suite
> > > > was developed, the convention was to make qemu to exit with a given
> > > > return code on success and others on failure.
> > > 
> > > Right but given a qemu binary, how do I find out what it is on success
> > > and what it is on failure?
> > > 
> > Since you know what device you are using you know expected value for
> > successful/failure.
> 
> So exit status is 1 for success 0 for failure?
> 
As Lucas said above upstream is different from qemu-kvm unfortunately.
On upstream you need to shift return value right for 1 bit to get to
the tests return value (why?) and then 0 will be success otherwise failure.

--
			Gleb.

  reply	other threads:[~2013-02-28  9:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 15:55 [PATCH] kvm-unit-test: more documentation and runner script Michael S. Tsirkin
2013-02-27 18:10 ` Lucas Meneghel Rodrigues
2013-02-27 20:44   ` Michael S. Tsirkin
2013-02-27 21:03     ` Lucas Meneghel Rodrigues
2013-02-27 21:40       ` Michael S. Tsirkin
2013-02-28  9:06         ` Gleb Natapov
2013-02-28  9:45           ` Michael S. Tsirkin
2013-02-28  9:51             ` Gleb Natapov [this message]
2013-02-28 12:32               ` Lucas Meneghel Rodrigues

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=20130228095140.GV23616@redhat.com \
    --to=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    --cc=mst@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.