[libvirt] [PATCH] util: xml: Don't conflict with other libxml2 user callbacks

2018-02-23 Thread Cole Robinson
lxml is a popular python XML processing library. It uses libxml2 behind the scenes, and registers custom callbacks via xmlSetExternalEntityLoader. However this can cause crashes if if an app uses both lxml and libxml2 together in the same process. This is a known limitation of lxml and libxml2

[libvirt] [PATCH 2/2] test: Implement virConnectListAllNodeDevices

2018-02-23 Thread Cole Robinson
Signed-off-by: Cole Robinson --- src/test/test_driver.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 39784c9fa..844e99dd7 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5385,6

[libvirt] [PATCH 0/2] test: Implement virConnectListAllNodeDevices

2018-02-23 Thread Cole Robinson
First patch is prep work to teach generic nodedev code not to access host info for the test driver, which is needed to give correct results for patch 2 Cole Robinson (2): conf: nodedev: Don't refresh host caps in testdriver test: Implement virConnectListAllNodeDevices

[libvirt] [PATCH 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-02-23 Thread Cole Robinson
Add a 'testdriver' bool that we set for test_driver.c nodedevs which will skip accessing host resources via virNodeDeviceUpdateCaps Signed-off-by: Cole Robinson --- src/conf/node_device_conf.c | 3 +++ src/conf/node_device_conf.h | 1 + src/test/test_driver.c | 2 ++ 3

Re: [libvirt] [PATCH v3 01/12] tests: Add some tests for PCI controller options

2018-02-23 Thread Laine Stump
On 02/21/2018 09:14 AM, Andrea Bolognani wrote: > The input configurations set all existing options for all PCI > controllers, even those that are not valid for the controller. > As we implement validation for PCI controller options, we expect > these test to start failing. Oh, and s/test/tests/.

Re: [libvirt] [PATCH v3 01/12] tests: Add some tests for PCI controller options

2018-02-23 Thread Laine Stump
On 02/21/2018 09:14 AM, Andrea Bolognani wrote: > The input configurations set all existing options for all PCI > controllers, even those that are not valid for the controller. > As we implement validation for PCI controller options, we expect > these test to start failing. A noble cause, but

Re: [libvirt] [PATCH 00/16] some more vboxDump cleanups

2018-02-23 Thread Laine Stump
On 02/23/2018 09:27 AM, Ján Tomko wrote: > Inspired-by: Laine Stump How can I *not* at least look at the patches when you call me out like this! > Day-of-the-week: Friday <6> > > Ján Tomko (16): > vboxDumpSharedFolders: rename non-standard label > vboxDumpSharedFolders:

[libvirt] [PATCH] nwfilter: save error from DHCP snoop thread to report in main thread

2018-02-23 Thread Laine Stump
A problem encountered due to a bug in libpcap was reported to the caller as: An error occurred, but the cause is unknown This was because the error had been logged in the DHCPSnoop thread. The worker thread handling the API call to start a domain spins up the DHCPSnoop thread which watches

[libvirt] [PATCH 15/16] vboxDumpNetwork: use VIR_STEAL_PTR instead of VIR_STRDUP

2018-02-23 Thread Ján Tomko
We can steal the strings instead of creating more copies. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 8f5f04efb..1a413e4ac 100644 ---

[libvirt] [PATCH 02/16] vboxDumpSharedFolders: remove pointless comment

2018-02-23 Thread Ján Tomko
Now that the functions are separate, we no longer need comment separators. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index e1629b07f..afd00a91a 100644 ---

[libvirt] [PATCH 04/16] vboxDumpNetwork: add temp variable for current network

2018-02-23 Thread Ján Tomko
Instead of using def->nets every time, use a temporary pointer. This will allow splitting out the per-adapter code. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git

[libvirt] [PATCH 08/16] vboxDumpNetwork: allocate the network too

2018-02-23 Thread Ján Tomko
Move the allocation from vboxDumpNetworks inside vboxDumpNetwork. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 05/16] vboxDumpNetwork: rename to vboxDumpNetworks

