Re: [PATCH 01/10] tests: qemucaps: Make JSON output identical to python's 'json.dump' method

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 08:33:42 -0800, Andrea Bolognani wrote: > On Tue, Jan 16, 2024 at 05:12:35PM +0100, Peter Krempa wrote: > > diff --git a/tests/qemucapabilitiesnumbering.c > > b/tests/qemucapabilitiesnumbering.c > > index 6f33321e17..2aabdf72c7 100644 > > --- a/tests/qemucapabilitiesnumberi

Re: [PATCH 03/10] scripts: Add 'qemu-qmp-replies-tool' script for testing and modifying data for qemucapabilitiestest

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 09:06:54 -0800, Andrea Bolognani wrote: > On Tue, Jan 16, 2024 at 05:12:37PM +0100, Peter Krempa wrote: > > scripts: Add 'qemu-qmp-replies-tool' script for testing and modifying data > > for qemucapabilitiestest > > s/qmp-// > > > +try: > > +for line i

Re: [PATCH 07/10] qemu-replies-tool: Add validation of known fields in 'query-qmp-schema'

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 09:47:11 -0800, Andrea Bolognani wrote: > On Tue, Jan 16, 2024 at 05:12:41PM +0100, Peter Krempa wrote: > > +def validate_qmp_schema_check_keys(entry, mandatory, optional): > > +keys = set(entry.keys()) > > + > > +for k, t in mandatory: > > +try: > > +

Re: [PATCH 08/10] qemu-replies-tool: Add mode to dump all QMP schema query strings

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 10:03:52 -0800, Andrea Bolognani wrote: > On Tue, Jan 16, 2024 at 05:12:42PM +0100, Peter Krempa wrote: > > +# Recursively traverse the schema and print out the schema query strings > > for > > +# the corresponding entries. In certain cases the schema references itself, > >

Re: QEMU Blocl librbd encryption bugfix

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 11:17:19 -0700, Caleb Davis wrote: > Hello there, > > As users of libvirt and rbd, we've run into a bug when using encrypted > images with libvirt where `engine=librbd`. This bug has been addressed by a > patch submitted to the mailing list in January of 2023: > > https://

Re: Re: [PATCH 03/10] scripts: Add 'qemu-qmp-replies-tool' script for testing and modifying data for qemucapabilitiestest

2024-01-26 Thread Andrea Bolognani
On Fri, Jan 26, 2024 at 09:30:29AM +0100, Peter Krempa wrote: > On Thu, Jan 25, 2024 at 09:06:54 -0800, Andrea Bolognani wrote: > > I've never seen the 'raise Foo() from None' pattern though. Can you > > explain why it's needed here? > > Python would re-raise the original exception along with the n

Re: Re: [PATCH 01/10] tests: qemucaps: Make JSON output identical to python's 'json.dump' method

2024-01-26 Thread Andrea Bolognani
On Fri, Jan 26, 2024 at 09:23:47AM +0100, Peter Krempa wrote: > On Thu, Jan 25, 2024 at 08:33:42 -0800, Andrea Bolognani wrote: > > On Tue, Jan 16, 2024 at 05:12:35PM +0100, Peter Krempa wrote: > > > +/* YAJL formats empty objects and arrays in a weird way: > > > + * > > > +

Re: Re: [PATCH 08/10] qemu-replies-tool: Add mode to dump all QMP schema query strings

2024-01-26 Thread Andrea Bolognani
On Fri, Jan 26, 2024 at 09:37:54AM +0100, Peter Krempa wrote: > On Thu, Jan 25, 2024 at 10:03:52 -0800, Andrea Bolognani wrote: > > On Tue, Jan 16, 2024 at 05:12:42PM +0100, Peter Krempa wrote: > > > +# Recursively traverse the schema and print out the schema query strings > > > for > > > +# the c

Re: Re: Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-26 Thread Andrea Bolognani
On Mon, Jan 22, 2024 at 01:24:41AM -0800, Andrea Bolognani wrote: > On Sun, Jan 21, 2024 at 07:50:02PM +, Daniel P. Berrangé wrote: > > On Sat, Jan 20, 2024 at 11:30:10PM +0100, Andrea Bolognani wrote: > > > The script expects each of the symbols that it looks for to > > > be in one of three se

[PATCH 0/3] tests: Improve ABI_UPDATE macros

2024-01-26 Thread Andrea Bolognani
Andrea Bolognani (3): tests: Drop ppc64-usb-controller-legacy tests: Use ABI_UPDATE macros more tests: Improve ABI_UPDATE macros ...fi-aarch64.aarch64-latest.abi-update.args} | 0 ...efi-aarch64.aarch64-latest.abi-update.xml} | 0 .../firmware-auto-efi-abi-update-aarch64.xml | 1 - ..

[PATCH 2/3] tests: Use ABI_UPDATE macros more

2024-01-26 Thread Andrea Bolognani
In one case, the macro was open-coded. Signed-off-by: Andrea Bolognani --- tests/qemuxmlconftest.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index be2386f730..840c01b2d7 100644 --- a/tests/qemuxmlconftest.c +++ b/tes

[PATCH 1/3] tests: Drop ppc64-usb-controller-legacy

2024-01-26 Thread Andrea Bolognani
The input file is a symlink for the ppc64-usb-controller input file, so the output files are identical as well. It's just an unnecessary duplicate. Signed-off-by: Andrea Bolognani --- ...64-usb-controller-legacy.ppc64-latest.args | 33 ...c64-usb-controller-legacy.ppc64-latest.x

[PATCH 3/3] tests: Improve ABI_UPDATE macros

2024-01-26 Thread Andrea Bolognani
There are a number of cases in which we want to test both the normal behavior and the ABI_UPDATE behavior for the same input XML. The way this is currently implemented is ad-hoc, and involves symlinking the input XML as well as coming up with an alternative name for the ABI_UPDATE variant: in most

Re: Re: [PATCH 13/33] qemu: Drop qemuDomainSetSCSIControllerModel()

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 10:16:55 -0800, Andrea Bolognani wrote: > On Thu, Jan 25, 2024 at 11:17:46AM +0100, Peter Krempa wrote: > > On Thu, Jan 25, 2024 at 11:15:14 +0100, Peter Krempa wrote: > > > On Wed, Jan 24, 2024 at 20:37:33 +0100, Andrea Bolognani wrote: > > > > @@ -5584,7 +5584,9 @@ > > >

Re: Re: [PATCH 15/33] qemu: Simplify qemuDomainFindOrCreateSCSIDiskController()

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 10:20:05 -0800, Andrea Bolognani wrote: > On Thu, Jan 25, 2024 at 01:07:10PM +0100, Peter Krempa wrote: > > On Wed, Jan 24, 2024 at 20:37:35 +0100, Andrea Bolognani wrote: > > > @@ -876,10 +876,9 @@ > > > qemuDomainFindOrCreateSCSIDiskController(virDomainObj *vm, > > >

Re: Re: [PATCH 17/33] qemu: Rename qemuDomainDefaultSCSIControllerModel()

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 10:34:54 -0800, Andrea Bolognani wrote: > On Thu, Jan 25, 2024 at 01:45:30PM +0100, Peter Krempa wrote: > > Summary states just "Rename" > > But logic is changed. Don't mislead in the summary. It's acceptable to > > rename the function as side effect of logic changes rather

Re: Re: [PATCH 25/33] qemu: Add qemuDomainDefaultSerialModel()

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 11:07:41 -0800, Andrea Bolognani wrote: > On Thu, Jan 25, 2024 at 03:50:33PM +0100, Peter Krempa wrote: > > On Wed, Jan 24, 2024 at 20:37:45 +0100, Andrea Bolognani wrote: > > > +static int > > > > IMO at this point you can return virDomainChrSerialTargetModel. > > Sure, I

Re: [PATCH 02/10] syntax-check: Exclude 'scripts/*.py' from 'sc_prohibit_magic_number_exit'

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 08:34:40 -0800, Andrea Bolognani wrote: > On Tue, Jan 16, 2024 at 05:12:36PM +0100, Peter Krempa wrote: > > +++ b/build-aux/syntax-check.mk > > @@ -1516,6 +1516,9 @@ exclude_file_name_regexp--sc_black = \ > > exclude_file_name_regexp--sc_spacing-check = \ > >^scripts/rp

Re: Re: [PATCH 20/33] qemu: Enhance qemuDomainDefaultUSBControllerModel()

2024-01-26 Thread Peter Krempa
On Thu, Jan 25, 2024 at 10:59:29 -0800, Andrea Bolognani wrote: > On Thu, Jan 25, 2024 at 03:00:10PM +0100, Peter Krempa wrote: > > On Wed, Jan 24, 2024 at 20:37:40 +0100, Andrea Bolognani wrote: > > > +/** > > > + * qemuDomainDefaultUSBControllerModel: > > > + * @def: domain definition > > > + * @

Re: Re: [PATCH 03/10] scripts: Add 'qemu-qmp-replies-tool' script for testing and modifying data for qemucapabilitiestest

2024-01-26 Thread Peter Krempa
On Fri, Jan 26, 2024 at 01:38:05 -0800, Andrea Bolognani wrote: > On Fri, Jan 26, 2024 at 09:30:29AM +0100, Peter Krempa wrote: > > On Thu, Jan 25, 2024 at 09:06:54 -0800, Andrea Bolognani wrote: > > > I've never seen the 'raise Foo() from None' pattern though. Can you > > > explain why it's needed

[PATCH v2 03/10] scripts: Add 'qemu-replies-tool' script for testing and modifying data for qemucapabilitiestest

2024-01-26 Thread Peter Krempa
The tool in the current shape functionally replaces tests/qemucapabilitiesnumbering.c It validates that the output '.replies' files conform to how we generate them from qemu and also allows programmatic modification of the '.replies' files if re-generation is not feasible any more. The main advan

Re: [PATCH 0/3] tests: Improve ABI_UPDATE macros

2024-01-26 Thread Peter Krempa
On Fri, Jan 26, 2024 at 12:57:56 +0100, Andrea Bolognani wrote: > > > Andrea Bolognani (3): > tests: Drop ppc64-usb-controller-legacy > tests: Use ABI_UPDATE macros more > tests: Improve ABI_UPDATE macros Reviewed-by: Peter Krempa ___ Devel mail

Re: [PATCH v2 03/10] scripts: Add 'qemu-replies-tool' script for testing and modifying data for qemucapabilitiestest

2024-01-26 Thread Andrea Bolognani
On Fri, Jan 26, 2024 at 03:22:57PM +0100, Peter Krempa wrote: > +# Process the replies file programmatically here. > +# The 'conv' argument contains the whole conversation as a list of > +# (command, reply) tuples, where both command and reply are already parsed > JSON > +# and thus represented by

Re: Re: [PATCH 07/10] qemu-replies-tool: Add validation of known fields in 'query-qmp-schema'

2024-01-26 Thread Andrea Bolognani
On Fri, Jan 26, 2024 at 09:33:13AM +0100, Peter Krempa wrote: > On Thu, Jan 25, 2024 at 09:47:11 -0800, Andrea Bolognani wrote: > > On Tue, Jan 16, 2024 at 05:12:41PM +0100, Peter Krempa wrote: > > > +def validate_qmp_schema_check_keys(entry, mandatory, optional): > > > +keys = set(entry.keys()

[PATCH] qemu: fix nbdkit command test for backing chains

2024-01-26 Thread Jonathon Jongsma
Previously this test only tested the generated nbdkit command for the top level disk source. Update it to test the generated commmands for all sources in the chain. Signed-off-by: Jonathon Jongsma --- ...sk0 => disk-cdrom-network.args.disk0-src0} | 2 +- ...sk1 => disk-cdrom-network.args.disk1-