[libvirt] [PATCH] secret: Add check/validation for correct usage when LookupByUUID

2018-12-04 Thread John Ferlan
If virSecretGetSecretString is using by secretLookupByUUID, then it's possible the found sec->usageType doesn't match the desired @secretUsageType. If this occurs for the encrypted volume creation processing and a subsequent pool refresh is executed, then the secret used to create the volume will n

[libvirt] [PATCH] Fix minor typos in messages and docs

2018-12-04 Thread Yuri Chornoivan
Hi, Please find the attached patch with minor fixes. Many thanks in advance for reviewing it. Best regards, Yuri>From 89a859c1229283cdb8d8e877ee1a81972f7e5af1 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Tue, 4 Dec 2018 19:08:14 +0200 Subject: [PATCH] Fix minor typos in messages and doc

[libvirt] [PATCH 2/8] storage: Move FS backend mount creation command helper

2018-12-04 Thread John Ferlan
Move virStorageBackendFileSystemMountCmd to storage_util so that it can be used by the test harness. Signed-off-by: John Ferlan --- src/storage/storage_backend_fs.c | 52 src/storage/storage_util.c | 52 src/storage/storage_

[libvirt] [PATCH 7/8] logical: Fix @on argument type

2018-12-04 Thread John Ferlan
It's only pass as 0 or 1 and used as a bool, let's just use a bool Signed-off-by: John Ferlan --- src/storage/storage_backend_logical.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index c

[libvirt] [PATCH 6/8] storage: Rework virStorageBackendFileSystemMountCmd

2018-12-04 Thread John Ferlan
Let's create helpers for each style of command line created. This primarily is easier on the eyes rather than the large multi line if-then-else-else clause used, but may also be useful if in the future any particular pool needs to add to the command line based on pool xml format. Signed-off-by: Jo

[libvirt] [PATCH 8/8] storage: Add tests for logical backend startup

2018-12-04 Thread John Ferlan
Add the logical storage pool startup validation (xml2argv) tests. Signed-off-by: John Ferlan --- src/storage/storage_backend_logical.c | 6 +- src/storage/storage_util.c | 11 +++ src/storage/storage_util.h | 4 .

[libvirt] [PATCH 3/8] storage: Move virStorageBackendFileSystemGetPoolSource

2018-12-04 Thread John Ferlan
Move into storage_util for reuse by test harness Signed-off-by: John Ferlan --- src/storage/storage_backend_fs.c | 33 src/storage/storage_util.c | 33 src/storage/storage_util.h | 3 +++ 3 files changed, 36 insertion

[libvirt] [PATCH 1/8] storage: Extract out mount command creation for FS Backend

2018-12-04 Thread John Ferlan
Extract out the code that is used to create the MOUNT command for starting the pool. We can use this for Storage Pool XML to Argv testing to ensure code changes don't alter how a storage pool is started. Signed-off-by: John Ferlan --- src/storage/storage_backend_fs.c | 70 +++

[libvirt] [PATCH 5/8] tests: Add storagepool xml test for netfs-auto

2018-12-04 Thread John Ferlan
Cover the case where @netauto would be used to create the command line in virStorageBackendFileSystemMountCmd. Essentially when the pool type is "netfs", but the "source.format" is empty, create the command line properly. Signed-off-by: John Ferlan --- .../pool-netfs-auto.argv

[libvirt] [PATCH 0/8] Add tests for Storage Pool startup command line generation

2018-12-04 Thread John Ferlan
Similar to qemuxml2argv and storagevolxml2argv, add storagepoolxml2argvtest in order to check the command line creation for the pool 'Start' commands. Only applicable for pool types with a "@startPool" function - that is disk, fs, iscsi, logical, scsi, and vstorage and further restricted if the po

[libvirt] [PATCH 4/8] tests: Introduce tests for storage pool xml to argv checks

2018-12-04 Thread John Ferlan
Similar to qemuxml2argv and storagevolxml2argv, let's create some tests to ensure that the XML generates a consistent command line. Using the same list of pools as storagepoolxml2xmltest, start with the file system tests (fs, netfs, netfs-cifs, netfs-gluster). Signed-off-by: John Ferlan --- tes

[libvirt] [PATCH v2] qemuDomainRemoveRNGDevice: Remove associated chardev too

2018-12-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1656014 An RNG device can consists of more devices than RND device itself. For instance, in case of EGD there is a chardev that connects to EGD daemon and feeds the qemu with random data. When doing RNG device removal we have to remove the associated cha

Re: [libvirt] [PATCH 1/2] qemuBuildRNGBackendChrdevStr: Fix formatting

2018-12-04 Thread Ján Tomko
On Tue, Dec 04, 2018 at 02:39:29PM +0100, Michal Privoznik wrote: The way that the code is currently written makes my eyes hurt. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.as

Re: [libvirt] [PATCH 2/2] qemuDomainRemoveRNGDevice: Remove associated chardev too

2018-12-04 Thread Ján Tomko
On Tue, Dec 04, 2018 at 02:39:30PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1656014 An RNG device can consists of more devices than RND device itself. For instance, in case of EGD there is a chardev that connects to EGD daemon and feeds the qemu with random data

[libvirt] [PATCH 2/2] qemuDomainRemoveRNGDevice: Remove associated chardev too

2018-12-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1656014 An RNG device can consists of more devices than RND device itself. For instance, in case of EGD there is a chardev that connects to EGD daemon and feeds the qemu with random data. When doing RNG device removal we have to remove the associated cha

[libvirt] [PATCH 1/2] qemuBuildRNGBackendChrdevStr: Fix formatting

2018-12-04 Thread Michal Privoznik
The way that the code is currently written makes my eyes hurt. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b7a548c68c..32ed83f277 100644 --- a/src/qem

[libvirt] [PATCH 0/2] qemuDomainRemoveRNGDevice: Remove associated chardev too

2018-12-04 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): qemuBuildRNGBackendChrdevStr: Fix formatting qemuDomainRemoveRNGDevice: Remove associated chardev too src/qemu/qemu_command.c | 6 -- src/qemu/qemu_hotplug.c | 23 +-- 2 files changed, 21 insertions(+), 8 deletions(-) -- 2.1

[libvirt] [PATCH] util: Fix the build on MinGW because of missing DT_CHR dirent type

2018-12-04 Thread Erik Skultety
Caused by commit 39480969 Signed-off-by: Erik Skultety --- Pushed under the build breaker rule. src/util/virutil.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index da12a11e04..279e6aedc0 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c

[libvirt] [PATCH 2/2] syncNicRxFilterMultiMode: Fix indentation

2018-12-04 Thread Michal Privoznik
The indentation of the code in this function is a bit off. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 80 +- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7bac10506b.

[libvirt] [PATCH 0/2] syncNicRxFilterMultiMode: Trivial fixes

2018-12-04 Thread Michal Privoznik
Pushed under trivial rule. Michal Prívozník (2): syncNicRxFilterMultiMode: Check for helper's retval properly syncNicRxFilterMultiMode: Fix indentation src/qemu/qemu_driver.c | 80 +- 1 file changed, 40 insertions(+), 40 deletions(-) -- 2.19.2 -- li

[libvirt] [PATCH 1/2] syncNicRxFilterMultiMode: Check for helper's retval properly

2018-12-04 Thread Michal Privoznik
There are two functions called from syncNicRxFilterMultiMode: virNetDevSetRcvAllMulti() and virNetDevSetRcvMulti(). Both of them return 0 on success and -1 on error. However, currently their return value is checked for != 0 which conflicts with our assumptions on retvals: a positive value is still