Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-07 Thread Eric Farman
On 4/7/21 9:07 AM, Pavel Hrdina wrote: On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: The introduction of nested cgroups used a little macro virCgroupGetNested() to retrieve the nested cgroup pointer, if one exists. But this macro isn't used when removing cgroups, resulting in

Re: [libvirt PATCH v6 00/30] Add support for persistent mediated devices

2021-04-07 Thread Jonathon Jongsma
On Wed, 7 Apr 2021 08:05:17 +0200 Erik Skultety wrote: > On Thu, Apr 01, 2021 at 10:18:45AM -0500, Jonathon Jongsma wrote: > > On Wed, 31 Mar 2021 16:00:48 +0200 > > Erik Skultety wrote: > > > > > On Fri, Mar 26, 2021 at 11:47:56AM -0500, Jonathon Jongsma wrote: > > > > > > > This patch

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Igor Mammedov
On Wed, 7 Apr 2021 13:40:03 +0100 Daniel P. Berrangé wrote: > On Wed, Apr 07, 2021 at 09:17:36AM +0200, Peter Krempa wrote: > > On Tue, Apr 06, 2021 at 16:31:32 +0100, Daniel Berrange wrote: > > > PCI devices can be associated with a unique integer index that is > > > exposed via ACPI. In

Re: [PATCH 22/24] nwfilterxml2firewalldata: Use internal wrapping to wrap output files

2021-04-07 Thread Pavel Hrdina
On Wed, Apr 07, 2021 at 07:42:56PM +0200, Peter Krempa wrote: > On Wed, Apr 07, 2021 at 19:27:31 +0200, Pavel Hrdina wrote: > > On Wed, Apr 07, 2021 at 05:09:45PM +0200, Peter Krempa wrote: > > > As with previous commits use virCommandSetDryRun to invoke > > > virCommandToString so that it returns

Re: [PATCH 07/24] virCommandSetDryRun: Rework resetting of the dry run data

2021-04-07 Thread Pavel Hrdina
On Wed, Apr 07, 2021 at 05:09:30PM +0200, Peter Krempa wrote: > While virCommandSetDryRun is used in tests only, there were some cases > when error paths would not call the function with NULL arguments to > reset the dry run infrastructure. > > Introduce VIR_COMMAND_DRY_RUN_TOKEN macro which

[PATCH] add the ability to disable transport authentication (like esxi et al)

2021-04-07 Thread simonmartin76
Signed-off-by: Simon Martin --- src/hyperv/hyperv_driver.c | 5 + src/hyperv/hyperv_util.c | 11 +++ src/hyperv/hyperv_util.h | 1 + 3 files changed, 17 insertions(+) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 17f5be1f0d..67e6e09f2d 100644 ---

Re: [PATCH 22/24] nwfilterxml2firewalldata: Use internal wrapping to wrap output files

2021-04-07 Thread Peter Krempa
On Wed, Apr 07, 2021 at 19:27:31 +0200, Pavel Hrdina wrote: > On Wed, Apr 07, 2021 at 05:09:45PM +0200, Peter Krempa wrote: > > As with previous commits use virCommandSetDryRun to invoke > > virCommandToString so that it returns pre-wrapped string. > > > > Since virCommand is better aware of

Re: [PATCH 22/24] nwfilterxml2firewalldata: Use internal wrapping to wrap output files

2021-04-07 Thread Pavel Hrdina
On Wed, Apr 07, 2021 at 05:09:45PM +0200, Peter Krempa wrote: > As with previous commits use virCommandSetDryRun to invoke > virCommandToString so that it returns pre-wrapped string. > > Since virCommand is better aware of where the arguments terminate we can > see an improvement where comments

Re: [PATCH 28/39] virResctrlAllocNewFromInfo: Use g_autoptr for 'ret'

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Remove 'cleanup' and 'error' labels by switching 'ret' to automatic pointer and stealing it in the return statement. Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) Reviewed-by:

Re: [PATCH 27/39] virResctrlAllocNewFromInfo: Restrict variable scope and use automatic freeing

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Move variables into the loop which uses them and use automatic freeing for temporarily allocated variables. Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko

Re: [PATCH 26/39] virResctrlGetCacheInfo: Restrict variable scope and use automatic freeing

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Move variables into the loop which uses them and use automatic freeing for temporarily allocated variables. Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-)

