On Fri, Mar 30, 2018 at 12:59:16PM +0200, Peter Krempa wrote:
Enforce usage of accessors by hiding the implementation in the code.
Signed-off-by: Peter Krempa
---
src/util/virjson.c | 39 +++
src/util/virjson.h | 38
On Fri, Mar 30, 2018 at 12:59:15PM +0200, Peter Krempa wrote:
Rather than trying to prevent stealing of the 'actions' virJSONValue
into the monitor command replace the code so that it does the same
thing, since 'actions' was actually not really used after calling the
monitor.
Signed-off-by:
You might be overdoing it with the prefixes.
On Fri, Mar 30, 2018 at 12:59:14PM +0200, Peter Krempa wrote:
Use the accessors instead.
Signed-off-by: Peter Krempa
---
src/util/virqemu.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
ACK
Jano
On Fri, Mar 30, 2018 at 12:59:13PM +0200, Peter Krempa wrote:
Sometimes it's desired to get a JSON number as string. Add a helper.
This will help in cases where we'd want to conver the internal type from
s/conver/convert/
string to something else.
Signed-off-by: Peter Krempa
On Fri, Mar 30, 2018 at 12:59:12PM +0200, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/qemu/qemu_agent.c| 6 +++---
src/qemu/qemu_monitor_json.c | 18 +-
src/util/virqemu.c | 5 +++--
3 files changed, 15 insertions(+), 14
On Fri, Mar 30, 2018 at 12:59:11PM +0200, Peter Krempa wrote:
Use virJSONValueObjectGetArray instead of virJSONValueObjectGet so that
it's not necessary to check whether it's an array.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_agent.c | 8 +---
1 file changed, 1
On Fri, Mar 30, 2018 at 12:59:10PM +0200, Peter Krempa wrote:
Replace direct access to virJSONValue members by accessor.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ACK
Jano
signature.asc
On Fri, Mar 30, 2018 at 12:59:09PM +0200, Peter Krempa wrote:
Make sure that the 'a' and 'A' modifiers for virJSONValueObjectAddVArgs
behave correctly.
Signed-off-by: Peter Krempa
---
tests/virjsontest.c | 47 +++
1 file changed,
On Fri, Mar 30, 2018 at 12:59:08PM +0200, Peter Krempa wrote:
It was not possible to determine whether virJSONValueObjectAddVArgs and
the functions using it would consume a virJSONValue or not when used
with the 'a' or 'A' modifier depending on when the loop failed.
Fix this by passing in a
On Thu, Mar 29, 2018 at 12:10:46PM -0400, John Ferlan wrote:
On 03/16/2018 01:02 PM, Sukrit Bhatnagar wrote:
This patch adds virQEMUBuildBufferEscapeComma wherever applicable in
src/qemu/qemu_command.c
Based on:
On 03/29/2018 01:52 PM, Jim Fehlig wrote:
> On 03/09/2018 09:48 AM, John Ferlan wrote:
>> For openvzDomObjFromDomainLocked and openvzDomainLookupByID
>> let's return a locked and referenced @vm object so that callers
>> can then use the common and more consistent virDomainObjEndAPI
>> in order
On 03/29/2018 01:36 PM, Jim Fehlig wrote:
> On 03/09/2018 09:48 AM, John Ferlan wrote:
>> Rather than repeat code throughout, create and use a couple of
>> accessors in order to lookup by UUID.
>>
>> Signed-off-by: John Ferlan
>> ---
>> src/openvz/openvz_driver.c | 266
>>
On Thu, Mar 29, 2018 at 02:50:17AM +0200, Ján Tomko wrote:
1.3.0 was released in December 2012, it merged KVM and QEMU and is
above our 1.2.0 requirement for QMP capability probing.
Ján Tomko (8):
virQEMUCapsParseHelpStr: remove unused check_yajl parameter
Mandate QEMU >= 0.15.0
Deprecate
Implied by QEMU >= 1.2.0.
Delete the negative test cases now that they always pass.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 7 ---
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 11 ++-
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_migration.c | 10 +-
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 7 ---
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 2 --
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_driver.c | 16
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 12 ++--
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 14 --
Unused since commit <2d80fbb1>.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 -
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 16
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 9 -
src/qemu/qemu_driver.c
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 12 ++--
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 3 +--
The (now assumed) QEMU_CAPS_CHARDEV_SPICEVMC is preferred.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 4 --
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 71
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 6 --
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 4 +---
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 5 -
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 7 ---
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 7 ---
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 12 ++
Signed-off-by: Ján Tomko
---
src/qemu/qemu_domain.c | 6 --
src/qemu/qemu_domain.h | 2 --
2 files changed, 8 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6b22f9dc3..e4a8c45cf 100644
--- a/src/qemu/qemu_domain.c
+++
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 7 ---
Last use was removed by commit 0586cf98 deprecating
QEMU_CAPS_DEVICE.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 -
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 3 +--
src/qemu/qemu_hotplug.c
This makes qemuDomainSupportsNetdev identical to
qemuDomainSupportsNicdev and leaves some code in
qemuDomainAttachNetDevice to be cleaned up later.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h
Now that we assume -netdev support, we no longer set the VLAN
or need the hostPlugged bool.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_hotplug.c | 42 +-
1 file changed, 13 insertions(+), 29 deletions(-)
diff --git
Now that we assume QEMU_CAPS_NETDEV, the only thing left to check
is whether we need to use the legacy -net syntax because of
a non-conforming armchitecture.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_command.c | 20 +---
src/qemu/qemu_domain.c| 10
Implied by QEMU >= 0.12.0.
Deprecated by QEMU commit 1ed2fc1 included in 0.12.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 21 +
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git
Released in Dec 2012, the version when the userspace parts of KVM
and QEMU fully merged.
This lets us drop the -help parsing code and assume lots of
capabilities.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c |7 +-
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 15 ---
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 -
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 4 +---
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 9 +
Supported since QEMU 0.13, but we require QEMU 0.15.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c| 15 --
Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 20
It's been a while since we last bumped the minimum QEMU version.
Let's get rid of -help parsing and bring our test suite closer
to real world usage by implying lots of capabilities.
Ján Tomko (44):
qemuxml2argvtest: Fix q35-virt-manager capabilities
Delete bogus cpu-host-passthrough test
Use QEMU_CAPS_MACHINE_OPT and QEMU_CAPS_MACHINE_VMPORT_OPT
since it specifies .
Signed-off-by: Ján Tomko
---
tests/qemuxml2argvdata/q35-virt-manager-basic.args | 2 +-
tests/qemuxml2argvtest.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
We test the same XML for a type='kvm' domain twice, once with
QEMU_CAPS_KVM (expecting success), once without (expecting failure).
The failure case relies on QEMU_CAPS_MACHINE_OPT not being set,
failing in qemuBuildObsoleteAccelArg.
Checking a domain-type error message in a cpu test is strange.
On 03/30/2018 06:21 AM, Kashyap Chamarthy wrote:
> On Thu, Mar 29, 2018 at 12:22:18PM -0400, John Ferlan wrote:
>>
>>
>> On 03/26/2018 06:53 AM, Kashyap Chamarthy wrote:
>>> (Thanks: Jiri Denemark, for clarifying this on IRC.)
>>
>> Lost context here! That should have gone under the --- cause
On Fri, Mar 30, 2018 at 12:59:09 +0200, Peter Krempa wrote:
> Make sure that the 'a' and 'A' modifiers for virJSONValueObjectAddVArgs
> behave correctly.
>
> Signed-off-by: Peter Krempa
> ---
If you apply this patch without the fix first you get the following
error in
On Fri, Mar 30, 2018 at 12:59:07 +0200, Peter Krempa wrote:
> Coverity was not wrong about the usage of 'a'/'A' modifiers for
> virJSONValueObjectAddVArgs as noted in [1]. Fix the possible
> leak/double-free, and add test to make sure it works as expected.
[1]
Replace direct access to virJSONValue members by accessor.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index
Sometimes it's desired to get a JSON number as string. Add a helper.
This will help in cases where we'd want to conver the internal type from
string to something else.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virjson.c | 10 ++
Signed-off-by: Peter Krempa
---
src/qemu/qemu_agent.c| 6 +++---
src/qemu/qemu_monitor_json.c | 18 +-
src/util/virqemu.c | 5 +++--
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_agent.c
Enforce usage of accessors by hiding the implementation in the code.
Signed-off-by: Peter Krempa
---
src/util/virjson.c | 39 +++
src/util/virjson.h | 38 --
2 files changed, 39 insertions(+), 38
Coverity was not wrong about the usage of 'a'/'A' modifiers for
virJSONValueObjectAddVArgs as noted in [1]. Fix the possible
leak/double-free, and add test to make sure it works as expected.
This series also cleans up direct access to attributes of virJSONValue
and in the end privatizes the
Rather than trying to prevent stealing of the 'actions' virJSONValue
into the monitor command replace the code so that it does the same
thing, since 'actions' was actually not really used after calling the
monitor.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c
Use the accessors instead.
Signed-off-by: Peter Krempa
---
src/util/virqemu.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/util/virqemu.c b/src/util/virqemu.c
index e7ea068b94..d6652262fe 100644
--- a/src/util/virqemu.c
+++
Use virJSONValueObjectGetArray instead of virJSONValueObjectGet so that
it's not necessary to check whether it's an array.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_agent.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/qemu/qemu_agent.c
Make sure that the 'a' and 'A' modifiers for virJSONValueObjectAddVArgs
behave correctly.
Signed-off-by: Peter Krempa
---
tests/virjsontest.c | 47 +++
1 file changed, 47 insertions(+)
diff --git a/tests/virjsontest.c
It was not possible to determine whether virJSONValueObjectAddVArgs and
the functions using it would consume a virJSONValue or not when used
with the 'a' or 'A' modifier depending on when the loop failed.
Fix this by passing in a pointer to the pointer so that it can be
cleared once it's
On Thu, Mar 29, 2018 at 12:22:18PM -0400, John Ferlan wrote:
>
>
> On 03/26/2018 06:53 AM, Kashyap Chamarthy wrote:
> > (Thanks: Jiri Denemark, for clarifying this on IRC.)
>
> Lost context here! That should have gone under the --- cause it'll look
> awfully strange in git history.
Yeah,
63 matches
Mail list logo