[PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-06 Thread Michal Privoznik
Both virProcessGetStatInfo() and virProcessGetSchedInfo() are Linux centric. Provide stubs for non-Linux platforms. Signed-off-by: Michal Privoznik --- src/util/virprocess.c | 24 1 file changed, 24 insertions(+) diff --git a/src/util/virprocess.c

Re: [PATCH] change return type of virURIParamAppend() to void type

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Ani Sinha wrote: virURIParamAppend() unconditionally returns 0. Simplify and make the return type as void type. Signed-off-by: Ani Sinha --- src/util/viruri.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko and pushed Jano

[PATCH] NEWS: Fix indentation

2022-01-06 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. NEWS.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index 3c06fdde0f..7ee03fde0e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -42,12 +42,12 @@ v8.0.0 (unreleased) as

Re: [PATCH 21/21] qemuTestCapsCacheInsert: Rewrite caps cache insertion

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Until now we did 2 weird things when inserting the qemuCaps used for individual test cases into the capability cache: 1) we inserted the same caps for all emulators 2) we always (expensively) copied them Now when real capabilities are used we don't

Re: .conf file setting(s) for packet filtering backend(s)

2022-01-06 Thread Laine Stump
On 1/4/22 7:57 AM, Daniel P. Berrangé wrote: On Sun, Jan 02, 2022 at 09:41:37PM -0500, Laine Stump wrote: I'm currently working on switching the backend of the network driver from using iptables to using nftables. Due to some functionality that is not available with nftables (the rule that

Re: [PATCH 20/21] qemuTestCapsCacheInsert: Extract code for popluating fake machine types

2022-01-06 Thread Ján Tomko
In the commit summary: *populating On a Thursday in 2022, Peter Krempa wrote: Separate the code to aid further refactors. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 96 --- 1 file changed, 53 insertions(+), 43 deletions(-) Reviewed-by:

Re: [PATCH 19/21] qemuxml2argvtest: Convert 'missing-machine' to DO_TEST_CAPS_LATEST

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Emulator binary change is needed to use the latest caps properly. The comment is no longer needed, the expected error is recorded in the 'err' file. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/missing-machine.err| 1 -

Re: [PATCH 18/21] qemuxml2argvtest: Enable qemuxml2argv version of 'blkdeviotune' test

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Also ensure that the emulator and architecture are correct for DO_TEST_CAPS_LATEST. Signed-off-by: Peter Krempa --- .../blkdeviotune.x86_64-latest.args | 40 +++ tests/qemuxml2argvdata/blkdeviotune.xml | 4 +-

Re: [PATCH 17/21] qemuxml2(xml|argv)test: Test real state of things with 'x86-kvm-32-on-64'

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: As demonstrated by the qemuxml2xmltest DO_TEST_CAPS_LATEST data based on the 'x86-kvm-32-on-64' test case the post parse CPU selection code which fills in the CPU into the definition does not have exactly the same logic as we used to have when the cpu

Re: [PATCH 16/21] qemuxml2argvtest: Don't insert capabilities into cache twice

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Fake capabilities are inserted twice, as in a few tests the architecture is not present in the XML (testing filling in of the architecture). Since we already know which architecture will be picked we don't need to be adding the capabilities twice. This

Re: [PATCH 15/21] qemuxml2argvdata: Use proper arch and emulator for aarch64 real capability tests

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Upcoming patches will modify how we populate the capability cache in tests to be more sane. This also means that the emulator binary and architecture used in the test files using real capabilities must match what the real capabilities have.

Re: [PATCH 14/21] qemuxml2argvdata: Use proper arch and emulator for x86 real capability tests

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Upcoming patches will modify how we populate the capability cache in tests to be more sane. This also means that the emulator binary and *saner architecture used in the test files using real capabilities must match what the real capabilities have.

