Re: [PATCH] hw/misc: deprecate the 'sga' device

2021-09-09 Thread Gerd Hoffmann
On Thu, Sep 09, 2021 at 01:32:19PM +0100, Daniel P. Berrangé wrote: > This is obsolete since SeaBIOS 1.11.0 introduced native support for > sending messages to the serial console. The new support can be > activated using -machine graphics=off on x86 targets. > > Signed-off-by: Daniel P. Berrangé

Re: [PATCH 2/9] security: add virSecurityManagerUpdateImageLabel

2021-09-09 Thread Peng Liang
On 9/9/2021 10:47 PM, Michal Prívozník wrote: > On 9/9/21 1:45 PM, Peng Liang wrote: >> On 9/9/2021 7:01 PM, Michal Prívozník wrote: >>> On 8/23/21 4:41 AM, Peng Liang wrote: Signed-off-by: Peng Liang --- src/libvirt_private.syms| 1 + src/security/security_driver.h

Re: [PATCH v2 0/4] Add support for two i386 pm options which control acpi hotplug

2021-09-09 Thread Laine Stump
On 8/19/21 6:50 AM, Ani Sinha wrote: Hi: I added some negative xml2argv tests as well as new xml2xml tests. In the process, I also fixed a bug where I had not added appropriate code to generate the output xml correctly. The patch series is sent again as v2. Kindly, please provide inputs and

[libvirt PATCH 1/2] conf: reformat virDomainDefCompatibleDevice for upcoming additional check

2021-09-09 Thread Laine Stump
The next patch will add another check similar to the existing check for a change in alias name. This patch reformats the code in preparation so that the next patch's purpose will be clear. Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 15 --- 1 file changed, 8

[libvirt PATCH 2/2] conf: log error on attempts to modify ACPI index of active device

2021-09-09 Thread Laine Stump
The ACPI index of a device in a running guest can't be modified, and libvirt doesn't actually attempt to modify it, but it was possible for a user to request such a modification, and libvirt wouldn't complain, thus misleading the user into thinking that it had actually been changed. Resolves:

[libvirt PATCH 0/2] conf: log error when attempting to live update device acpi index

2021-09-09 Thread Laine Stump
This isn't possible (acpi index is set when devices are probed at guest startup) and libvirt wasn't even trying to communicate the change to the guest in any way, but instead of logging an error, we were just pretending the request had succeeded. Laine Stump (2): conf: reformat

[RFC REPOST 2/7] cgroup: extract setting fibre channel appid into virCgroupSetFCAppid

2021-09-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/qemu/qemu_cgroup.c | 17 + src/util/vircgroup.c | 24 src/util/vircgroup.h | 3 +++ 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/libvirt_private.syms

[RFC REPOST 7/7] tools: introduce virsh setappid command

2021-09-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- docs/manpages/virsh.rst | 14 + tools/virsh-domain.c| 65 + 2 files changed, 79 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 9561b3f59d..36fc94808d 100644 ---

[RFC REPOST 6/7] qemu: implement virDomainSetFibreChannelAppid API

2021-09-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_driver.c | 75 ++ 1 file changed, 75 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bd41ddbc3c..872dedeafe 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[RFC REPOST 4/7] src: introduce virDomainSetFibreChannelAppid API

2021-09-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hypervisor.h | 6 + src/libvirt-domain.c | 44 src/libvirt_public.syms | 1 + 4 files changed, 55 insertions(+) diff --git

[RFC REPOST 3/7] virCgroupSetFCAppid: properly handle when appid is NULL

2021-09-09 Thread Pavel Hrdina
With introduction of live changes of appid we should also support removal of the appid from VM. This is done by writing empty appid part to appid_store file. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RFC REPOST 0/7] introduce support for live appid updates

2021-09-09 Thread Pavel Hrdina
Rebased on top of current master. I'm posting this as an RFC mainly because I'm not sure how to model the new API. This patches introduce a new naive API that will change only the APPID and nothing else. Currently there are no other known features related to Fibre Channel resources so this

