[PATCH 00/10] More real qemu capability testing cleanups

2023-07-04 Thread Peter Krempa
Few other patches to move towards purely real qemu-caps testing. Peter Krempa (10): testutils: Print number of failed tests domaincapstest: Use obviously fake firmware name in capabilities testQemuGetRealCaps: Strip the default machine alias before insertion into cache

[PATCH 07/10] tests: qemudomainsnapshotxml2xmlout: Use real 'x86_64' capabilities in all test data

2023-07-04 Thread Peter Krempa
Use the platform which is getting most development for the snapshot XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa --- .../disk_snapshot_redefine.xml | 9 ++--- .../external_vm_redefine.xml | 9

[PATCH 09/10] qemudomaincheckpointxml2xmltest: Use real 'x86_64' capabilities in all test data

2023-07-04 Thread Peter Krempa
Use the platform which is getting most development for the checkpoint XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa --- .../internal-active-invalid.xml | 4 ++-- .../internal-inactive-invalid.xml| 4

[PATCH 10/10] qemuTestDriverInit: Don't autopopulate qemu capabilities when initializing driver

2023-07-04 Thread Peter Krempa
In an effort to use strictly real capability testing all tests were converted to do insertion of their own capabilities when required, thus we don't need to popluate the capabilities. This will also promote using proper capabilities based on what the test is trying to achieve. Signed-off-by:

[PATCH 08/10] qemuagenttest: Use real x86_64 capabilities for parsing domain definitions

2023-07-04 Thread Peter Krempa
Some test cases require a real definition and thus parse a XML with the definition to obtain it. Convert the code to use real capabilities and switch to x86_64. Signed-off-by: Peter Krempa --- tests/qemuagentdata/fsinfo.xml | 4 ++-- tests/qemuagenttest.c | 8 2 files changed,

[PATCH 03/10] testQemuGetRealCaps: Strip the default machine alias before insertion into cache

2023-07-04 Thread Peter Krempa
Expand the default machine type alias of the 'latest' capabilities for an architecture before caching it rather than after copying it, so that we don't duplicate the work all the time. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 05/10] testutilsqemu: Introduce 'testQemuInsertRealCaps' helper

2023-07-04 Thread Peter Krempa
'testQemuInsertRealCaps' looks up and inserts real capabilities into the capability 'file cache' for testing purposes. Effectively this helper replaces following steps: 1) testQemuGetRealCaps 2) virFileCacheClear 3) qemuTestCapsCacheInsert This helper doesn't copy the capabilities that are

[PATCH 06/10] qemumemlocktest: Use 'testQemuInsertRealCaps'

2023-07-04 Thread Peter Krempa
Rewrite the capability fetching to use the new helper, thus simplifying the code. Signed-off-by: Peter Krempa --- tests/qemumemlocktest.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c index

[PATCH 02/10] domaincapstest: Use obviously fake firmware name in capabilities

2023-07-04 Thread Peter Krempa
The domain capabilities data feature a firmware section which is filled by few entries. The entries used until now looked real and it was suspicious that a x86_64 host was listing aarch64 firmware images which should not happen. Fill it by an obviously fake path as it's not actually interpreted

[PATCH 04/10] testQemuGetRealCaps: Extract caching of the caps into a new helper

2023-07-04 Thread Peter Krempa
Introduce testQemuGetRealCapsInternal that loads and caches the capabilities. testQemuGetRealCaps just copies the cache entry and returns it to the user. The new helper will be used in a helper that doesn't modify the capabilities and thus we don't need to copy it before use. Signed-off-by:

[PATCH 01/10] testutils: Print number of failed tests

2023-07-04 Thread Peter Krempa
We can easily report how many tests failed. 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 d77b9e8db2..e546422941 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -922,7

[libvirt PATCH] docs: index: Add a quick link to Submitting patches

2023-07-04 Thread Erik Skultety
We still get MRs in Gitlab from individual contributors on a regular basis which in some ways just makes maintainer's or reviewer's life just a bit more complicated. This ultimately means our guidelines are probably not visible enough on the main page (or some people wouldn't read them anyway).

[PATCH 2/2] remote: fix stream use-after-free

2023-07-04 Thread Oleg Vasilev
Inside daemonStreamHandleWrite on stream completion (status=OK) we reuse msg object to send confirmation. Only after that, msg is poped from the queue and checked for continue. By that time, msg might've already been processed for the confirmation and freed. Signed-off-by: Oleg Vasilev ---

[PATCH 1/2] net: add debug logs

2023-07-04 Thread Oleg Vasilev
Helped to debug next patch use-after-free. Signed-off-by: Oleg Vasilev --- src/remote/remote_daemon_stream.c | 4 ++-- src/rpc/virnetmessage.c | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_daemon_stream.c

[PATCH 0/2] fix use-after-free in network IO

2023-07-04 Thread Oleg Vasilev
Found by repeatedly created and destroyed channels with guest agent. More details in the patch. Oleg Vasilev (2): net: add debug logs remote: fix stream use-after-free src/remote/remote_daemon_stream.c | 13 +++-- src/rpc/virnetmessage.c | 5 + 2 files changed, 12