Re: [PATCH 13/21] testutilsqemu: Remove unused fake-caps x86 machine types

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: None of our tests reference 'isapc', and 'pc-i440fx-2.6'. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [PATCH 12/21] securityselinuxlabeldata: Purge unneeded versioned machine type

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Use 'pc' instead. Signed-off-by: Peter Krempa --- tests/securityselinuxlabeldata/chardev.xml | 2 +- tests/securityselinuxlabeldata/disks.xml | 2 +- tests/securityselinuxlabeldata/kernel.xml | 2 +- tests/securityselinuxlabeldata/nfs.xml | 2 +- 4

Re: [PATCH 11/21] qemuhotplugtestdomains: Remove unnecessary use of versioned pc machine types

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: The specific machine type is not important for the test. We can use 'pc' instead. Signed-off-by: Peter Krempa --- .../qemuhotplug-console-compat-2-live+console-virtio.xml| 2 +- .../qemuhotplug-console-compat-2-live.xml |

Re: [PATCH 10/21] tests: qemuxml2argvdata: Purge versioned i440fx machine types from fake-caps tests

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Use the 'pc' alias for them as it's equivalent. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/fd-memory-no-numa-topology.args | 2 +- tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml | 2 +-

Re: [PATCH 08/21] qemuxml2(argv|xml)test: Enable 'controller-usb-order' for qemuxml2argv and convert it to latest caps

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Since introduction in fc03eb53c0bf3f654 there wasn't a qemuxml2argv version. As we are touching the files convert them to DO_TEST_CAPS_LATEST directly. Signed-off-by: Peter Krempa --- .../controller-usb-order.x86_64-latest.args | 38

Re: [PATCH 09/21] qemuxml2(argv|xml)test: Unify usage of DO_TEST_CAPS_LATEST

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: The qemuxml2argv invocation of some tests used DO_TEST_CAPS_LATEST while the qemuxml2xmltest invocation uses fake caps. Unify them on DO_TEST_CAPS_LATEST. Signed-off-by: Peter Krempa --- .../luks-disks.x86_64-4.1.0.args | 1 +

Re: [PATCH 07/21] qemuxml2xmltest: Replace 'interface-server' by 'net-server' test case

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: According to commit 5568490 the test case was added to verify that the '' element is covered by the schema. The test was not registered for qemuxml2argvtest though. We can use 'net-server' instead as it has the same type. On the other hand that one

Re: [PATCH 06/21] tests: qemuxml2argvdata: Remove specific q35 machine types from fake-caps tests

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Use q35 instead. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/bios-nvram-secure.args | 2 +- tests/qemuxml2argvdata/bios-nvram-secure.xml | 2 +- tests/qemuxml2argvdata/boot-floppy-q35.args | 2 +-

Re: [PATCH 05/21] tests: qemuxml2argvdata: Remove use of 'pc-1.0' and 'pc-1.2' machine types

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: There's nothing special about the tests requiring to use very old machine types. Most usage is cargo-culted from other tests. Switch all the tests to use 'pc' instead. Signed-off-by: Peter Krempa ---

Re: [PATCH 04/21] testutilsqemu: Remove unused non-x86 fake machine types

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: For tests with fake capabilities we fill in a bunch of machine types which the tests might use. For now there's a random collection of machine types which are not actually used. Purge the unused ones for non-x86 machines. Signed-off-by: Peter Krempa

Re: [PATCH] Make virConnectOpenInternal() report error in all cases

2022-01-06 Thread Ani Sinha
On Thu, 6 Jan 2022, Daniel P. Berrangé wrote: > On Thu, Jan 06, 2022 at 08:34:26PM +0530, Ani Sinha wrote: > > virConnectOpenInternal() does not report error in all failure scenarios, > > except > > in some specific cases. > > I don't believe this is correct. My reading of the code is that it