Re: [libvirt PATCH v2 0/5] qemu: support stable NIC device naming

2021-04-07 Thread Peter Krempa
On Wed, Apr 07, 2021 at 17:24:35 +0100, Daniel Berrange wrote: [...] > Daniel P. Berrangé (5): > conf: add support for for PCI devices > qemu: fix indentation off-by-1 > qemu: use a switch when building device addresses > qemu: probe for "acpi-index" property > qemu: wire up command

[libvirt PATCH v2 5/5] qemu: wire up command line support for ACPI index

2021-04-07 Thread Daniel P . Berrangé
This makes it possible to enable stable NIC device names in most modern Linux distros. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 2 + src/qemu/qemu_validate.c | 35 + .../devices-acpi-index.x86_64-latest.args | 57

[libvirt PATCH v2 3/5] qemu: use a switch when building device addresses

2021-04-07 Thread Daniel P . Berrangé
The compiler can more easily optimize a switch, and more importantly can also warn when new address types are added which are not handled. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 38 -- 1 file changed, 32

[libvirt PATCH v2 1/5] conf: add support for for PCI devices

2021-04-07 Thread Daniel P . Berrangé
PCI devices can be associated with a unique integer index that is exposed via ACPI. In Linux OS with systemd, this value is used for provide a NIC device naming scheme that is stable across changes in PCI slot configuration. Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.rst |

[libvirt PATCH v2 2/5] qemu: fix indentation off-by-1

2021-04-07 Thread Daniel P . Berrangé
Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7cb07306f3..20fba45780 100644 --- a/src/qemu/qemu_command.c +++

[libvirt PATCH v2 0/5] qemu: support stable NIC device naming

2021-04-07 Thread Daniel P . Berrangé
With this series applied it is possible to get stable NIC device naming in combination with QEMU >= 6.0.0 (release imminent), by setting the ACPI device index against NICs. The index is an unique integer that can be assigned to any PCI/PCIe device. systemd uses this value for its stable NIC

[libvirt PATCH v2 4/5] qemu: probe for "acpi-index" property

2021-04-07 Thread Daniel P . Berrangé
This property is exposed by QEMU on any PCI device, but we have to pick some specific device(s) to probe it against. We expect that at least one of the virtio devices will be present, so probe against them. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c |

Re: [PATCH 22/39] virStorageSourceParseBackingJSONUriCookies: Use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Count the elements after splitting the string. Signed-off-by: Peter Krempa --- src/storage_file/storage_source_backingstore.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description:

Re: [PATCH 21/39] virshParseRateStr: Use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Count the elements after splitting the string. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 20/39] virshParseRateStr: Refactor cleanup

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Use g_auto for the string list and remove 'ret' and 'cleanup:'. :'. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH 19/39] virHostValidateGetCPUFlags: Use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: We don't need the count of elements to iterate the list. Signed-off-by: Peter Krempa --- tools/virt-host-validate-common.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description:

Re: [PATCH 16/39] virLogParseOutput: Replace virStringSplitCount by g_strsplit

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Unfortunately here we do need the count of elements. Use g_strv_length to calculate it so that virStringSplitCount can be removed later. Signed-off-by: Peter Krempa --- src/util/virlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH 18/39] bhyveParsePCIFbuf: Use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/bhyve/bhyve_parse_command.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 17/39] virshParseEventStr: Use g_strsplit and automatic memory freeing

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 15/39] virLogParseFilter: Replace virStringSplitCount by g_strsplit

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: We don't really need the count. Signed-off-by: Peter Krempa --- src/util/virlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 14/39] virLogParseFilters: Refactor string list handling

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Rewrite the code to remove the need to calculate the string list count. Signed-off-by: Peter Krempa --- src/util/virlog.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index

Re: [PATCH 13/39] virLogParseOutputs: Refactor string list handling

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Rewrite the code to remove the need to calculate the string list count. Signed-off-by: Peter Krempa --- src/util/virlog.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index

