[libvirt] adding tests to qemu_driver

NoxDaFox noxdafox at gmail.com
Fri Nov 20 12:10:49 UTC 2015


2015-11-19 14:25 GMT+02:00 Jiri Denemark <jdenemar at redhat.com>:

> On Fri, Nov 13, 2015 at 10:44:01 +0200, NoxDaFox wrote:
> > 2015-11-13 0:30 GMT+02:00 Jiri Denemark <jdenemar at redhat.com>:
> >
> > > On Thu, Nov 12, 2015 at 23:47:54 +0200, noxdafox wrote:
> > > > Greetings,
> > > >
> > > > I was investigating on an issue in which QEMU's dynamic ownership was
> > > > not properly working when calling qemuDomainCoreDumpWithFormat().
> > >
> > > Could describe this issue you are investigating?
> > >
> >
> > When calling qemuDomainCoreDumpWithFormat() the file is create as
> root:root
> > even when the dynamic ownership is specified in the qemu.conf
> configuration
> > file.
>
> And what is the result? Does dumping fail because of this or does it
> work anyway?
>
> Jirka
>

The file gets dumped correctly, nevertheless it's ownership is still
root:root and not the one set in the configuration.

>From qemu.conf

# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
dynamic_ownership = 1

Now, given a user and a group, when I run qemuDomainCoreDumpWithFormat() I
get the file still belonging to root:root.

I tested the patch locally and it was working. I could create the file
anywhere and the ownership was right.

What I'd like to do though, is to refactor the function as its logic is a
bit cumbersome. Before that, I'll try to provide a set of tests to help me
during the refactoring.

It will require me a bit of time as I'm not accustomed to the code. I
provided the patch as it is, because it was suggested in the other
discussion.

Matteo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151120/264167e9/attachment-0001.htm>


More information about the libvir-list mailing list