Re: [PATCH 03/21] qemuxml2argvtest: Remove redundant floppy controller tests

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: The two test cases were added to avoid regressions such as fixed in 17dff3584855e9. Nowadays the code is much simpler and any Q35 machine will trigger the explicit FDC. Remove the '2.11' machine type version and turn the '2.9' version into a generic

Re: [PATCH 02/21] qemuDomainNeedsFDC: Simplify and improve checking if a machine needs FDC

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Commit c7f3a1f7870 turned qemuDomainMachineNeedsFDC() effectively into qemuDomainIsQ35. Use it instead as it also matches the non-canonicalized 'q35'. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 17 ++--- 1 file changed, 2

[PATCH] do not report generic OPERATION_FAILED error when calling virConnectOpenAuth()

2022-01-06 Thread Ani Sinha
virConnectOpenAuth() calls virConnectOpenInternal(). This later function generates fine grained errors arising from various failure conditions that are more accurate than a "catch all" broader VIR_ERR_OPERATION_FAILED error that the callers of this function generates. Remove the broader error so

[PATCH] change return type of virURIParamAppend() to void type

2022-01-06 Thread Ani Sinha
virURIParamAppend() unconditionally returns 0. Simplify and make the return type as void type. Signed-off-by: Ani Sinha --- src/util/viruri.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/util/viruri.c b/src/util/viruri.c index 3c73188a55..88bb0cc1f8 100644 ---

Re: [PATCH 01/21] qemuProcessPrepareQEMUCaps: Don't clear QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE

2022-01-06 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: All the fd-passing setup of chardevs which this hack meant to disable was moved to the host-preparation phase which is skipped for formatting of non-real commandlines. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 ++--- 1 file

[PATCH v2 2/2] NEWS: Mention device hot-unplug regression with qemu-6.2 and workarounds for it

2022-01-06 Thread Peter Krempa
Signed-off-by: Peter Krempa Reviewed-by: Ani Sinha Reviewed-by: Ján Tomko --- NEWS.rst | 31 +++ 1 file changed, 31 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 3c06fdde0f..9e0b101741 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -59,6 +59,37 @@ v8.0.0

[PATCH v2 1/2] qemu: Revert to using non-JSON commandline for -device

2022-01-06 Thread Peter Krempa
When -device is configured via JSON a bug [1] is triggered in qemu were the DEVICE_DELETED event for the removal of the device frontend is no longer delivered to libvirt. Without the DEVICE_DELETED event we don't remove the corresponding entries in the VM XML. Until qemu will be fixed we must

[PATCH v2 0/2] qemu: Work around qemu not sending DEVICE_DELETED when device is configured via JSON

2022-01-06 Thread Peter Krempa
QEMU fix was posted https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg00542.html I'll hold off this version until just before the freeze. In case the qemu commit gets merged we can avoid some of the churn by adding in-progress qemu caps and updating to it. Note that I've trimmed patch 1

Re: [libvirt PATCH 1/2] conf: add killpriv v2 attribute for virtiofs

2022-01-06 Thread Ján Tomko
On a Wednesday in 2022, Daniel P. Berrangé wrote: On Wed, Jan 05, 2022 at 04:06:49PM +0100, Ján Tomko wrote: Add a new attribute to control the killpriv feature: ... Ewww, ewww, ewww. This is a horrible element & attribute name. Even with the docs I have little

Re: [PATCH] Make virConnectOpenInternal() report error in all cases

2022-01-06 Thread Daniel P . Berrangé
On Thu, Jan 06, 2022 at 08:34:26PM +0530, Ani Sinha wrote: > virConnectOpenInternal() does not report error in all failure scenarios, > except > in some specific cases. I don't believe this is correct. My reading of the code is that it is already reporting errors in all exit paths that can

Re: [PATCH] Make virConnectOpenInternal() report error in all cases

2022-01-06 Thread Peter Krempa
On Thu, Jan 06, 2022 at 20:34:26 +0530, Ani Sinha wrote: > virConnectOpenInternal() does not report error in all failure scenarios, > except > in some specific cases. This inconsistent behavior forces the caller of this > function report a generic error for all failure modes which then hides >