Re: [PATCH 11/39] util: virlog: Use g_auto(GStrv) instead of g_strfreev in cleanup section

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/util/virlog.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 12/39] util: virlog: Remove pointless 'cleanup' labels

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Previous refactors left empty cleanup labels. Remove them. Signed-off-by: Peter Krempa --- src/util/virlog.c | 47 +-- 1 file changed, 17 insertions(+), 30 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 10/39] virStorageFileParseBackingStoreStr: use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The presence of the second element can be checked by looking at it directly. Signed-off-by: Peter Krempa --- src/util/virstoragefile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH 09/39] virJSONValueObjectDeflattenWorker: use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The presence of the second element can be checked by looking at it directly. Signed-off-by: Peter Krempa --- src/util/virjson.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [PATCH 08/39] virDomainDiskAddISCSIPoolSourceHost: use g_strsplit instead of virStringSplitCount

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Count the elements directly using g_strv_length. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 07/39] Remove virStorageFileCanonicalizePath

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstoragefile.c | 210 -- src/util/virstoragefile.h | 8 -- 3 files changed, 219 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 04/39] storage_file: Remove virStorageFileBackendFsPriv

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The private data structure is no longer used. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_backend_fs.c | 20 1 file changed, 20 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [PATCH 03/39] Remove virStorageSourceGetUniqueIdentifier file backend API

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The API isn't used any more. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/storage_file/storage_file_backend.h | 4 -- src/storage_file/storage_file_backend_fs.c| 24 ---

Re: [PATCH 06/39] tests: Remove testing of virStorageFileCanonicalizePath

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Remove the last code using the function. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 100 - 1 file changed, 100 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [PATCH 05/39] virStorageFileBackendGlusterPriv: Remove 'canonpaht'

2021-04-07 Thread Ján Tomko
cannonpath On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/storage_file/storage_file_backend_gluster.c | 2 -- 1 file changed, 2 deletions(-) With the typo fixed: Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 02/39] virStorageSourceGetMetadata: Use depth limit instead of unique path checking

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Prevent unbounded chains by limiting the recursion depth of virStorageSourceGetMetadataRecurse to the maximum number of image layers we limit anyways. This removes the last use of virStorageSourceGetUniqueIdentifier which will allow us to delete some

Re: [PATCH 01/39] qemuDomainStorageSourceValidateDepth: Define chain depth as macro

2021-04-07 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The magic constant will be used in one more place. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 76e8903dbc..f818fce271

[libvirt PATCH] vsh: fix memory leak in vshCommandParse

2021-04-07 Thread Ján Tomko
One of the error branches used a plain free where vshCommandFree was required. https://bugzilla.redhat.com/show_bug.cgi?id=1943415 Signed-off-by: Ján Tomko --- tools/vsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index 552ed29ab9..d9c0a9b80d

[PATCH 22/24] nwfilterxml2firewalldata: Use internal wrapping to wrap output files

2021-04-07 Thread Peter Krempa
As with previous commits use virCommandSetDryRun to invoke virCommandToString so that it returns pre-wrapped string. Since virCommand is better aware of where the arguments terminate we can see an improvement where comments are no longer line-wrapped. The changes to the 'commonRules' strings

[PATCH 24/24] Remove test 'args' file rewrapping infrastructure

2021-04-07 Thread Peter Krempa
All tests which use files with 'ldargs' and 'args' suffix as output now use the internal and better line splitting. Remove the test-wrap-argv.py script, the syntax check which used it and the helper rewrapping the output when regenerating test output. For any further use, we require code to use

[PATCH 21/24] networkxml2firewalltest: Use internal wrapping of command line arguments

2021-04-07 Thread Peter Krempa
virCommandSetDryRun allows to invoke virCommandToString so that the command string is already wrapped. We now also need to load the base arguments file without unwrapping the arguments. Signed-off-by: Peter Krempa --- tests/networkxml2firewalltest.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH 10/24] nwfilterxml2firewalltest: Strip path from test output via virCommandSetDryRun

2021-04-07 Thread Peter Krempa
Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa --- tests/nwfilterxml2firewalltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index

[PATCH 09/24] networkxml2firewalltest: Strip path from test output via virCommandSetDryRun

2021-04-07 Thread Peter Krempa
Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa --- tests/networkxml2firewalltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index

[PATCH 07/24] virCommandSetDryRun: Rework resetting of the dry run data

2021-04-07 Thread Peter Krempa
While virCommandSetDryRun is used in tests only, there were some cases when error paths would not call the function with NULL arguments to reset the dry run infrastructure. Introduce VIR_COMMAND_DRY_RUN_TOKEN macro which declares a variable called 'dryRunToken' which must be passed to

[PATCH 05/24] virCommandToString: Allow stripping command path