2018-02-23 Thread Ján Tomko
Free up 'vboxDumpNetwork' for dumping single network. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 052655ca7..03266557a 100644 ---

[libvirt] [PATCH 16/16] vboxDumpNetwork: use switch for adapterType

2018-02-23 Thread Ján Tomko
Also return an error when VIR_STRDUP fails. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 12/16] vboxDumpNetwork: Use a single utf16 variable

2018-02-23 Thread Ján Tomko
There is a pattern of using two temporary utf16/utf8 variables for every value we get from VirtualBox and put in the domain definition right away. Reuse the same variable name to improve the chances of getting the function on one screen. Signed-off-by: Ján Tomko ---

[libvirt] [PATCH 13/16] vboxDumpNetwork: Use a single utf8 temp variable

2018-02-23 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index dc12bc662..2943c534d 100644 --- a/src/vbox/vbox_common.c +++

[libvirt] [PATCH 03/16] vboxDumpSharedFolders: return a value

2018-02-23 Thread Ján Tomko
The allocation errors in this function are already handled by jumping to a cleanup label. Change the return type from void to int and return -1 on error. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-)

[libvirt] [PATCH 14/16] vboxDumpNetwork: use a switch for attachmentType

2018-02-23 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 2943c534d..8f5f04efb 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c

[libvirt] [PATCH 09/16] vboxDumpNetworks: delete pointless comment

2018-02-23 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 2eb7af4ba..c730c0cc0 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3799,7

[libvirt] [PATCH 07/16] vboxDumpNetworks: reduce indentation level

2018-02-23 Thread Ján Tomko
The 'enabled' bool is initialized to false, there is no need to nest the conditions. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 10/16] vboxDumpNetworks: do not allocate def->nets upfront

2018-02-23 Thread Ján Tomko
Use VIR_APPEND_ELEMENT instead and change the return type to int to catch allocation errors. This removes the need to figure out the adapter count upfront. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 35 +-- 1 file changed, 9

[libvirt] [PATCH 11/16] vboxDumpNetwork: use virMacAddrParseHex

2018-02-23 Thread Ján Tomko
Use the virMacAddrParse helper that does not require colon-separated values instead of using extra code to format it that way. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 01/16] vboxDumpSharedFolders: rename non-standard label

2018-02-23 Thread Ján Tomko
s/sharedFoldersCleanup/cleanup/ Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 07f430878..e1629b07f 100644 --- a/src/vbox/vbox_common.c

[libvirt] [PATCH 06/16] vboxDumpNetwork: re-introduce this function

2018-02-23 Thread Ján Tomko
Split out per-adapter code from vboxDumpNetworks. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 186 + 1 file changed, 96 insertions(+), 90 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 00/16] some more vboxDump cleanups

2018-02-23 Thread Ján Tomko
Inspired-by: Laine Stump Day-of-the-week: Friday <6> Ján Tomko (16): vboxDumpSharedFolders: rename non-standard label vboxDumpSharedFolders: remove pointless comment vboxDumpSharedFolders: return a value vboxDumpNetwork: add temp variable for current network

[libvirt] [PATCH jenkins-ci] Fix workspace for python check/rpm jobs

2018-02-23 Thread Daniel P . Berrangé
The check/rpm jobs were using a different workspace to the build job, so never saw the correct content. Signed-off-by: Daniel P. Berrangé --- Pushed as a build fix for virt-manager CI jobs/python-distutils.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH] tools: avoid text spilling into variables

2018-02-23 Thread Michal Privoznik
On 01/16/2018 04:05 PM, Dariusz Gadomski wrote: > From: Christian Ehrhardt > > While libvirt-guests.sh is running cases can let guest_is_on fail which > causes check_guests_shutdown to print output. > That output shall not spill into the users of function >

Re: [libvirt] [Libvirt-ci] Build failed in Jenkins: virt-manager-master-py3-check » libvirt-debian-9 #14

2018-02-23 Thread Daniel P . Berrangé
On Thu, Feb 22, 2018 at 05:02:15PM -0500, Cole Robinson wrote: > I'm confused why this is still failing. I set up a debian9 vm, > reproduced the issue which fails about 50% of the time, and verified > that commit 059fb7d0ba1d414db3db485903972b48c1dda629 fixes it > completely, or at least I can't