Re: [PATCH] Make virConnectOpenInternal() report error in all cases

2022-01-06 Thread Michal Prívozník
On 1/6/22 16:04, Ani Sinha wrote: > virConnectOpenInternal() does not report error in all failure scenarios, > except > in some specific cases. This inconsistent behavior forces the caller of this > function report a generic error for all failure modes which then hides > specific > error

[PATCH] Make virConnectOpenInternal() report error in all cases

2022-01-06 Thread Ani Sinha
virConnectOpenInternal() does not report error in all failure scenarios, except in some specific cases. This inconsistent behavior forces the caller of this function report a generic error for all failure modes which then hides specific error scenarios. This change makes virConnectOpenInternal()

Re: [libvirt PATCH v3 04/13] ch_driver, ch_domain: vcpu info getter callbacks

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_domain.c | 25 + > src/ch/ch_domain.h | 4 ++ > src/ch/ch_driver.c | 134 + > 3 files changed, 163

Re: [libvirt PATCH v3 02/13] ch_domain: add virCHDomainGetMonitor helper method

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_domain.c | 6 ++ > src/ch/ch_domain.h | 5 + > 2 files changed, 11 insertions(+) Reviewed-by: Michal Privoznik Michal

Re: [libvirt PATCH v3 03/13] ch_domain: add methods to manage private vcpu data

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_domain.c | 50 +- > src/ch/ch_domain.h | 11 ++ > 2 files changed, 56 insertions(+),

Re: [libvirt PATCH v3 05/13] ch_driver: domainGetVcpuPinInfo and nodeGetCPUMap

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Add domainGetVcpuPinInfo and nodeGetCPUMap callbacks to ch driver > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_domain.h | 10 +++-- > src/ch/ch_driver.c | 51

Re: [libvirt PATCH v3 06/13] ch_monitor: Get nicindexes in prep for cgroup mgmt

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_conf.h| 2 + > src/ch/ch_domain.c | 27 ++- > src/ch/ch_domain.h | 2 + > src/ch/ch_driver.c | 1 + >

Re: [libvirt PATCH v3 07/13] qemu, hypervisor: refactor some cgroup mgmt methods

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > Refactor some cgroup management methods from qemu into hypervisor. > These methods will be shared with ch driver for cgroup management. > > Signed-off-by: Praveen K Paladugu > --- > src/hypervisor/domain_cgroup.c | 426

Re: [libvirt PATCH v3 01/13] util: Helper functions to get process info

2022-01-06 Thread Michal Prívozník
On 12/10/21 21:34, Praveen K Paladugu wrote: > Move qemuGetProcessInfo and qemuGetSchedInfo methods to util and share them > with ch driver. > > Signed-off-by: Praveen K Paladugu > --- > src/libvirt_private.syms | 2 + > src/qemu/qemu_driver.c | 116 ++- >

Re: [PATCH] util: Improve log out parsing errors

2022-01-06 Thread Michal Prívozník
On 1/5/22 14:31, Martin Kletzander wrote: > Suggested-by: Erik Skultety > Signed-off-by: Martin Kletzander > --- > src/util/virlog.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Michal Privoznik Michal