[RFC REPOST 5/7] remote: add RPC support for the virDomainSetFibreChannelAppid API

2021-09-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 14 +- src/remote_protocol-structs | 6 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index

[RFC REPOST 1/7] conf: extract appid validation to virDomainDefResourceAppidValidate

2021-09-09 Thread Pavel Hrdina
This will be needed by future patches adding appid API to allow changing it for running VMs. Signed-off-by: Pavel Hrdina --- src/conf/domain_validate.c | 42 +++--- src/conf/domain_validate.h | 2 ++ src/libvirt_private.syms | 1 + 3 files changed, 28

[libvirt PATCH] docs: virtiofs: remove extra slash

2021-09-09 Thread Ján Tomko
Reported-by: Richard W.M. Jones Signed-off-by: Ján Tomko --- Pushed as trivial. docs/kbase/virtiofs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst index b89de0c57a..9123fc2316 100644 --- a/docs/kbase/virtiofs.rst +++

[libvirt PATCH] docs: virtiofs: provide more context for elements

2021-09-09 Thread Ján Tomko
Suggested-by: Richard W.M. Jones Signed-off-by: Ján Tomko --- Pushed as trivial. docs/kbase/virtiofs.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst index d728a1358c..b89de0c57a 100644 ---

Re: [libvirt PATCH 1/2] docs: virtiofs: move legacy docs to the bottom

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Richard W.M. Jones wrote: On Thu, Sep 09, 2021 at 03:58:28PM +0100, Stefan Hajnoczi wrote: A number of legacy issues make the virtiofs kbase article hard to understand. Most users don't need to configure NUMA or a memory backend other than memfd. Move that information to

Re: [libvirt PATCH 2/2] docs: virtiofs: use the preferred virtiofs spelling

2021-09-09 Thread Stefan Hajnoczi
On Thu, Sep 09, 2021 at 05:33:43PM +0200, Ján Tomko wrote: > On a Thursday in 2021, Stefan Hajnoczi wrote: > > The virtiofs project started off using "virtio-fs" but later switched to > > the "virtiofs" spelling because it matches the spelling of the mount -t > > virtiofs command-line. Update the

Re: [libvirt PATCH 1/2] docs: virtiofs: move legacy docs to the bottom

2021-09-09 Thread Richard W.M. Jones
On Thu, Sep 09, 2021 at 03:58:28PM +0100, Stefan Hajnoczi wrote: > A number of legacy issues make the virtiofs kbase article hard to > understand. Most users don't need to configure NUMA or a memory backend > other than memfd. Move that information to the bottom of the article so > the recommended

Re: [libvirt PATCH 2/2] docs: virtiofs: use the preferred virtiofs spelling

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Stefan Hajnoczi wrote: The virtiofs project started off using "virtio-fs" but later switched to the "virtiofs" spelling because it matches the spelling of the mount -t virtiofs command-line. Update the kbase article with the new spelling so it matches the virtiofs website.

Re: [libvirt PATCH 1/2] docs: virtiofs: move legacy docs to the bottom

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Stefan Hajnoczi wrote: A number of legacy issues make the virtiofs kbase article hard to understand. Most users don't need to configure NUMA or a memory backend other than memfd. Move that information to the bottom of the article so the recommended syntax is most

Re: [libvirt PATCH 23/24] tests: vir: remove pointless labels

2021-09-09 Thread Laine Stump
On 9/9/21 10:28 AM, Ján Tomko wrote: On a Monday in 2021, Laine Stump wrote: On 9/4/21 4:44 PM, Ján Tomko wrote: @@ -319,9 +308,9 @@ testFileIsSharedFSType(const void *opaque G_GNUC_UNUSED) return EXIT_AM_SKIP;  #else const struct testFileIsSharedFSType *data = opaque; +    int ret

[libvirt PATCH 2/2] docs: virtiofs: use the preferred virtiofs spelling

