No need to overwrite vmid_ex_id with a pointer to another copy of the
same string when the original is still alive.
Signed-off-by: Jiri Denemark
---
src/util/virnetdevopenvswitch.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.
On Thu, Aug 12, 2021 at 10:32:38AM +0200, Ján Tomko wrote:
Incomprehensive series removing many cleanup sections.
Patch 1/12 is common with my other series:
[libvirt PATCH 0/3] xml: use g_auto for xmlXPathObject
Ján Tomko (12):
util: define cleanup func for xmlXPathObject
tools: virsh: split
On Thu, Aug 12, 2021 at 10:32:50AM +0200, Ján Tomko wrote:
Signed-off-by: Ján Tomko
---
tools/virsh-completer-domain.c | 30 +-
tools/virsh-domain-monitor.c | 128 +++
tools/virsh-domain.c | 634 -
tools/virsh-host.c | 87 ++---
tools/vir
All modern qemus support sandboxing so this is covered by other tests.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/minimal-sandbox.args | 30 --
tests/qemuxml2argvdata/minimal-sandbox.xml | 34 -
tests/qemuxml2argvtest.c| 2 --
All supported QEMU versions have all the fields so we can remove the
booleans controlling which fields are used on the monitor.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_hotplug.c | 6 +--
src/qemu/qemu_monitor.c | 10 +
src/qemu/qemu_moni
Use qemuMonitorJSONCheckError instead of handcrafted error reporting.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 9931313baa
Switch to automatic memory freeing and remove the cleanup section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 28 +++-
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 14d
They are no longer used as we now assume that all tuning caps are
present and in case some will be removed we'll need to use different
probing methods.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 9 +++--
src/qemu/qemu_capabilities.h
All currently supported qemu versions support all throttling
capabilities. It is unlikely that any of the fields will be removed in
the future and if it will we will need to do specific probing which is
possible via the 'throttle' object which is the replacement for the
legacy way to configure thro
Probing QEMU_CAPS_DRIVE_DISCARD and QEMU_CAPS_DRIVE_DETECT_ZEROES can be
replaced by looking into the QMP schema rather than looking at -drive
which isn't in use any more.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
Make it more obvious that we care about passing FDs on the commandline
before startup of qemu, which is used to avoid startup monitor polling.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 4 ++--
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu
QEMU_CAPS_CHARDEV_RECONNECT, QEMU_CAPS_CHARDEV_LOGFILE and
QEMU_CAPS_CHARDEV_FILE_APPEND can be probed from the appropriate fields
in 'chardev-add' probed via the QMP schema instead of the command line
parameters.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 6 +++---
1 file ch
Add a comment that will attempt to discourage adding new capabilities
based on 'query-command-line-options'.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 4
1 file changed, 4 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 2193
In case the test directory contains invalid XML (this doesn't happen
upstream, but can when developing, e.g. by forgetting git conflict
markers) the tests would crash as in case when 'testQemuInfoSetArgs'
fails we'd still invoke the test in qemuxml2argv and qemuxml2xml tests.
Add a 'break' stateme
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 6 ++
src/qemu/qemu_capabilities.h | 4 ++--
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 2 --
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 2 --
tests/qemucapabilitiesd
The test is now pointless since we always assume that this option is
present.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/debug-threads.args | 29 ---
tests/qemuxml2argvdata/debug-threads.xml | 34 ---
tests/qemuxml2argvtest.c | 1
The configurability of the number of dies in a CPU can be infered from
the presence of the 'die-id' field in 'query-hotpluggable-cpus'.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 3 +--
src/qemu/qemu_capabilities.h | 2 +-
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/cap
'set-numa-node' is the command which can set the equivalent parameters
to '-numa' in preconfig mode, so we can use it as witness to see that
-numa is supported.
To ensure that the old detection method is removed once we'll be bumping
qemu support add a comment with the appropriate version check.
The feature is supported by all supported qemu versions thus covered
thoroughly by other test cases.
Signed-off-by: Peter Krempa
---
.../minimal-msg-timestamp.args| 30 -
.../minimal-msg-timestamp.xml | 32 ---
tests/qemuxml2argvtes
Add a cross reference of the enum value name with the string
representation. This allows a quick cross-reference of the values
without having to open the header and implementation files separately.
To achieve this the python checker code at first obtains a list of the
flags and cross-references th
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0d8c9667f1..3892d3e8e8 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src
Further commits will be refactoring and minimizing capabilities being
parsed from 'query-command-line-options'. Group the struct driving the
detection by argument name so it's easier to spot options belonging
together.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 42 +++
Upcoming commit will always add the property so the negative tests would
stop working.
Signed-off-by: Peter Krempa
---
.../machine-aeskeywrap-off-cap.err| 1 -
.../machine-aeskeywrap-off-caps.err | 1 -
.../machine-aeskeywrap-on-cap.err | 1 -
.../machine-aes
Hi,
this series started as an exploration in how we use
'query-command-line-options' and the way to possibly step away from
using it. The main problem is that query-command-line-options is using
old-style command line parsing infra in qemu and thus doesn't scale.
In an effor to help qemu developer
On a %A in %Y, Peter Krempa wrote:
> Peter Krempa (6):
> virsh: Un-document 'virsh echo'
> virshtest: Don't use both '--xml' and '--shell' for 'virsh echo'
> virsh: cmdEcho: Make '--xml' and '--shell' mutually exclusive
> virsh: cmdEcho: Rewrite with new buffer helpers
> virsh: Add testin
On Thu, Aug 12, 2021 at 03:01:30PM +0200, Peter Krempa wrote:
Peter Krempa (6):
virsh: Un-document 'virsh echo'
virshtest: Don't use both '--xml' and '--shell' for 'virsh echo'
virsh: cmdEcho: Make '--xml' and '--shell' mutually exclusive
virsh: cmdEcho: Rewrite with new buffer helpers
virsh
On Thu, Aug 12, 2021 at 03:01:34PM +0200, Peter Krempa wrote:
Remove the need for temporary strings by fillin the output buffer
s/fillin/filling/
signature.asc
Description: PGP signature
Add a '--split' switch for the 'virsh echo' command and add few test
cases to the virshtest.
Signed-off-by: Peter Krempa
---
tests/virshtest.c | 11 +++
tools/vsh.c | 15 +++
2 files changed, 26 insertions(+)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 07c
Escaping for both shell and XML makes no sense. Use one at time so that
we can forbid use of both.
Signed-off-by: Peter Krempa
---
tests/virshtest.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 53db2aa19a..07c27428ae 100
Use 'g_strsplit' to split the strings and then concatenate back when the
escape sequence (',,') is used.
Signed-off-by: Peter Krempa
---
tools/vsh.c | 62 ++---
1 file changed, 26 insertions(+), 36 deletions(-)
diff --git a/tools/vsh.c b/tools/vsh
Initialize the flags earlier and use VSH_EXCLUSIVE_OPTIONS_VAR to
declare the conflicting options as exclusive.
Signed-off-by: Peter Krempa
---
tools/vsh.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/tools/vsh.c b/tools/vsh.c
index f44db5d56d..009c93254c 100
Peter Krempa (6):
virsh: Un-document 'virsh echo'
virshtest: Don't use both '--xml' and '--shell' for 'virsh echo'
virsh: cmdEcho: Make '--xml' and '--shell' mutually exclusive
virsh: cmdEcho: Rewrite with new buffer helpers
virsh: Add testing for vshStringToArray
vshStringToArray: Rewr
Remove the need for temporary strings by fillin the output buffer
directly.
Signed-off-by: Peter Krempa
---
tools/vsh.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/tools/vsh.c b/tools/vsh.c
index 009c93254c..2456267426 100644
--- a/tools/vsh.c
+++ b
Note that it's for internal testing use and remove the manpage entry.
Signed-off-by: Peter Krempa
---
docs/manpages/virsh.rst | 17 -
tools/vsh.c | 4 ++--
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.r
I'm sending this early as I'll be out until Aug 25, but don't worry I'll
be back in time to handle the whole release process.
To aim for the release on Sep 01 I suggest entering the freeze on
Thursday Aug 26 and tagging RC2 on Monday Aug 30.
I hope this works for everyone.
Jirka
fixup /ˈfɪksʌp/
n. the next best thing after getting it right the first time
Signed-off-by: Ján Tomko
---
tools/virsh-domain.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index d06c24cc74..e985090992 100644
--- a/tools/
Fixes: 13896b5ad1d7f157273b6e49106df1f33958a9ed
Signed-off-by: Ján Tomko
---
Pushed as trivial. Ears of shame were applied.
tools/vsh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/vsh.c b/tools/vsh.c
index f9600bafba..96b3ced0ca 100644
--- a/tools/vsh.c
+++ b/tools/
On Thu, 2021-08-12 at 18:50 +0800, Luke Yue wrote:
> Implement virConnectGetAllDomainStats in a modular way just like QEMU
> driver, though remove some params in GetStatsWorker that we don't need
> in test driver currently.
>
> Only add the worker to get state so far, more worker will be added
> i
Signed-off-by: Luke Yue
---
tests/virshtest.c | 90 +++
1 file changed, 90 insertions(+)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 53db2aa19a..e2d6ddd72b 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -30,6 +30,7 @@ main(void)
Introduce testDomainGetStatsIOThread to add support for
testConnectGetAllDomainStats to get IOThread infos.
Signed-off-by: Luke Yue
---
src/test/test_driver.c | 44 +-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/src/test/test_driver.c b/s
Signed-off-by: Luke Yue
---
src/test/test_driver.c | 90 ++
1 file changed, 90 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 385c8b3ad3..1d439a89b6 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -9521
Introduce testDomainChgIOThread at the same time
Signed-off-by: Luke Yue
---
src/test/meson.build | 1 +
src/test/test_driver.c | 77 ++
2 files changed, 78 insertions(+)
diff --git a/src/test/meson.build b/src/test/meson.build
index f54585adfd..c0174a
The test driver can share the same code with qemu driver when implement
testDomainAddIOThreadCheck and testDomainDelIOThreadCheck, so extract
them for test driver to use.
Signed-off-by: Luke Yue
---
src/hypervisor/domain_driver.c | 64 ++
src/hypervisor/domain_dri
Introduce testIOThreadInfo to store IOThread infos: iothread_id,
poll_max_ns, poll_grow and poll_shrink for future usage.
Add an example of IOThread configuration to testdomfc4.xml, we also want
to generate default testIOThreadInfo for the IOThread configured in the
xml, so introduce testDomainGen
Implement virConnectGetAllDomainStats in a modular way just like QEMU
driver, though remove some params in GetStatsWorker that we don't need
in test driver currently.
Only add the worker to get state so far, more worker will be added
in the future.
Signed-off-by: Luke Yue
---
src/test/test_driv
Signed-off-by: Luke Yue
---
src/test/test_driver.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 67337879ef..385c8b3ad3 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -9647
Signed-off-by: Luke Yue
---
src/test/test_driver.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 2813320939..67337879ef 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -9490,6 +9490,34 @
The test driver can share the same code with qemu driver when implement
testDomainGetIOThreadsConfig, so extract it for test driver to use.
Signed-off-by: Luke Yue
---
src/hypervisor/domain_driver.c | 68 ++
src/hypervisor/domain_driver.h | 4 ++
src/libvirt_priv
Signed-off-by: Luke Yue
---
src/test/test_driver.c | 55 ++
1 file changed, 55 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index f3e3745442..2813320939 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -9492
v3:
- Rebase to current master branch
- Fix compilation
- Fix tests
Luke Yue (11):
domain_driver.c: Introduce and use virDomainDriverAddIOThreadCheck()
test_driver: Introduce testIOThreadInfo and generate IOThread infos
test_driver: Implement virDomainAddIOThread
test_driver: Implement vir
On Wed, Aug 11, 2021 at 02:07:24PM +0200, Ján Tomko wrote:
> Ján Tomko (3):
> util: define cleanup func for xmlXPathObject
> util: xml: use g_auto for xmlXPathObject
> util: xml: clean up unnecessary ret variables
Reviewed-by: Pavel Hrdina
signature.asc
Description: PGP signature
On a %A in %Y, Kristina Hanicova wrote:
> virXMLParse() now allows to validate xml against schema directly,
s/allows to validate/allows validating/
> eliminating the need to do it individually in each function.
>
> Signed-off-by: Kristina Hanicova
> ---
> src/conf/backup_conf.c | 13 ++
On Wed, Aug 11, 2021 at 05:02:50PM +0200, Ján Tomko wrote:
Use automatic memory cleanup to get rid of the cleanup section,
and of the memory leak that happens inside the loop, because
cap, alloc and phy are only freed once per function.
Signed-off-by: Ján Tomko
Reviewed-by: Martin Kletzander
Signed-off-by: Ján Tomko
---
tools/virsh-completer-domain.c | 6 ++
tools/virsh-domain-monitor.c | 12
tools/virsh-domain.c | 27 +--
tools/virsh-host.c | 15 +--
tools/virsh-interface.c| 6 ++
tools/virsh-
Signed-off-by: Ján Tomko
---
tools/virsh-completer-domain.c | 30 +-
tools/virsh-domain-monitor.c | 128 +++
tools/virsh-domain.c | 634 -
tools/virsh-host.c | 87 ++---
tools/virsh-nodedev.c | 7 +-
tools/virsh-volume.c
Some variables are used in a loop and only freed in the cleanup
section because we need to be able to jump out of the loop.
Reduce their scope and free them automatically.
Signed-off-by: Ján Tomko
---
tools/virsh-domain-monitor.c | 39 +---
tools/virsh-domain.c
Signed-off-by: Ján Tomko
---
tools/virsh-domain-monitor.c | 9 +++--
tools/virsh-domain.c | 9 +++--
tools/virsh-interface.c | 3 +--
tools/virsh-network.c| 9 +++--
tools/virsh-nwfilter.c | 6 ++
tools/virsh-pool.c | 3 +--
tools/virsh-secret.
Signed-off-by: Ján Tomko
---
tools/virsh-completer-domain.c | 6 ++
tools/virsh-domain-monitor.c | 12
tools/virsh-domain.c | 27 +--
tools/virsh-host.c | 15 +--
tools/virsh-interface.c| 6 ++
tools/virsh-
Signed-off-by: Ján Tomko
---
tools/virsh-completer-checkpoint.c | 4 +-
tools/virsh-completer-domain.c | 15 +-
tools/virsh-completer-snapshot.c | 3 +-
tools/virsh-domain-monitor.c | 29 +--
tools/virsh-domain.c | 303 ++---
5 files changed
Use 'ostype' instead of generic 'str', to discourage
reuse. Also mark it as autofree.
Signed-off-by: Ján Tomko
---
tools/virsh-domain-monitor.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index a2bf5c05f
Incomprehensive series removing many cleanup sections.
Patch 1/12 is common with my other series:
[libvirt PATCH 0/3] xml: use g_auto for xmlXPathObject
Ján Tomko (12):
util: define cleanup func for xmlXPathObject
tools: virsh: split variable declarations
tools: virsh: cmdDominfo: rename 'o
Signed-off-by: Ján Tomko
---
tools/virsh-domain-monitor.c | 18 ++--
tools/virsh-domain.c | 168 ---
tools/virsh-host.c | 92 ++-
tools/virsh-interface.c | 6 +-
tools/virsh-network.c| 15 ++--
tools/virsh-nodedev
Signed-off-by: Ján Tomko
---
tools/virsh-domain.c | 9 +++--
tools/virsh-volume.c | 3 +--
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 398190bb5b..0c60a4de99 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3
One variable per line.
Signed-off-by: Ján Tomko
---
tools/virsh-domain.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 81f3c82094..ae979ddd49 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5912,7 +
Signed-off-by: Ján Tomko
---
src/util/virxml.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index 0bb0d1c118..c8eb51a65a 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -363,6 +363,7 @@ G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virXPathContextNodeSave
Signed-off-by: Ján Tomko
---
tools/virsh-domain.c | 11 +++
tools/virsh-host.c| 3 +--
tools/virsh-nodedev.c | 6 ++
tools/virsh-pool.c| 4 +---
4 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 542e2a1736..06
67 matches
Mail list logo