Re: [RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Ani Sinha
On Thu, 6 Jan 2022, Michal Prívozník wrote: > On 1/6/22 13:42, Ani Sinha wrote: > > > > > > On Thu, 6 Jan 2022, Michal Prívozník wrote: > > > >> On 1/6/22 02:33, Raphael Norwitz wrote: > >>> Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() > >>> returns

Re: [RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Michal Prívozník
On 1/6/22 13:42, Ani Sinha wrote: > > > On Thu, 6 Jan 2022, Michal Prívozník wrote: > >> On 1/6/22 02:33, Raphael Norwitz wrote: >>> Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() >>> returns VIR_ERR_OPERATION_FAILED. This change switches that error code >>> to

Re: [RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Ani Sinha
On Thu, 6 Jan 2022, Michal Prívozník wrote: > On 1/6/22 02:33, Raphael Norwitz wrote: > > Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() > > returns VIR_ERR_OPERATION_FAILED. This change switches that error code > > to VIR_ERR_NO_CONNECT, which is more accurate. > > > >

Re: [RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Michal Prívozník
On 1/6/22 02:33, Raphael Norwitz wrote: > Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() > returns VIR_ERR_OPERATION_FAILED. This change switches that error code > to VIR_ERR_NO_CONNECT, which is more accurate. > > This should help libvirt consumers more intellegently retry

Re: [RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Ani Sinha
On Thu, 6 Jan 2022, Raphael Norwitz wrote: > Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() > returns VIR_ERR_OPERATION_FAILED. This change switches that error code > to VIR_ERR_NO_CONNECT, which is more accurate. Hmm, I am not sure if this would be the right thing.

Re: [PATCH] qemu: agent: remove all code around disabled DEBUG_IO/DEBUG_RAW_IO definitions

2022-01-06 Thread Ani Sinha
On Thu, 6 Jan 2022, Peter Krempa wrote: > On Tue, Jan 04, 2022 at 17:47:43 +0530, Ani Sinha wrote: > > DEBUG_IO and DEBUG_RAW_IO are disabled and hence the code #defined under > > them > > are useless. Remove them. Also remove similar useless code from > > qemu_monitor_json. > > > > See also

Re: [PATCH v3] Add VM info to improve error log message for qemu monitor

2022-01-06 Thread Peter Krempa
On Tue, Jan 04, 2022 at 04:43:11 -0800, Rohit Kumar wrote: > This change adds the domain name in the error and debug logs during > monitor IO processing so that we may infer which VM experienced > errors such as IO or socket hangup. This may help in debugging > monitor IO errors. > >

Re: [PATCH] qemu: agent: remove all code around disabled DEBUG_IO/DEBUG_RAW_IO definitions

2022-01-06 Thread Peter Krempa
On Tue, Jan 04, 2022 at 17:47:43 +0530, Ani Sinha wrote: > DEBUG_IO and DEBUG_RAW_IO are disabled and hence the code #defined under them > are useless. Remove them. Also remove similar useless code from > qemu_monitor_json. > > See also 4aae00bf1287f ("qemu: monitor: Remove disabled debug

[RFC] qemu_migration: Fix virConnectOpenAuth error code

2022-01-06 Thread Raphael Norwitz
Today if virConnectOpenAuth fails, qemuMigrationSrcPerformPeer2Peer() returns VIR_ERR_OPERATION_FAILED. This change switches that error code to VIR_ERR_NO_CONNECT, which is more accurate. This should help libvirt consumers more intellegently retry migrations on intermittent connection failures.

[PATCH 21/21] qemuTestCapsCacheInsert: Rewrite caps cache insertion

2022-01-06 Thread Peter Krempa
Until now we did 2 weird things when inserting the qemuCaps used for individual test cases into the capability cache: 1) we inserted the same caps for all emulators 2) we always (expensively) copied them Now when real capabilities are used we don't touch them at all just simply inser them. This

[PATCH 18/21] qemuxml2argvtest: Enable qemuxml2argv version of 'blkdeviotune' test

2022-01-06 Thread Peter Krempa
Also ensure that the emulator and architecture are correct for DO_TEST_CAPS_LATEST. Signed-off-by: Peter Krempa --- .../blkdeviotune.x86_64-latest.args | 40 +++ tests/qemuxml2argvdata/blkdeviotune.xml | 4 +- tests/qemuxml2argvtest.c | 1 +

[PATCH 16/21] qemuxml2argvtest: Don't insert capabilities into cache twice

2022-01-06 Thread Peter Krempa
Fake capabilities are inserted twice, as in a few tests the architecture is not present in the XML (testing filling in of the architecture). Since we already know which architecture will be picked we don't need to be adding the capabilities twice. This doesn't impact the tests as they use the

[PATCH 19/21] qemuxml2argvtest: Convert 'missing-machine' to DO_TEST_CAPS_LATEST

2022-01-06 Thread Peter Krempa
Emulator binary change is needed to use the latest caps properly. The comment is no longer needed, the expected error is recorded in the 'err' file. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/missing-machine.err| 1 - .../missing-machine.x86_64-latest.err

[PATCH 20/21] qemuTestCapsCacheInsert: Extract code for popluating fake machine types

2022-01-06 Thread Peter Krempa
Separate the code to aid further refactors. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 96 --- 1 file changed, 53 insertions(+), 43 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index bf3f919dde..94ff538382 100644

[PATCH 15/21] qemuxml2argvdata: Use proper arch and emulator for aarch64 real capability tests

2022-01-06 Thread Peter Krempa
Upcoming patches will modify how we populate the capability cache in tests to be more sane. This also means that the emulator binary and architecture used in the test files using real capabilities must match what the real capabilities have. Signed-off-by: Peter Krempa ---

[PATCH 17/21] qemuxml2(xml|argv)test: Test real state of things with 'x86-kvm-32-on-64'

2022-01-06 Thread Peter Krempa
As demonstrated by the qemuxml2xmltest DO_TEST_CAPS_LATEST data based on the 'x86-kvm-32-on-64' test case the post parse CPU selection code which fills in the CPU into the definition does not have exactly the same logic as we used to have when the cpu model was picked when formatting the

[PATCH 12/21] securityselinuxlabeldata: Purge unneeded versioned machine type

2022-01-06 Thread Peter Krempa
Use 'pc' instead. Signed-off-by: Peter Krempa --- tests/securityselinuxlabeldata/chardev.xml | 2 +- tests/securityselinuxlabeldata/disks.xml | 2 +- tests/securityselinuxlabeldata/kernel.xml | 2 +- tests/securityselinuxlabeldata/nfs.xml | 2 +- 4 files changed, 4 insertions(+), 4

[PATCH 04/21] testutilsqemu: Remove unused non-x86 fake machine types

2022-01-06 Thread Peter Krempa
For tests with fake capabilities we fill in a bunch of machine types which the tests might use. For now there's a random collection of machine types which are not actually used. Purge the unused ones for non-x86 machines. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 12 +---

[PATCH 13/21] testutilsqemu: Remove unused fake-caps x86 machine types

2022-01-06 Thread Peter Krempa
None of our tests reference 'isapc', and 'pc-i440fx-2.6'. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 980555b27e..bf3f919dde 100644 ---

[PATCH 11/21] qemuhotplugtestdomains: Remove unnecessary use of versioned pc machine types

2022-01-06 Thread Peter Krempa
The specific machine type is not important for the test. We can use 'pc' instead. Signed-off-by: Peter Krempa --- .../qemuhotplug-console-compat-2-live+console-virtio.xml| 2 +- .../qemuhotplug-console-compat-2-live.xml | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 10/21] tests: qemuxml2argvdata: Purge versioned i440fx machine types from fake-caps tests

2022-01-06 Thread Peter Krempa
Use the 'pc' alias for them as it's equivalent. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/fd-memory-no-numa-topology.args | 2 +- tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml | 2 +- tests/qemuxml2argvdata/fd-memory-numa-topology.args | 2 +-

[PATCH 09/21] qemuxml2(argv|xml)test: Unify usage of DO_TEST_CAPS_LATEST

2022-01-06 Thread Peter Krempa
The qemuxml2argv invocation of some tests used DO_TEST_CAPS_LATEST while the qemuxml2xmltest invocation uses fake caps. Unify them on DO_TEST_CAPS_LATEST. Signed-off-by: Peter Krempa --- .../luks-disks.x86_64-4.1.0.args | 1 + tests/qemuxml2argvdata/luks-disks.xml | 5

[PATCH 08/21] qemuxml2(argv|xml)test: Enable 'controller-usb-order' for qemuxml2argv and convert it to latest caps

2022-01-06 Thread Peter Krempa
Since introduction in fc03eb53c0bf3f654 there wasn't a qemuxml2argv version. As we are touching the files convert them to DO_TEST_CAPS_LATEST directly. Signed-off-by: Peter Krempa --- .../controller-usb-order.x86_64-latest.args | 38 +++ tests/qemuxml2argvtest.c

[PATCH 07/21] qemuxml2xmltest: Replace 'interface-server' by 'net-server' test case

2022-01-06 Thread Peter Krempa
According to commit 5568490 the test case was added to verify that the '' element is covered by the schema. The test was not registered for qemuxml2argvtest though. We can use 'net-server' instead as it has the same type. On the other hand that one was not registered for qemuxml2xmltest.

[PATCH 06/21] tests: qemuxml2argvdata: Remove specific q35 machine types from fake-caps tests

2022-01-06 Thread Peter Krempa
Use q35 instead. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/bios-nvram-secure.args | 2 +- tests/qemuxml2argvdata/bios-nvram-secure.xml | 2 +- tests/qemuxml2argvdata/boot-floppy-q35.args | 2 +- tests/qemuxml2argvdata/boot-floppy-q35.xml

[PATCH 05/21] tests: qemuxml2argvdata: Remove use of 'pc-1.0' and 'pc-1.2' machine types

2022-01-06 Thread Peter Krempa
There's nothing special about the tests requiring to use very old machine types. Most usage is cargo-culted from other tests. Switch all the tests to use 'pc' instead. Signed-off-by: Peter Krempa --- ...launch-security-sev-missing-platform-info.x86_64-2.12.0.args | 2 +-

[PATCH 02/21] qemuDomainNeedsFDC: Simplify and improve checking if a machine needs FDC

2022-01-06 Thread Peter Krempa
Commit c7f3a1f7870 turned qemuDomainMachineNeedsFDC() effectively into qemuDomainIsQ35. Use it instead as it also matches the non-canonicalized 'q35'. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git

[PATCH 03/21] qemuxml2argvtest: Remove redundant floppy controller tests

2022-01-06 Thread Peter Krempa
The two test cases were added to avoid regressions such as fixed in 17dff3584855e9. Nowadays the code is much simpler and any Q35 machine will trigger the explicit FDC. Remove the '2.11' machine type version and turn the '2.9' version into a generic q35 machine. Signed-off-by: Peter Krempa ---

[PATCH 00/21] qemuxml2*test: Improve handling of capabilities

2022-01-06 Thread Peter Krempa
This series originally started as an attempt to remove pointless copying of capabilitiy objects in the qemuxml2argvtest which actually took ~40% of the runtime of the test. Obviously few snags and places for improvements were noticed along the way. Peter Krempa (21):

[PATCH 01/21] qemuProcessPrepareQEMUCaps: Don't clear QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE

2022-01-06 Thread Peter Krempa
All the fd-passing setup of chardevs which this hack meant to disable was moved to the host-preparation phase which is skipped for formatting of non-real commandlines. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff

Re: [libvirt PATCH] util: fix prototype of virDaemonSetupLogging

2022-01-06 Thread Martin Kletzander
On Wed, Jan 05, 2022 at 05:21:11PM +0100, Ján Tomko wrote: The commit that added error checking to this function forgot to adjust the WIN32 stub. Fixes: a873924e36b28c5b125621e35b32beb6b077bcc8 Signed-off-by: Ján Tomko --- Pushed as a build fix. Oops, thanks. src/util/virdaemon.c | 16