From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkV8O-0004MU-MB for qemu-devel@nongnu.org; Wed, 14 May 2014 05:06:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkV8J-0001oc-GV for qemu-devel@nongnu.org; Wed, 14 May 2014 05:05:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42601 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkV8J-0001oQ-9t for qemu-devel@nongnu.org; Wed, 14 May 2014 05:05:51 -0400 Message-ID: <537331EC.4080806@suse.de> Date: Wed, 14 May 2014 11:05:48 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <33183CC9F5247A488A2544077AF19020815E87F1@SZXEMA503-MBS.china.huawei.com> <87ha4slsp5.fsf@blackfin.pond.sub.org> <33183CC9F5247A488A2544077AF19020815E885C@SZXEMA503-MBS.china.huawei.com> In-Reply-To: <33183CC9F5247A488A2544077AF19020815E885C@SZXEMA503-MBS.china.huawei.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] How to use qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=E4rber >> Subject: Re: [Qemu-devel] How to use qtest >> >> "Gonglei (Arei)" 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". >=20 > Thanks! > Is there two steps for qtest? > First, "make check" for running tests,=20 > Second, make "check-report.html" for getting results. No, "make check V=3D1" 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg