Re: [libvirt] [PATCH 7/9] conf: Refactor virDomainCachetuneDefParse

2018-07-27 Thread bing.niu
On 2018年07月28日 00:58, John Ferlan wrote: [...] Secondary to that you've added a new error related to identical vcpus in the parsing logic. Unfortunately that could make a domain disappear on a libvirtd restart if for some reason it was already defined in that manner. If there's a parsing

Re: [libvirt] [PATCH v2] util: clang is failing to compile due to unused variables.

2018-07-27 Thread John Ferlan
On 07/27/2018 05:17 PM, Julio Faracco wrote: > After some recent patches, clang is throwing some errors related to > unused variables. This is not happening when we use GCC with -Werror > enabled. Only clang reports this warning. > > make[3]: Entering directory

[libvirt] [PATCH] Remove unnecessary virQEMUDriverPtr arguments

2018-07-27 Thread Steven Albertson
Signed-off-by Steven Albertson --- src/qemu/qemu_block.c | 15 +++ src/qemu/qemu_block.h | 6 ++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 66e6301210..8081bced9d 100644 --- a/src/qemu/qemu_block.c +++

[libvirt] [PATCH v2] util: clang is failing to compile due to unused variables.

2018-07-27 Thread Julio Faracco
After some recent patches, clang is throwing some errors related to unused variables. This is not happening when we use GCC with -Werror enabled. Only clang reports this warning. make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src' CC util/libvirt_util_la-virscsivhost.lo

Re: [libvirt] [PATCH] util: clang is failing due to unused variables.

2018-07-27 Thread Julio Faracco
Ow, I was pretty sure that clang would complain about not handling the function return properly. Well, I changed it and clang is not throwing any error. Weird! Sending a V2. Michael's patch was applied, so we need a new one to remove the other occurrences. Em sex, 27 de jul de 2018 às 17:59,

Re: [libvirt] [PATCH] util: clang is failing due to unused variables.

2018-07-27 Thread Eric Blake
On 07/27/2018 03:58 PM, John Ferlan wrote: On 07/27/2018 04:50 PM, Julio Faracco wrote: After some recent patches, clang is throwing some errors related to unused variables. This is not happening when we use GCC with -Werror enabled. Only clang reports this warning. make[3]: Entering

Re: [libvirt] [PATCH] util: clang is failing due to unused variables.

2018-07-27 Thread John Ferlan
On 07/27/2018 04:50 PM, Julio Faracco wrote: > After some recent patches, clang is throwing some errors related to > unused variables. This is not happening when we use GCC with -Werror > enabled. Only clang reports this warning. > > make[3]: Entering directory

[libvirt] [PATCH] util: clang is failing due to unused variables.

2018-07-27 Thread Julio Faracco
After some recent patches, clang is throwing some errors related to unused variables. This is not happening when we use GCC with -Werror enabled. Only clang reports this warning. make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src' CC util/libvirt_util_la-virscsivhost.lo

Re: [libvirt] [PATCH] audit: Share virtType fallback logic

2018-07-27 Thread John Ferlan
On 07/26/2018 01:59 PM, Cole Robinson wrote: > Signed-off-by: Cole Robinson > --- > src/conf/domain_audit.c | 91 + > 1 file changed, 28 insertions(+), 63 deletions(-) > Reviewed-by: John Ferlan John -- libvir-list mailing list

Re: [libvirt] [PATCH 7/9] conf: Refactor virDomainCachetuneDefParse

2018-07-27 Thread John Ferlan
[...] >> >> Secondary to that you've added a new error related to identical vcpus in >> the parsing logic. Unfortunately that could make a domain disappear on a >> libvirtd restart if for some reason it was already defined in that >> manner. If there's a parsing error because two entries had

[libvirt] [PATCH] virpci: Drop unused @ret in virPCIDeviceListDel

2018-07-27 Thread Michal Privoznik
So after 00dc991ca16730 the function is one line long and the line is declaring a variable which is never used in fact. Replace it with actual free() call instead of autofree. Signed-off-by: Michal Privoznik --- Pushed under build breaker rule as this is causing clang to complain. Huh, who uses

Re: [libvirt] [PATCH v3 1/3] qemuxml2argvtest: Set more fake drivers

2018-07-27 Thread Michal Privoznik
On 07/27/2018 05:29 PM, Daniel P. Berrangé wrote: > On Fri, Jul 27, 2018 at 05:24:45PM +0200, Michal Privoznik wrote: >> So far we are setting only fake secret and storage drivers. >> Therefore if the code wants to call a public NWFilter API (like >> qemuBuildInterfaceCommandLine() and

Re: [libvirt] [PATCH v3 1/3] qemuxml2argvtest: Set more fake drivers

2018-07-27 Thread Daniel P . Berrangé
On Fri, Jul 27, 2018 at 05:24:45PM +0200, Michal Privoznik wrote: > So far we are setting only fake secret and storage drivers. > Therefore if the code wants to call a public NWFilter API (like > qemuBuildInterfaceCommandLine() and qemuBuildNetCommandLine() are > doing) the virGetConnectNWFilter()

Re: [libvirt] [PATCH v2 00/41] use GNU C's cleanup attribute in src/util (batch II)

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:01PM +0530, Sukrit Bhatnagar wrote: > This second series of patches also modifies a few files in src/util > to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory > and get rid of some VIR_FREE macro invocations and *Free function > calls. > > The

[libvirt] [PATCH v3 1/3] qemuxml2argvtest: Set more fake drivers

2018-07-27 Thread Michal Privoznik
So far we are setting only fake secret and storage drivers. Therefore if the code wants to call a public NWFilter API (like qemuBuildInterfaceCommandLine() and qemuBuildNetCommandLine() are doing) the virGetConnectNWFilter() function will try to actually spawn session daemon because there's no

[libvirt] [PATCH v3 0/3] Don't touch user data from tests

2018-07-27 Thread Michal Privoznik
v3 of: https://www.redhat.com/archives/libvir-list/2018-July/msg00747.html diff to v2: - pushed some already ACKed patches - dropped controversial line from 1/3 that turned off error reporting Michal Prívozník (3): qemuxml2argvtest: Set more fake drivers check-file-access: Allow specifying

[libvirt] [PATCH v3 3/3] virtestmock: Track action

2018-07-27 Thread Michal Privoznik
As advertised in the previous commit, we need the list of accessed files to also contain action that caused the $path to appear on the list. Not only this enables us to fine tune our white list rules it also helps us to see why $path is reported. For instance:

[libvirt] [PATCH v3 2/3] check-file-access: Allow specifying action

2018-07-27 Thread Michal Privoznik
The check-file-access.pl script is used to match access list generated by virtestmock against whitelisted rules stored in file_access_whitelist.txt. So far the rules are in form: $path: $progname: $testname This is not sufficient because the rule does not take into account 'action' that caused

Re: [libvirt] [PATCH 2/3] lxc: Turn @veths into a string list in virLXCProcessStart

2018-07-27 Thread Erik Skultety
On Fri, Jul 27, 2018 at 05:02:36PM +0200, Erik Skultety wrote: > On Fri, Jul 27, 2018 at 02:34:41PM +0200, Michal Privoznik wrote: > > On 07/27/2018 10:37 AM, Erik Skultety wrote: > > > On Thu, Jul 26, 2018 at 05:36:28PM +0200, Michal Privoznik wrote: > > >> This way it will be easier to use

Re: [libvirt] [PATCH 2/3] lxc: Turn @veths into a string list in virLXCProcessStart

2018-07-27 Thread Erik Skultety
On Fri, Jul 27, 2018 at 02:34:41PM +0200, Michal Privoznik wrote: > On 07/27/2018 10:37 AM, Erik Skultety wrote: > > On Thu, Jul 26, 2018 at 05:36:28PM +0200, Michal Privoznik wrote: > >> This way it will be easier to use autofree. > >> > >> Signed-off-by: Michal Privoznik > >> --- > >>

[libvirt] Plans for next release

2018-07-27 Thread Daniel Veillard
So we are getting very close to the end of the month, I suggest to enter freeze tomorrow morning, then plan for an RC2 on Tuesday, that way if everythiong goes well next release would be on Thursday 2nd Aug, I hope this is fine with everyone's schedule, thanks, Daniel -- Daniel

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-27 Thread Erik Skultety
On Thu, Jul 26, 2018 at 06:04:10PM +0200, Cornelia Huck wrote: > On Thu, 26 Jul 2018 17:43:45 +0200 > Erik Skultety wrote: > > > On Thu, Jul 26, 2018 at 05:30:07PM +0200, Cornelia Huck wrote: > > > One thing I noticed is that we have seem to have an optional (?) > > > vendor-driver created

Re: [libvirt] [PATCH v2 37/41] util: iscsi: use VIR_AUTOPTR for aggregate types

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:38PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

Re: [libvirt] [PATCH v2 28/41] util: scsi: use VIR_AUTOPTR for aggregate types

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:29PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

Re: [libvirt] [PATCH v2 RESEND 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-07-27 Thread Andrea Bolognani
On Fri, 2018-07-27 at 15:53 +0800, Yi Min Zhao wrote: > 在 2018/7/24 下午11:09, Andrea Bolognani 写道: > > Also, do you really need to check both the flags and the presence > > of the zPCI address bits? It looks like either one or the other > > should be enough or, if that's not the case, it should be

Re: [libvirt] [PATCH v2 25/41] util: usb: use VIR_AUTOPTR for aggregate types

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:26PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

Re: [libvirt] [PATCH v2 22/41] util: usb: modify virUSBDeviceListAdd to take double pointer

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:23PM +0530, Sukrit Bhatnagar wrote: > Modify virUSBDeviceListAdd to take a double pointer to > virUSBDevicePtr as the second argument. This will enable usage > of cleanup macros upon the virUSBDevicePtr item which is to be > added to the list as it will be cleared by

Re: [libvirt] [PATCH] news: Usb and sata for virsh attach-disk --address

2018-07-27 Thread Michal Privoznik
On 07/26/2018 03:33 PM, Han Han wrote: > Signed-off-by: Han Han > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) ACKed and pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [dbus PATCH 0/4] Fix 'make check' with libvirt 3.0.0

2018-07-27 Thread Katerina Koukiou
On Fri, Jul 27, 2018 at 02:37:37PM +0200, Andrea Bolognani wrote: > Andrea Bolognani (4): > tests: Drop pytest.mark.usefixtures from test_nodedev > tests: Move some test cases to test_nodedev > tests: Don't open-code node_device_create() > tests: Make node_device_create() work with libvirt

Re: [libvirt] [dbus PATCH 2/4] tests: Move some test cases to test_nodedev

2018-07-27 Thread Katerina Koukiou
On Fri, Jul 27, 2018 at 02:37:39PM +0200, Andrea Bolognani wrote: > For whatever reason, a few nodedev-related test cases > have ended up in test_connect instead of the more > appropriate test_nodedev. Move them. > > Signed-off-by: Andrea Bolognani > ---

[libvirt] [dbus PATCH] gitignore: Ignore Vim swap files

2018-07-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e89a5d3..b4abf66 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.log *.o *.pyc +*.swp *.trs *Makefile *Makefile.in -- 2.17.1 --

[libvirt] [dbus PATCH 4/4] tests: Make node_device_create() work with libvirt 3.0.0

2018-07-27 Thread Andrea Bolognani
The scsi_host2 nodedev, which our test nodedev uses as its parent, was added to the test driver with commit 5c2ff641e10c, which is included in libvirt 3.1.0; before that, there was a similar device called test-scsi-host-vport, which is no longer present after libvirt 3.0.0. Since there's no

[libvirt] [dbus PATCH 3/4] tests: Don't open-code node_device_create()

2018-07-27 Thread Andrea Bolognani
The fixture is pretty trivial right now, so open-coding it is not a big deal; however, we're going to add more logic to it soon and we definitely don't want to end up having to worry about duplicated code. Signed-off-by: Andrea Bolognani --- tests/test_nodedev.py | 3 +-- 1 file changed, 1

[libvirt] [dbus PATCH 1/4] tests: Drop pytest.mark.usefixtures from test_nodedev

2018-07-27 Thread Andrea Bolognani
We're already using node_device_create explicitly for all test cases in order to retrieve the result of the fixture, so using pytest.mark.usefixtures as well is pointless. Additionally, we're soon going to add some test cases where we need the fixture *not* to run automatically. Signed-off-by:

[libvirt] [dbus PATCH 2/4] tests: Move some test cases to test_nodedev

2018-07-27 Thread Andrea Bolognani
For whatever reason, a few nodedev-related test cases have ended up in test_connect instead of the more appropriate test_nodedev. Move them. Signed-off-by: Andrea Bolognani --- tests/test_connect.py | 27 --- tests/test_nodedev.py | 26 ++ 2 files

[libvirt] [dbus PATCH 0/4] Fix 'make check' with libvirt 3.0.0

2018-07-27 Thread Andrea Bolognani
Andrea Bolognani (4): tests: Drop pytest.mark.usefixtures from test_nodedev tests: Move some test cases to test_nodedev tests: Don't open-code node_device_create() tests: Make node_device_create() work with libvirt 3.0.0 tests/libvirttest.py | 17 - tests/test_connect.py

[libvirt] [PATCH] lxc: Don't return early in virLXCProcessSetupInterfaces

2018-07-27 Thread Michal Privoznik
There are two places in the loop body that just return instead of jumping onto the cleanup label. The problem is the cleanup code is not ran in those cases. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/lxc/lxc_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [libvirt] [PATCH 2/3] lxc: Turn @veths into a string list in virLXCProcessStart

2018-07-27 Thread Michal Privoznik
On 07/27/2018 10:37 AM, Erik Skultety wrote: > On Thu, Jul 26, 2018 at 05:36:28PM +0200, Michal Privoznik wrote: >> This way it will be easier to use autofree. >> >> Signed-off-by: Michal Privoznik >> --- >> src/lxc/lxc_process.c | 24 +--- >> 1 file changed, 9 insertions(+),

Re: [libvirt] [PATCH v2 4/4] Documentation/vfio-mediated-device.txt: update for aggregation attribute

2018-07-27 Thread Cornelia Huck
On Fri, 27 Jul 2018 10:16:58 +0800 Zhenyu Wang wrote: > On 2018.07.26 17:46:40 +0200, Cornelia Huck wrote: > > On Fri, 20 Jul 2018 10:19:28 +0800 > > Zhenyu Wang wrote: > > > > > Update mdev doc on new aggregration attribute and instances attribute > > > for mdev. > > > > > > Cc: Kirti

Re: [libvirt] [PATCH v2 10/41] util: cgroup: use VIR_AUTOPTR for aggregate types

2018-07-27 Thread Erik Skultety
On Tue, Jul 24, 2018 at 09:22:11PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

Re: [libvirt] [RFC] secdrivers remembering original labels

2018-07-27 Thread Daniel P . Berrangé
On Fri, Jul 27, 2018 at 01:27:40PM +0200, Michal Privoznik wrote: > On 07/27/2018 11:01 AM, Daniel P. Berrangé wrote: > > On Fri, Jul 27, 2018 at 09:56:23AM +0200, Michal Privoznik wrote: > >> Dear list, > >> > >> we have this very old bug [1] that I just keep pushing in front of me. I > >> made

Re: [libvirt] [RFC] secdrivers remembering original labels

2018-07-27 Thread Michal Privoznik
On 07/27/2018 11:01 AM, Daniel P. Berrangé wrote: > On Fri, Jul 27, 2018 at 09:56:23AM +0200, Michal Privoznik wrote: >> Dear list, >> >> we have this very old bug [1] that I just keep pushing in front of me. I >> made several attempts to fix it. However, none of them made into the >> tree. I

Re: [libvirt] libvirt-dbus build for virt-preview

2018-07-27 Thread Pavel Hrdina
On Fri, Jul 27, 2018 at 12:38:47PM +0300, Vasiliy Tolstov wrote: > Hi! Does it possible to add libvirt-dbus building for virt-preview repo? > My use case - get latest libvirt-dbus in current fedora stable release. Hi, I guess that we can do that, in the future it will be definitely useful, but

[libvirt] libvirt-dbus build for virt-preview

2018-07-27 Thread Vasiliy Tolstov
Hi! Does it possible to add libvirt-dbus building for virt-preview repo? My use case - get latest libvirt-dbus in current fedora stable release. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC 0/2] util: Add VIR_ENUM_IMPL_LABEL

2018-07-27 Thread Daniel P . Berrangé
On Fri, Jul 27, 2018 at 11:17:13AM +0200, Michal Privoznik wrote: > On 07/26/2018 07:49 PM, Cole Robinson wrote: > > This series adds VIR_ENUM_IMPL_LABEL and a demo conversion. > > > > VIR_ENUM_IMPL_LABEL allows passing in a string that briefly > > describes the value the enum represents, which

Re: [libvirt] [PATCH RFC 0/2] util: Add VIR_ENUM_IMPL_LABEL

2018-07-27 Thread Michal Privoznik
On 07/26/2018 07:49 PM, Cole Robinson wrote: > This series adds VIR_ENUM_IMPL_LABEL and a demo conversion. > > VIR_ENUM_IMPL_LABEL allows passing in a string that briefly > describes the value the enum represents, which we use to > generate error messages for FromString and ToString > function

Re: [libvirt] [PATCH RFC 1/2] util: Add VIR_ENUM_IMPL_LABEL

2018-07-27 Thread Michal Privoznik
On 07/26/2018 07:49 PM, Cole Robinson wrote: > This allows passing in a string label describing the enum, which can > be used to autogenerate error messages > > Signed-off-by: Cole Robinson > --- > src/util/virutil.c | 20 > src/util/virutil.h | 15 ++- > 2

Re: [libvirt] [RFC] secdrivers remembering original labels

2018-07-27 Thread Daniel P . Berrangé
On Fri, Jul 27, 2018 at 09:56:23AM +0200, Michal Privoznik wrote: > Dear list, > > we have this very old bug [1] that I just keep pushing in front of me. I > made several attempts to fix it. However, none of them made into the > tree. I guess it's time to have discussion what to do about it.

Re: [libvirt] [PATCH 3/3] lxc: Use VIR_AUTOPTR for @veths in virLXCProcessStart

2018-07-27 Thread Erik Skultety
On Thu, Jul 26, 2018 at 05:36:29PM +0200, Michal Privoznik wrote: > Now that we have VIR_AUTOPTR and that @veths is a string list we > can use VIR_AUTOPTR to free it automagically. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Erik Skultety -- libvir-list mailing list

Re: [libvirt] [PATCH RFC 00/39] qemu: Add support for -blockdev

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 10:01 hat Peter Krempa geschrieben: > On Thu, Jul 26, 2018 at 17:04:19 +0800, Fam Zheng wrote: > > On Thu, 07/26 10:44, Kevin Wolf wrote: > > > Am 25.07.2018 um 17:57 hat Peter Krempa geschrieben: > > > > This series adds support for starting and hotplug of disks with > > > >

Re: [libvirt] [PATCH 2/3] lxc: Turn @veths into a string list in virLXCProcessStart

2018-07-27 Thread Erik Skultety
On Thu, Jul 26, 2018 at 05:36:28PM +0200, Michal Privoznik wrote: > This way it will be easier to use autofree. > > Signed-off-by: Michal Privoznik > --- > src/lxc/lxc_process.c | 24 +--- > 1 file changed, 9 insertions(+), 15 deletions(-) > > diff --git

Re: [libvirt] [PATCH 1/3] util: Rework virStringListAdd

2018-07-27 Thread Erik Skultety
On Thu, Jul 26, 2018 at 05:36:27PM +0200, Michal Privoznik wrote: > So every caller does the same: they use virStringListAdd() to add ^This sounds a bit like there's a handful of them ;). > new item into the list and then free the old copy to replace it > with new list. It's not very memory

Re: [libvirt] [PATCH RFC 00/39] qemu: Add support for -blockdev

2018-07-27 Thread Peter Krempa
On Thu, Jul 26, 2018 at 17:04:19 +0800, Fam Zheng wrote: > On Thu, 07/26 10:44, Kevin Wolf wrote: > > Am 25.07.2018 um 17:57 hat Peter Krempa geschrieben: > > > This series adds support for starting and hotplug of disks with > > > -blockdev/blockdev-add. > > > > > > Blockjobs are not supported

[libvirt] [RFC] secdrivers remembering original labels

2018-07-27 Thread Michal Privoznik
Dear list, we have this very old bug [1] that I just keep pushing in front of me. I made several attempts to fix it. However, none of them made into the tree. I guess it's time to have discussion what to do about it. IIRC, the algorithm that I implemented last was to keep original label in XATTRs

Re: [libvirt] [PATCH v2 RESEND 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-07-27 Thread Yi Min Zhao
在 2018/7/24 下午11:09, Andrea Bolognani 写道: On Tue, 2018-07-10 at 16:02 +0800, Yi Min Zhao wrote: [...] +bool +qemuCheckDeviceIsZPCI(virDomainDeviceInfoPtr info) +{ +if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && +((info->pciAddressExtFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI)