qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] How to use qtest
Date: Wed, 14 May 2014 11:05:48 +0200	[thread overview]
Message-ID: <537331EC.4080806@suse.de> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020815E885C@SZXEMA503-MBS.china.huawei.com>

Hi,

Am 14.05.2014 09:50, schrieb Gonglei (Arei):
>> -----Original Message-----
>> From: Markus Armbruster [mailto:armbru@redhat.com]
>> Sent: Wednesday, May 14, 2014 3:34 PM
>> To: Gonglei (Arei)
>> Cc: qemu-devel@nongnu.org; Andreas Färber
>> Subject: Re: [Qemu-devel] How to use qtest
>>
>> "Gonglei (Arei)" <arei.gonglei@huawei.com> writes:
>>
>>> I know qemu has a test framework, and I get some information
>>> from http://wiki.qemu.org/Features/QTest
>>>
>>> Recently I want to use qtest for some modules, but I have no idea
>>> how to run those tests. Such as tests/ e1000-test
>>>
>>> Any guidance? Or how to? Thanks in advance!
>>
>> Try "make check-help".
> 
> Thanks!
> Is there two steps for qtest?
> First, "make check" for running tests, 
> Second, make "check-report.html" for getting results.

No, "make check V=1" shows you the progress as well. The HTML or XML
reports are only necessary for some more verbose info/warning messages
and for automated reporting purposes.

> If I want to write some qtest by myself, any guidance? Thanks.

Use out-of-tree builds. One for your regular development and testing,
one for gcov coverage testing. The latter (--enable-gcov) will dump
statistics about test coverage and allow you to verify you got the paths
for new tests right (it's not the source code paths but the paths to the
.o files actually, with target-i386 as placeholder for target-*).

There's a lot of stubs that I've been adding recently that you can copy
(see git history for how to add them to Makefile); for functional tests
see libqtest.h and the libqos/ subdirectory and grep for existing tests
that use those functions. More concrete questions will be easier to
answer. :)

Thanks in advance for your efforts!

Best regards,

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-05-14  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  7:26 [Qemu-devel] How to use qtest Gonglei (Arei)
2014-05-14  7:34 ` Markus Armbruster
2014-05-14  7:50   ` Gonglei (Arei)
2014-05-14  9:05     ` Andreas Färber [this message]
2014-05-14  9:26       ` Gonglei (Arei)
2014-05-14  9:32     ` Markus Armbruster

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=537331EC.4080806@suse.de \
    --to=afaerber@suse.de \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).