[libvirt] [PATCH 07/24] tests: utils: Add virTestLoadFilePath helper

Peter Krempa pkrempa at redhat.com
Thu Jul 27 07:38:03 UTC 2017


On Wed, Jul 26, 2017 at 10:46:56 -0500, Eric Blake wrote:
> On 07/26/2017 08:39 AM, Eric Blake wrote:
> > On 07/26/2017 05:00 AM, Peter Krempa wrote:
> >> This new helper loads and returns a file from 'abs_srcdir'. By using
> >> variable arguments for the function, it's not necessary to format the
> >> path separately in the test cases.
> >> ---
> >>  tests/testutils.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >>  tests/testutils.h |  2 ++
> >>  2 files changed, 53 insertions(+)

[...]

> > --- a/tests/testutils.h
> > +++ b/tests/testutils.h
> > @@ -52,6 +52,8 @@ int virTestRun(const char *title,
> >                 int (*body)(const void *data),
> >                 const void *data);
> >  int virTestLoadFile(const char *file, char **buf);
> > +char *virTestLoadFilePath(const char *p, ...)
> > +    ATTRIBUTE_SENTINEL;
> 
> I like to use git's orderfile directive, so that my patches always list
> .h changes first (when reviewing, it's nicer to see the interface
> changes before the implementations); maybe libvirt should copy this idea
> from qemu:
> https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06438.html

That is indeed useful. We can also de-prioritize utils and testsuite
changes so that the driver changes pop out first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170727/d8d06025/attachment-0001.sig>


More information about the libvir-list mailing list