2021-04-07 Thread Peter Krempa
In tests we don't want to use the full path to commands as it's unpleasant to keep that working on all systems. Add an integrated way to strip the prefix which will be used to replace virTestClearCommandPath() as a more systemic solution. Signed-off-by: Peter Krempa ---

[PATCH 04/24] qemuxml2xmloutdata: Remove unused symlinks to test XML files

2021-04-07 Thread Peter Krempa
The symlinks are not used by the test. Signed-off-by: Peter Krempa --- tests/qemuxml2xmloutdata/audio-default-nographics.xml| 1 - tests/qemuxml2xmloutdata/audio-default-sdl.xml | 1 - tests/qemuxml2xmloutdata/audio-default-spice.xml | 1 -

[PATCH 02/24] qemuxml2argvdata: Remove unused 'xml' files

2021-04-07 Thread Peter Krempa
The files are no longer referenced by either qemuxml2argvtest or qemuxml2xmltest. Remove them. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/console-compat-2.xml | 103 --- tests/qemuxml2argvdata/hostdev-scsi-boot.xml | 34 --

[PATCH 01/24] qemuxml2argvdata: Remove unused 'args' files

2021-04-07 Thread Peter Krempa
The files were added in error (audio-*) for test cases which produce an error, left over after converting to DO_TEST_CAPS_LATEST (disk-detect-zeroes), or left over after splitting test cases (disk-network-tlsx509). Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/audio-alsa-full.args |

[PATCH 00/24] Use rewrapping we have for logs for 'args' files

2021-04-07 Thread Peter Krempa
Our log file wrapping helper keeps the option and argument together regardless of the length which makes for more reasonable diffs without any pointless re-wrapping of the files which may distract from real change. Reuse the wrapping code and replace the test code which used a python script to do

[PATCH 14/24] virTestLoadFileJSON: Don't try to unwrap JSON documents

2021-04-07 Thread Peter Krempa
Use virFileReadAll to load the file instead of virTestLoadFile which tries to unwrap the file. Signed-off-by: Peter Krempa --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.c b/tests/testutils.c index 0f6b3a9705..3363d7f0aa 100644 ---

[PATCH 18/24] storage: Format mount options before positional arguments

2021-04-07 Thread Peter Krempa
Move calls to virStorageBackendFileSystemMountAddOptions earlier so that the options are formatted before the positional arguments. Signed-off-by: Peter Krempa --- src/storage/storage_util.c| 8 tests/storagepoolxml2argvdata/pool-fs-freebsd.argv|

[PATCH 23/24] bhyvexml2argvtest: Use internal wrapping of command line arguments

2021-04-07 Thread Peter Krempa
virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. The main advantage is that arguments for an option are always on the same line which makes it more easy to see what changed in a diff and prevents

[PATCH 19/24] storagepoolxml2argvtest: Use internal wrapping of command line arguments

2021-04-07 Thread Peter Krempa
virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. Signed-off-by: Peter Krempa --- tests/storagepoolxml2argvdata/pool-fs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-fs.argv

[PATCH 20/24] storagevolxml2argvtest: Use internal wrapping of command line arguments

2021-04-07 Thread Peter Krempa
virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. Signed-off-by: Peter Krempa --- tests/storagevolxml2argvdata/iso-input.argv| 4 +++- tests/storagevolxml2argvdata/iso.argv | 4 +++-

[PATCH 16/24] syntax-check: Remove 90 char limit for 'argv' files

2021-04-07 Thread Peter Krempa
Splitting lines with arguments causes in many cases a rewrap if the arguments are modified making it harder to see what actually changed. In upcoming patches some rewrapping of 'args' files will be removed so remove this check first. Signed-off-by: Peter Krempa --- build-aux/syntax-check.mk |

[PATCH 13/24] virTestCompareToFile: Add possibility to skip unwrapping of input file

2021-04-07 Thread Peter Krempa
In some cases we might want to compare already wrapped data against a wrapped file. Introduce virTestCompareToFileFull with a 'unwrap' boolean which will control the unwrapping. Signed-off-by: Peter Krempa --- tests/testutils.c | 46 +++---

[PATCH 15/24] virCommandToStringFull: Improve linebreaking behaviour

