qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 02/29] tests: Sort .gitignore


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v6 02/29] tests: Sort .gitignore
Date: Tue, 5 Sep 2017 11:10:03 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Tue, Sep 05, 2017 at 11:53:22AM +0200, Markus Armbruster wrote:
> Thomas Huth <address@hidden> writes:
> 
> > On 01.09.2017 20:03, Eric Blake wrote:
> >> It doesn't matter if things are unsorted, but finding stuff in a list
> >> is easier when it is sorted.  (Sorted under LC_ALL=C rules, rather than
> >> en_US.UTF-8).
> >> 
> >> Signed-off-by: Eric Blake <address@hidden>
> >> ---
> >>  tests/.gitignore | 30 +++++++++++++++---------------
> >>  1 file changed, 15 insertions(+), 15 deletions(-)
> >
> > Reviewed-by: Thomas Huth <address@hidden>
> >
> > BTW, did you note the patch "build-sys: generate tests/.gitignore" from
> > Marc-André ? Maybe the list can be generated automatically, too...
> >
> >> diff --git a/tests/.gitignore b/tests/.gitignore
> >> index 64ecd6683b..8d35a58751 100644
> >> --- a/tests/.gitignore
> >> +++ b/tests/.gitignore
> >> @@ -1,25 +1,27 @@
> >> +*-test
> >
> > ... but looking at this wildcard, I wonder if we just named most of our
> > tests in a bad way. If we name the files something-test instead of
> > test-something, we maybe do not need the automatic generation from
> > Marc-André (which is kind of ugly because it writes to the source
> > directory - and this should not happen when doing out of tree builds).
> >
> > So what do you think about renaming our tests, so that the above
> > wildcard applies instead?
> 
> Apropos naming tests: there's an (unspoken) convention to name unit
> tests check-FOO or test-FOO and tests using libqtest FOO-test, but it's
> not really honored anymore, probably because people creating tests
> didn't know about it.

$ ls *test.c | wc -l
67
$ ls test*.c | wc -l
73
$ ls check*.c | wc -l
8

Fairly even split between 'test' as a prefix vs suffix. 'check' as a
prefix should clearly be killed as a minority pattern. Any appetite
for standardizing naming of everything else ?

A further idea might be to actually have separate sub-directories for
unit tests vs qtests. eg go for

  tests
    +- unit
    +- qtest
    +- iotests

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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