* [Qemu-devel] How to use qtest
@ 2014-05-14 7:26 Gonglei (Arei)
2014-05-14 7:34 ` Markus Armbruster
0 siblings, 1 reply; 6+ messages in thread
From: Gonglei (Arei) @ 2014-05-14 7:26 UTC (permalink / raw)
To: qemu-devel@nongnu.org; +Cc: Andreas Färber
Hi,
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!
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] How to use qtest
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)
0 siblings, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2014-05-14 7:34 UTC (permalink / raw)
To: Gonglei (Arei); +Cc: qemu-devel@nongnu.org, Andreas Färber
"Gonglei (Arei)" <arei.gonglei@huawei.com> writes:
> Hi,
>
> 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!
>
>
> Best regards,
> -Gonglei
Try "make check-help".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] How to use qtest
2014-05-14 7:34 ` Markus Armbruster
@ 2014-05-14 7:50 ` Gonglei (Arei)
2014-05-14 9:05 ` Andreas Färber
2014-05-14 9:32 ` Markus Armbruster
0 siblings, 2 replies; 6+ messages in thread
From: Gonglei (Arei) @ 2014-05-14 7:50 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel@nongnu.org, Andreas Färber
> -----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:
>
> > Hi,
> >
> > 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!
> >
> >
> > Best regards,
> > -Gonglei
>
> 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.
If I want to write some qtest by myself, any guidance? Thanks.
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] How to use qtest
2014-05-14 7:50 ` Gonglei (Arei)
@ 2014-05-14 9:05 ` Andreas Färber
2014-05-14 9:26 ` Gonglei (Arei)
2014-05-14 9:32 ` Markus Armbruster
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2014-05-14 9:05 UTC (permalink / raw)
To: Gonglei (Arei); +Cc: Markus Armbruster, qemu-devel@nongnu.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] How to use qtest
2014-05-14 9:05 ` Andreas Färber
@ 2014-05-14 9:26 ` Gonglei (Arei)
0 siblings, 0 replies; 6+ messages in thread
From: Gonglei (Arei) @ 2014-05-14 9:26 UTC (permalink / raw)
To: Andreas Färber; +Cc: Markus Armbruster, qemu-devel@nongnu.org
Hi, Andreas
> -----Original Message-----
> From: Andreas Färber [mailto:afaerber@suse.de]
> Sent: Wednesday, May 14, 2014 5:06 PM
> To: Gonglei (Arei)
> Cc: Markus Armbruster; qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] How to use qtest
>
> 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.
>
Good. Thanks!
> > 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.
>
Okay, I have noticed that patch sets you pulled.
>More concrete questions will be easier to answer. :)
>
Yep. Thank you so much!
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] How to use qtest
2014-05-14 7:50 ` Gonglei (Arei)
2014-05-14 9:05 ` Andreas Färber
@ 2014-05-14 9:32 ` Markus Armbruster
1 sibling, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2014-05-14 9:32 UTC (permalink / raw)
To: Gonglei (Arei); +Cc: qemu-devel@nongnu.org, Andreas Färber
"Gonglei (Arei)" <arei.gonglei@huawei.com> writes:
>> -----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:
>>
>> > Hi,
>> >
>> > 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!
>> >
>> >
>> > Best regards,
>> > -Gonglei
>>
>> 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.
I run just "make check". Failing tests fail the make, which is usually
all I need.
> If I want to write some qtest by myself, any guidance? Thanks.
You figure out it from existing tests and libqtest.h. There's no
tutorial, sorry.
To find existing tests, try "git-grep libqtest.h tests". Which ones to
read first depends on what kind of test you want to write.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-14 9:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-05-14 9:26 ` Gonglei (Arei)
2014-05-14 9:32 ` Markus Armbruster
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).