qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] docs: Add docs/devel/testing.rst


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] docs: Add docs/devel/testing.rst
Date: Mon, 29 Jan 2018 08:36:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/29/2018 01:42 AM, Fam Zheng wrote:
> On Mon, Jan 29, 2018 at 2:56 PM, Thomas Huth <address@hidden> wrote:
>> On 29.01.2018 04:31, Fam Zheng wrote:
>> [...]
>>> +1. Create a new source file. For example, ``tests/test-foo.c``.
>> [...]
>>> +1. Create a new source file for the test. (More than one file can be added 
>>> as
>>> +   necessary.) For example, ``tests/test-foo-device.c``.  2. Write the test
>>> +   code with the glib and libqtest/libqos API. See also existing tests and 
>>> the
>>> +   library headers for reference.
>>
>> Can you please name the examples tests/foo-test.c and
>> tests/foo-device-test.c instead? Then the binaries will be covered by
>> the wildcard in tests/.gitignore automatically. Otherwise the list in
>> that gitignore file will grow and grow... Maybe it's also worth to
>> mention the naming scheme in this doc file?
> 
> Yeah, I can do it. It's just I fail to find a definitive guideline on
> test-* vs *-test for the names, and the numbers are neck-and-neck:
> 
> address@hidden:~/work/qemu [master]$ ls tests/*test.c | wc -l
> 67
> address@hidden:~/work/qemu [master]$ ls tests/test-*.c | wc -l
> 68

I'm all for a mass rename to the suffix style (as it is easier to write
a gitignore suffix), if no one can provide a good reason for the naming
difference.  (At one point, the difference was based on whether the test
was standalone or run as part of 'make check-qtest' - but I don't think
even that rule applies very well to the current state).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]