2021-09-09 Thread Stefan Hajnoczi
The virtiofs project started off using "virtio-fs" but later switched to the "virtiofs" spelling because it matches the spelling of the mount -t virtiofs command-line. Update the kbase article with the new spelling so it matches the virtiofs website. Signed-off-by: Stefan Hajnoczi ---

[libvirt PATCH 1/2] docs: virtiofs: move legacy docs to the bottom

2021-09-09 Thread Stefan Hajnoczi
A number of legacy issues make the virtiofs kbase article hard to understand. Most users don't need to configure NUMA or a memory backend other than memfd. Move that information to the bottom of the article so the recommended syntax is most prominent. Suggested-by: Richard W.M. Jones

[libvirt PATCH 0/2] docs: virtiofs: move legacy docs to the bottom

2021-09-09 Thread Stefan Hajnoczi
The virtiofs kbase article includes a lot of information that is only relevant to old versions of QEMU and libvirt. Setting up virtiofs can seem intimidating but it's actually easier than the article lets on. Move the legacy information out of the way. Stefan Hajnoczi (2): docs: virtiofs: move

Re: [PATCH 2/9] security: add virSecurityManagerUpdateImageLabel

2021-09-09 Thread Michal Prívozník
On 9/9/21 1:45 PM, Peng Liang wrote: > On 9/9/2021 7:01 PM, Michal Prívozník wrote: >> On 8/23/21 4:41 AM, Peng Liang wrote: >>> Signed-off-by: Peng Liang >>> --- >>> src/libvirt_private.syms| 1 + >>> src/security/security_driver.h | 5 + >>> src/security/security_manager.c | 29

Re: [libvirt PATCH 23/24] tests: vir: remove pointless labels

2021-09-09 Thread Ján Tomko
On a Monday in 2021, Laine Stump wrote: On 9/4/21 4:44 PM, Ján Tomko wrote: @@ -319,9 +308,9 @@ testFileIsSharedFSType(const void *opaque G_GNUC_UNUSED) return EXIT_AM_SKIP; #else const struct testFileIsSharedFSType *data = opaque; +int ret = -1; g_autofree char *mtabFile =

Re: [libvirt PATCH v3 0/7] Enable autostarting mediated devices

2021-09-09 Thread Michal Prívozník
On 8/21/21 12:29 AM, Jonathon Jongsma wrote: > This first version of this series was reviewed quite a while ago and all > patches were ACKed except the second one. I posted a second series with > changes > noted below but it was never ACKed and I dropped the ball for a little while. > >

Re: [PATCH] virsh: Display vhostuser socket path in domblklist

2021-09-09 Thread Michal Prívozník
On 9/3/21 10:54 AM, dinglimin wrote: > The domblklist command is designed to show a brief information about the > blocks of a domain. > One piece of information that is shows is "Target "and "Source". > Before the modification, the Vhost disk of SPDK is displayed as "-". > After the modification,

[PATCH] hw/misc: deprecate the 'sga' device

2021-09-09 Thread Daniel P . Berrangé
This is obsolete since SeaBIOS 1.11.0 introduced native support for sending messages to the serial console. The new support can be activated using -machine graphics=off on x86 targets. Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst | 10 ++ hw/misc/sga.c |

Re: [libvirt PATCH 0/4] qemu: replace -device sga with -M graphics=off

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Daniel P. Berrangé wrote: SeaBIOS >= 1.11 / QEMU >= 2.11 no longer requires the 'sga' device for serial console output from the BIOS. It can be done directly with graphics=off machine option. This appears to be live migration compatible, despite changing the number of

Re: [libvirt PATCH 1/4] qemu: prevent use of on non-x86 arches

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Daniel P. Berrangé wrote: The config results in use of the '-device sga' QEMU options. This in turn causes QEMU go load the sgabios.bin option ROM, which contains x86 machine code. This cannot work on non-x86 arches, thus we should block the bad config. Signed-off-by:

Re: [PATCH 3/3] qemu: Add support for virtio device option paeg-per-vq

2021-09-09 Thread Michal Prívozník
On 9/6/21 4:06 PM, Han Han wrote: > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > Signed-off-by: Han Han > --- > src/qemu/qemu_command.c | 4 ++ > src/qemu/qemu_hotplug.c | 3 +- > src/qemu/qemu_validate.c |

Re: [PATCH 2/9] security: add virSecurityManagerUpdateImageLabel

2021-09-09 Thread Peng Liang
On 9/9/2021 7:01 PM, Michal Prívozník wrote: > On 8/23/21 4:41 AM, Peng Liang wrote: >> Signed-off-by: Peng Liang >> --- >> src/libvirt_private.syms| 1 + >> src/security/security_driver.h | 5 + >> src/security/security_manager.c | 29 + >>

Re: [PATCH 9/9] migration: update image labels in dst after migration

2021-09-09 Thread Peng Liang
On 9/9/2021 7:01 PM, Michal Prívozník wrote: > On 8/23/21 4:41 AM, Peng Liang wrote: >> Bacause the timestamp (the uptime of the host) is used to validate the >> remembered labels, it need to update after migration. >> >> Signed-off-by: Peng Liang >> --- >> src/qemu/qemu_migration.c | 12

Re: [PATCH 7/9] migration: don't remember image labels when migrating with shared fs

2021-09-09 Thread Peng Liang
On 9/9/2021 7:01 PM, Michal Prívozník wrote: > On 8/23/21 4:41 AM, Peng Liang wrote: >> When migrating with shared fs, the image labels has been remembered and >> the ownership of the image has been set in the src host. If the dst >> host remembers the ownership of the image again, the ownership

Re: [PATCH] qemu_driver:report guest interface informations

2021-09-09 Thread Michal Prívozník
On 8/30/21 7:35 AM, scuzhanglei wrote: > Signed-off-by: scuzhanglei > --- > NEWS.rst | 5 ++ > docs/manpages/virsh.rst | 12 - > include/libvirt/libvirt-domain.h | 1 + > src/libvirt-domain.c | 12 + > src/qemu/qemu_agent.c| 9

[libvirt PATCH 2/4] qemu: tweak error message to be more general purpose

2021-09-09 Thread Daniel P . Berrangé
The BIOS serial console output is currently implemented using the QEMU 'sga' device, but this is going to change in future patches, so the error message ought to be more generically phrased. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt PATCH 4/4] qemu: stop probing for '-device sga' support

2021-09-09 Thread Daniel P . Berrangé
Since we no longer use '-device sga' we can stop probing for this device in our capabilities code. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +-

[libvirt PATCH 0/4] qemu: replace -device sga with -M graphics=off

2021-09-09 Thread Daniel P . Berrangé
SeaBIOS >= 1.11 / QEMU >= 2.11 no longer requires the 'sga' device for serial console output from the BIOS. It can be done directly with graphics=off machine option. This appears to be live migration compatible, despite changing the number of option ROMS loaded, though I need a little more

[libvirt PATCH 1/4] qemu: prevent use of on non-x86 arches

2021-09-09 Thread Daniel P . Berrangé
The config results in use of the '-device sga' QEMU options. This in turn causes QEMU go load the sgabios.bin option ROM, which contains x86 machine code. This cannot work on non-x86 arches, thus we should block the bad config. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_validate.c | 8

[libvirt PATCH 3/4] qemu: switch to use -M graphics=off instead of -device sga

2021-09-09 Thread Daniel P . Berrangé
SeaBIOS >= 1.11 has built-in support for outputting to the serial console when QEMU sets -M graphics=off. Our minimum QEMU version is 2.11.0, which bundled SeaBIOS 1.11. Thus we have no need to use '-device sga' anymore. This change results in a slight layout difference for option ROMs in memory,

Re: [PATCH 2/9] security: add virSecurityManagerUpdateImageLabel