[libvirt] [PATCH 2/4] travis: make all builds use VPATH

2018-02-23 Thread Daniel P . Berrangé
VPATH is not well tested by developers, so ensure travis exercises VPATH in all scenarios. Signed-off-by: Daniel P. Berrangé --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4bdf034829..41a293451c 100644 ---

[libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario

2018-02-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41a293451c..0328fcb8f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ matrix: include: - compiler: gcc

[libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck

2018-02-23 Thread Daniel P . Berrangé
Running "make distcheck" ensures that we have CLEANFILES and uninstall rules setup correctly, as well as validating VPATH builds succeeed. Signed-off-by: Daniel P. Berrangé --- .travis.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml

[libvirt] [PATCH 4/4] travis: run 'make install' during build tests

2018-02-23 Thread Daniel P . Berrangé
Running 'make install' is important to catch some VPATH problems Signed-off-by: Daniel P. Berrangé --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0328fcb8f1..61f0e38d40 100644 --- a/.travis.yml +++

[libvirt] [PATCH 0/4] Misc travis improvements

2018-02-23 Thread Daniel P . Berrangé
Various improvements to travis coverage. The first patch was posted separately yesterday too. Daniel P. Berrangé (4): travis: add a scenario for running make distcheck travis: make all builds use VPATH travis: test upstart script handling on precise distro scenario travis: run 'make

[libvirt] [PATCH] make: fix VPATH install of upstart files

2018-02-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- Pushed as a build fix src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index a7f03319c1..cb30c50f14 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3181,7

Re: [libvirt] [PATCH v1 00/16] Start to modularize src/Makefile.am

2018-02-23 Thread Michal Privoznik
On 02/22/2018 01:56 PM, Daniel P. Berrangé wrote: > The src/Makefile.am is quite large and has quite poor grouping of rules > / variables / etc. This makes it increasingly hard to identify all the > rules relating to a particular area of code. > > Traditionally one might create Makefile.am's in

Re: [libvirt] [PATCH V2] libxl: round memory values to next 1MiB increment

2018-02-23 Thread Peter Krempa
On Thu, Feb 22, 2018 at 10:31:48 -0700, Jim Fehlig wrote: > libxl requires the memory sizes to be rounded to 1MiB increments. > Attempting to start a domain that violates this requirement will > fail with the marginally helpful error > > 2018-02-22 01:55:32.921+: xc: panic: xc_dom_boot.c:141:

Re: [libvirt] [PATCH] libvirt.spec.in: Don't distribute libvirtd.upstart

2018-02-23 Thread Pavel Hrdina
On Fri, Feb 23, 2018 at 09:50:38AM +0100, Michal Privoznik wrote: > Firstly, for rpm we are building libvirt with > --init-script=systemd or --init-script=redhat. So upstart is > never enabled. And only due to a bug we installed > libvirtd.upstart file. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 0/3] qemu: Fix updating device with boot order

2018-02-23 Thread Michal Privoznik
On 02/22/2018 03:21 PM, Jiri Denemark wrote: > Commit v3.7.0-14-gc57f3fd2f8 prevented adding a > element to an inactive domain with global element. > However, as a result of that change updating any device with boot order > would fail with 'boot order X is already used by another device', where

Re: [libvirt] [PATCH] qemu_hotplug: Drop dead code in net update

2018-02-23 Thread Michal Privoznik
On 02/22/2018 03:00 PM, Jiri Denemark wrote: > vm->def->nets[changeidx] can never be NULL for changeidx returned by > virDomainNetFindIdx. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_hotplug.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > ACK

[libvirt] [PATCH] libvirt.spec.in: Don't distribute libvirtd.upstart

2018-02-23 Thread Michal Privoznik
Firstly, for rpm we are building libvirt with --init-script=systemd or --init-script=redhat. So upstart is never enabled. And only due to a bug we installed libvirtd.upstart file. Signed-off-by: Michal Privoznik --- libvirt.spec.in | 1 - 1 file changed, 1 deletion(-) diff