2021-04-07 Thread Peter Krempa
Put multiple values for an option if followed by another option as used in certain iptables arguments. Signed-off-by: Peter Krempa --- src/util/vircommand.c| 29 +++-- tests/commanddata/test26.log | 2 +- tests/commandtest.c | 5 - 3 files changed,

[PATCH 12/24] testutils: Remove unused virTestClearCommandPath

2021-04-07 Thread Peter Krempa
virCommand(ToString) now provides the functionality internally so we don't have to keep the string-munging function around. Signed-off-by: Peter Krempa --- tests/testutils.c | 51 --- tests/testutils.h | 2 -- 2 files changed, 53 deletions(-) diff

[PATCH 11/24] nwfilterebiptablestest: Strip path from test output via virCommandSetDryRun

2021-04-07 Thread Peter Krempa
Enable the internal path clearing instead of using virTestClearCommandPath. Signed-off-by: Peter Krempa --- tests/nwfilterebiptablestest.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c

[PATCH 08/24] virCommandSetDryRun: Add flags to linebreak and strip prefix from the command buffer

2021-04-07 Thread Peter Krempa
virCommandToStringFull used internally when virCommandSetDryRun is requested allows to strip command path and wrap lines nicely. Expose these via virCommandSetDryRun so that tests can use those features instead of local hacks. Signed-off-by: Peter Krempa --- src/util/vircommand.c|

[PATCH 03/24] qemuxml2xmloutdata: Remove unused output XML files

2021-04-07 Thread Peter Krempa
The files are no longer referenced by existing test cases. Remove them. Signed-off-by: Peter Krempa --- tests/qemuxml2xmloutdata/disk-fat.xml | 37 -- tests/qemuxml2xmloutdata/nographics-vga.xml | 34 - tests/qemuxml2xmloutdata/parallel-tcp.xml | 39

[PATCH 06/24] tests: storagepoolxml2argvtest: Use integrated command path stripping

2021-04-07 Thread Peter Krempa
Replace virTestClearCommandPath by virCommandToStringFull which allows to strip the command prefix internally. Signed-off-by: Peter Krempa --- tests/storagepoolxml2argvtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/storagepoolxml2argvtest.c

[PATCH v2 3/4] selinux: Remove 'make' dependency

2021-04-07 Thread Vit Mojzis
Compile the policy using a script executed by meson. Signed-off-by: Vit Mojzis --- libvirt.spec.in | 12 meson.build | 12 selinux/compile_policy.py | 128 ++ selinux/meson.build | 23 +++ 4 files changed, 163

[PATCH v2 1/4] Add SELinux policy for virt

2021-04-07 Thread Vit Mojzis
From: Nikola Knazekova SELinux policy was created for: Hypervisor drivers: - virtqemud (QEMU/KVM) - virtlxcd (LXC) - virtvboxd (VirtualBox) Secondary drivers: - virtstoraged (host storage mgmt) - virtnetworkd (virtual network mgmt) - virtinterface (network interface mgmt) - virtnodedevd

[PATCH v2 2/4] [DO NOT MERGE] Install selinux-policy-devel in test environment

2021-04-07 Thread Vit Mojzis
Temporary commit for testing purposes. The change needs to be done in https://gitlab.com/libvirt/libvirt-ci/-/blob/master/guests/lcitool/lcitool/ansible/vars/projects/libvirt.yml Signed-off-by: Vit Mojzis --- ci/containers/ci-centos-8.Dockerfile | 1 +

[PATCH v2 4/4] selinux: add "mls" binary version of the policy

2021-04-07 Thread Vit Mojzis
Compile the module also for use with "mls" systems and allow installation to systems with any selinux type (targeted, mls and minimum). Signed-off-by: Vit Mojzis --- libvirt.spec.in | 53 +-- selinux/compile_policy.py | 21 ++--

Re: [libvirt PATCH] conf: add ABI stability check for disk rotation rate

2021-04-07 Thread Ján Tomko
On a Wednesday in 2021, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[libvirt PATCH] conf: add ABI stability check for disk rotation rate

2021-04-07 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 875edcbff3..83415f9271 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -22313,6 +22313,13 @@

[PATCH v2] Add SELinux policy for virt

2021-04-07 Thread Vit Mojzis
Sorry for the long delay. This is our first request to ship a policy for multiple selinux stores (targeted, mls and minimum). Changes: * Replace all selinux-policy-%{policytype} dependencies with selinux-policy-base * Add Ghost files representing installed policy modules in all policy stores *

Re: [libvirt PATCH 5/6] qemu: probe for "acpi-index" property

2021-04-07 Thread Daniel P . Berrangé
On Tue, Apr 06, 2021 at 08:27:07PM +0200, Igor Mammedov wrote: > On Tue, 6 Apr 2021 16:31:36 +0100 > Daniel P. Berrangé wrote: > > > This property is exposed by QEMU on any PCI device, but we have to pick > > some specific device(s) to probe it against. We expect that at least one > > of the

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-07 Thread Pavel Hrdina
On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: > The introduction of nested cgroups used a little macro > virCgroupGetNested() to retrieve the nested cgroup > pointer, if one exists. But this macro isn't used when > removing cgroups, resulting in some messages: > > Mar 25 20:55:17

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Laine Stump
On 4/7/21 8:40 AM, Daniel P. Berrangé wrote: On Wed, Apr 07, 2021 at 09:23:50AM +0200, Peter Krempa wrote: On Wed, Apr 07, 2021 at 09:17:36 +0200, Peter Krempa wrote: On Tue, Apr 06, 2021 at 16:31:32 +0100, Daniel Berrange wrote: PCI devices can be associated with a unique integer index that

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 08:53:12AM -0400, Laine Stump wrote: > On 4/6/21 11:31 AM, Daniel P. Berrangé wrote: > > PCI devices can be associated with a unique integer index that is > > exposed via ACPI. In Linux OS with systemd, this value is used for > > provide a NIC device naming scheme that is

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Laine Stump
On 4/6/21 11:31 AM, Daniel P. Berrangé wrote: PCI devices can be associated with a unique integer index that is exposed via ACPI. In Linux OS with systemd, this value is used for provide a NIC device naming scheme that is stable across changes in PCI slot configuration. Signed-off-by: Daniel P.

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 09:23:50AM +0200, Peter Krempa wrote: > On Wed, Apr 07, 2021 at 09:17:36 +0200, Peter Krempa wrote: > > On Tue, Apr 06, 2021 at 16:31:32 +0100, Daniel Berrange wrote: > > > PCI devices can be associated with a unique integer index that is > > > exposed via ACPI. In Linux OS

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-07 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 09:17:36AM +0200, Peter Krempa wrote: > On Tue, Apr 06, 2021 at 16:31:32 +0100, Daniel Berrange wrote: > > PCI devices can be associated with a unique integer index that is > > exposed via ACPI. In Linux OS with systemd, this value is used for > > provide a NIC device

Re: [PATCH 0/1] vircgroup: Fix nested cgroup on cleanup

2021-04-07 Thread Eric Farman
Polite ping, now that release freeze has finished. On 3/26/21 12:25 PM, Eric Farman wrote: Hi Pavel, et al, Running Fedora 33 KVM/QEMU on s390x, I recently noticed a couple of oddities when shutting down my guests, which I bisected between 7.0.0 and 7.1.0 to your commit: commit

Re: [PATCH] ci: README: Mention necessary step for cirrus to pick up the github project

2021-04-07 Thread Pavel Hrdina
On Wed, Apr 07, 2021 at 01:37:07PM +0200, Peter Krempa wrote: > Unless you create such an commit, cirrus-ci.com will not pick up the > github project and cirrus-run will fail. > > Signed-off-by: Peter Krempa > --- > ci/README.rst | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Pavel

[libvirt PATCH 05/14] conf: Use virTristateXXX in virDomainActualNetDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 17 + src/conf/domain_conf.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a99553cb0b..d0d03b16bb 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 06/14] conf: Use virTristateXXX in virDomainNetDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 17 + src/conf/domain_conf.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d0d03b16bb..e529eb7bc1 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 10/14] conf: Use virTristateXXX in virDomainLoaderDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 26 -- src/conf/domain_conf.h | 4 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 313d7fd291..24d124158e 100644 ---

[libvirt PATCH 09/14] conf: Use virTristateXXX in virDomainMemballoonDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 26 -- src/conf/domain_conf.h | 4 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2ae3080a8c..313d7fd291 100644 ---

[libvirt PATCH 14/14] conf: Use virTristateXXX in virPCIDeviceAddress

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/device_conf.c | 16 +--- src/util/virpci.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 714ac50762..0dd60985e9 100644 --- a/src/conf/device_conf.c +++

[libvirt PATCH 13/14] conf: Use virTristateXXX in virStoragePoolSourceDevice

2021-04-07 Thread Tim Wiederhake
Note that the comment for virStoragePoolSourceDevice::part_separator was wrong. Signed-off-by: Tim Wiederhake --- src/conf/storage_conf.c | 7 --- src/conf/storage_conf.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c

[libvirt PATCH 11/14] conf: Use virTristateXXX in virDomainDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index b2e14ba2e1..e53f5d1b47 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2756,7 +2756,7 @@ struct

[libvirt PATCH 12/14] conf: Use virTristateXXX in virStorageAdapterFCHost

2021-04-07 Thread Tim Wiederhake
Note that the comment for virStorageAdapterFCHost::managed was wrong. Signed-off-by: Tim Wiederhake --- src/conf/storage_adapter_conf.c | 4 +++- src/conf/storage_adapter_conf.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/storage_adapter_conf.c

[libvirt PATCH 07/14] conf: Use virTristateXXX in virDomainChrSourceDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 34 +- src/conf/domain_conf.h | 6 +++--- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e529eb7bc1..2ae3080a8c 100644 ---

[libvirt PATCH 08/14] conf: Use virTristateXXX in virDomainGraphicsDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ad9b8f632b..445f48d8ed 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1863,7 +1863,7 @@ struct

[libvirt PATCH 01/14] conf: Use virTristateXXX in virStorageSource

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 12 src/conf/storage_source_conf.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1e72171586..b8f6c3d606 100644 ---

[libvirt PATCH 04/14] conf: Use virTristateXXX in virDomainDiskDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 39 --- src/conf/domain_conf.h | 6 +++--- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 67954bb42b..a99553cb0b 100644 ---

[libvirt PATCH 00/14] Use virTristateXXX for more struct members

2021-04-07 Thread Tim Wiederhake
This is a preparation step for some refactoring of the XML parser, see https://listman.redhat.com/archives/libvir-list/2021-March/msg01066.html Many libvirt structs have members that are of type `int` but actually are virTristateBool or virTristateSwitch. Fix this to increase type safety. Note

[libvirt PATCH 03/14] conf: Use virTristateXXX in virDomainDeviceInfo

2021-04-07 Thread Tim Wiederhake
Note that the wrong "VIR_TRISTATE_*_ABSENT" was used in qemuDomainChangeNet. Signed-off-by: Tim Wiederhake --- src/conf/device_conf.h | 4 ++-- src/conf/domain_conf.c | 26 -- src/qemu/qemu_command.c | 3 ++- src/qemu/qemu_hotplug.c | 2 +- 4 files changed, 21

[libvirt PATCH 02/14] conf: Use virTristateXXX in virStorageSourceNVMeDef

2021-04-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 4 +++- src/conf/storage_source_conf.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b8f6c3d606..dfdca1891a 100644 --- a/src/conf/domain_conf.c +++

[PATCH] ci: README: Mention necessary step for cirrus to pick up the github project

2021-04-07 Thread Peter Krempa
Unless you create such an commit, cirrus-ci.com will not pick up the github project and cirrus-run will fail. Signed-off-by: Peter Krempa --- ci/README.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ci/README.rst b/ci/README.rst index 033db1c847..2a7d767227 100644 ---

Re: [PATCH] NEWS: Mention Xen support for domains with more than 4TB

2021-04-07 Thread Andrea Bolognani
On Mon, 2021-04-05 at 10:31 -0600, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH] tests: add warning that qemucapsprobe prefers native host/guest arch

2021-04-07 Thread Andrea Bolognani
On Tue, 2021-04-06 at 12:01 +0100, Daniel P. Berrangé wrote: > +++ b/tests/qemucapsprobe.c > @@ -46,6 +46,7 @@ main(int argc, char **argv) > { > virThread thread; > virQEMUCapsPtr caps; > +virArch guest, host; I believe it's preferred to declare each variable on its own line, even

Re: [libvirt PATCH] run: fix spawning of daemons

2021-04-07 Thread Andrea Bolognani
On Tue, 2021-04-06 at 15:41 +0100, Daniel P. Berrangé wrote: > The "args" array already contains the binary name, so does not need to > be concatenated with "prog". > > Signed-off-by: Daniel P. Berrangé > --- > run.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by:

  1   2   >