2021-09-09 Thread Michal Prívozník
On 8/23/21 4:41 AM, Peng Liang wrote: > Signed-off-by: Peng Liang > --- > src/libvirt_private.syms| 1 + > src/security/security_driver.h | 5 + > src/security/security_manager.c | 29 + > src/security/security_manager.h | 5 + > 4 files changed,

Re: [PATCH 9/9] migration: update image labels in dst after migration

2021-09-09 Thread Michal Prívozník
On 8/23/21 4:41 AM, Peng Liang wrote: > Bacause the timestamp (the uptime of the host) is used to validate the > remembered labels, it need to update after migration. > > Signed-off-by: Peng Liang > --- > src/qemu/qemu_migration.c | 12 > 1 file changed, 12 insertions(+) > > diff

Re: [PATCH 7/9] migration: don't remember image labels when migrating with shared fs

2021-09-09 Thread Michal Prívozník
On 8/23/21 4:41 AM, Peng Liang wrote: > When migrating with shared fs, the image labels has been remembered and > the ownership of the image has been set in the src host. If the dst > host remembers the ownership of the image again, the ownership of the > image remembered in the src host (the

Re: [PATCHv4 0/9] ch: Add Console support

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 11:01:14AM -0700, William Douglas wrote: > This series enables console support in the cloud-hypervisor driver. > > Cloud-hypervisor only supports a single console or serial device at a > time, hence the checks to ensure the domain configuration is only > passing one or the

Re: [PATCH 3/9] ch_monitor: Update virCHMonitorGet to handle accept a response

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 09:48:48AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 08, 2021 at 11:01:17AM -0700, William Douglas wrote: > > The virCHMonitorGet function needed to be able to return data from the > > hypervisor. This functionality is needed in order for the driver to > > support PTY

Re: [PATCH 00/24] virstoragetest: Re-instate testing of images without backing format

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Most of the series are refactors to make virstoragetest less archaic, the last commit then re-introduces testing of images which don't have backing format recorded in the metadata which can't be formatted using qemu-img any more but have security

Re: [PATCH 16/24] virstoragetest: Stop rewriting images in 'mymain'

2021-09-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: For testing of real images formatted by 'qemu-img' it's now sufficient to format them once without the need to rewrtie them since we use the real images only for testing of one scenario. This allows us to also remove moust of the global variables

Re: [PATCH 1/9] ch_domain: Add virChrdevs for console support

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 11:01:15AM -0700, William Douglas wrote: > Add and initialize a virChrdevs to the _virCHDomainObjPrivate > structure in order to eventually track the consoles in use by a domain. > > Signed-off-by: William Douglas > --- > src/ch/ch_domain.c | 7 +++ >

Re: [PATCH 2/9] ch_monitor: Make unused function static

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 11:01:16AM -0700, William Douglas wrote: > The virCHMonitorGet function wasn't in use and was declared as > non-static (though not in a header file). This function isn't going to > be used outside of the monitor though so remove the initial > declaration and define the

[PATCH 11/24] virstoragetest: Use preformatted file for testing missing backing store

2021-09-09 Thread Peter Krempa
Similarly to previous ones, this one doesn't need to be created by qemu-img in order for the test to make sense. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 12 +++- .../images/qcow2_qcow2-missing.qcow2 | Bin 0 -> 196616 bytes 2 files

[PATCH 20/24] virstoragetest: testPrepImages: Use 'qemu-img' to format 'raw' image

2021-09-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 90dde512cf..c258bc1709 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -86,9 +86,9 @@

[PATCH 24/24] virstoragetest: Reinstate testing of images without 'backing_fmt'

2021-09-09 Thread Peter Krempa
There are important security implications when we'd misprobe those images. This commit reinstates the tests removed by commit 979d1ba3ae13 since 'qemu-img' refused to format them. With the new testing approach with stored images we won't run into that problem. Signed-off-by: Peter Krempa ---

[PATCH 23/24] virstoragetest: Remove pointless goto from mymain

2021-09-09 Thread Peter Krempa
Improve the error message and abort the test. Continuing here is not desired as without chdiring into the appropriate directory the test would fail anyways and worse could attempt stat-ing random files on the host. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 6 +++--- 1 file

[PATCH 22/24] virstoragetest: Don't skip the whole test when qemu-img fails to format images

2021-09-09 Thread Peter Krempa
We have plenty of other work to do in this test. Skip only the real image testing case when we can't find qemu-img or it failed to format the image. This allows us to also remove the last global variable in the test and move the creation and cleanup of the images closer to the actual test.

[PATCH 19/24] virstoragetest: testPrepImages: Don't reuse 'cmd' pointer

2021-09-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 955ac64e0b..90dde512cf 100644 --- a/tests/virstoragetest.c +++

[PATCH 21/24] virstoragetest: testStorageChain: Skip test if filename is NULL

2021-09-09 Thread Peter Krempa
Prepare the test runner for skipping individual tests if images can't be formatted rather than the whole virstoragetest. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index

[PATCH 18/24] virstoragetest: Assume that 'qemu-img' supports '-o compat='

2021-09-09 Thread Peter Krempa
All supported qemu versions have the parameter, so we don't need to check. This allows us to simplify the code used for formating real images for virstoragetest. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 31 +-- 1 file changed, 9 insertions(+), 22

[PATCH 15/24] virstoragetest: Unify testing of QCOW2 images with absolute backing

2021-09-09 Thread Peter Krempa
We have 3 test cases for this currently: 1) "qcow2->raw" 1.1) VIR_STORAGE_FILE_QCOW2 as top level format 1.2) VIR_STORAGE_FILE_AUTO as top level format 2) "wrap->qcow2->raw" whith just VIR_STORAGE_FILE_QCOW2 This patch adds also testing of VIR_STORAGE_FILE_AUTO for case 2) and removes both 1)

[PATCH 17/24] virstoragetest: Don't rewrite the 'qcow2' image

2021-09-09 Thread Peter Krempa
Create it with the appropriate backing file path rather than using another instance of 'qemu-img rebase'. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c

[PATCH 16/24] virstoragetest: Stop rewriting images in 'mymain'

2021-09-09 Thread Peter Krempa
For testing of real images formatted by 'qemu-img' it's now sufficient to format them once without the need to rewrtie them since we use the real images only for testing of one scenario. This allows us to also remove moust of the global variables holding the path to the images which was necessary

[PATCH 14/24] virstoragetest: Use preformatted qcow2 image for testing relative paths

2021-09-09 Thread Peter Krempa
More preparation for eliminating image rewriting. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 8 ++-- .../images/qcow2_raw-raw-relative.qcow2| Bin 0 -> 196616 bytes .../out/qcow2-auto_raw-raw-relative| 2 +-

[PATCH 13/24] virstoragetest: Convert symlink and relative image testing use preformatted images

2021-09-09 Thread Peter Krempa
Use prepared test images instead to simplify and clarify the code instead of rewriting existing images multiple times. Signed-off-by: Peter Krempa --- tests/virstoragetest.c| 39 +++--- ...2_qcow2-qcow2-symlink_raw-raw-reldir.qcow2 | Bin 0 -> 196616 bytes

[PATCH 12/24] virstoragetest: Use existing file for testing 'raw' image lookup

2021-09-09 Thread Peter Krempa
We've already added a 'raw' file to the example image directory so we can use that instead of formatting one. Signed-off-by: Peter Krempa --- tests/virstoragetest.c| 8 ++-- tests/virstoragetestdata/out/raw-auto | 2 +- tests/virstoragetestdata/out/raw-raw | 2 +- 3 files

[PATCH 10/24] virstoragetest: Use pre-formatted file for non-path extraction test

2021-09-09 Thread Peter Krempa
This one doesn't require using qemu-img either. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 13 +++-- .../images/qcow2_nbd-raw.qcow2 | Bin 0 -> 196616 bytes .../virstoragetestdata/out/qcow2-qcow2_nbd-raw | 2 +- 3 files changed, 4

[PATCH 09/24] virstoragetest: Use a pre-formatted QED file for testing backing store extraction

2021-09-09 Thread Peter Krempa
The QED format isn't really being developed any more. Use a pre-formatted image to test the existing code. In this instance we switch to using a relative backing path for simplicity. Signed-off-by: Peter Krempa --- tests/virstoragetest.c| 21 +-

[PATCH 06/24] virstoragetest: Rework TEST_LOOKUP* cases to work on fake backing chain

2021-09-09 Thread Peter Krempa
Rather than using 'qemu-img' and rewriting the chain we can use fake data and few empty files to ensure the same level of coverage. This is possible since we've already tested that the metadata parsing from files works properly and the only thing we are testing here is that the symlink resolution

[PATCH 08/24] virstoragetest: Use existing directory in the source tree for 'directory' probing tests

2021-09-09 Thread Peter Krempa
We don't need a special directory for the tests. Reuse the directory holding the data for the virstoragetest. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 13 +++-- tests/virstoragetestdata/out/directory-dir | 2 +-

[PATCH 07/24] virstoragetest: Test backing chain loops with hardcoded images

2021-09-09 Thread Peter Krempa
Provide the images for the self and mutual backing image loop cases in the repository rather than formatting them with qemu-img. This makes the code more readable and also decouples the backing chain tests from each other. Signed-off-by: Peter Krempa --- build-aux/syntax-check.mk

[PATCH 05/24] virstoragetest: Remove redundant arguments for chain lookup tests

2021-09-09 Thread Peter Krempa
Passing in both "chain*" and "chain*->path" is pointless. Use only the full struct which we can use to infer the rest. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 201 +++-- 1 file changed, 94 insertions(+), 107 deletions(-) diff --git

[PATCH 04/24] virstoragetest: Store output of TEST_CHAIN in output files

2021-09-09 Thread Peter Krempa
The TEST_CHAIN cases were storing the expected output (or rather data to generate the expected output) in code. This made the code really hard to follow and even harder to modify to add new cases. This patch modifies the code to store the expected output in text files (using the same generator as

[PATCH 03/24] testutils: Introduce helper for stripping bulilddir/srcdir from test outputs

2021-09-09 Thread Peter Krempa
In certain cases we want to be able to compare test output containing real paths against a static output file and thus we need a helper which strips srcdir/builddir from given path. Signed-off-by: Peter Krempa --- tests/testutils.c | 30 ++ tests/testutils.h | 3 +++

[PATCH 01/24] virstoragetest: Drop testing of RBD backends via parsing real images

2021-09-09 Thread Peter Krempa
We now have specific tests for the backing store parser and previous tests cover the extraction of the backing store string so there's no need for these particular tests. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 38 -- 1 file changed, 38

[PATCH 02/24] virstoragetest: Drop testing of NBD backends via parsing real images

2021-09-09 Thread Peter Krempa
We now have specific tests for the backing store parser and previous tests cover the extraction of the backing store string so there's no need for these particular tests. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 31 --- 1 file changed, 31 deletions(-)

[PATCH 00/24] virstoragetest: Re-instate testing of images without backing format

2021-09-09 Thread Peter Krempa
Most of the series are refactors to make virstoragetest less archaic, the last commit then re-introduces testing of images which don't have backing format recorded in the metadata which can't be formatted using qemu-img any more but have security implications if we'd mishandle them. Peter Krempa

Re: [PATCH 3/9] ch_monitor: Update virCHMonitorGet to handle accept a response

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 11:01:17AM -0700, William Douglas wrote: > The virCHMonitorGet function needed to be able to return data from the > hypervisor. This functionality is needed in order for the driver to > support PTY enablement and getting details about the VM state. > > Signed-off-by: