[libvirt] [PATCH] commandtest: Remove commandhelper.log in test27
by Michal Privoznik
The recently added test27 spawns commandhelper. This is fine,
except, one of the things that commandhelper does is it records
arguments it was spawn with into commandhelper.log. Other test
cases then use checkoutput() to compare the arguments against the
expected ones and also unlink() the log file. However, test27()
is not doing that and thus it leaves the file behind. This
breaks distcheck.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Another approach would be to explicitly just unlink() the file somewhere
in the cleanup label. But I figured, comparing the args and unlinking
the file afterwards is more robust check IMO.
tests/commanddata/test27.log | 20 ++++++++++++++++++++
tests/commandtest.c | 3 +++
2 files changed, 23 insertions(+)
create mode 100644 tests/commanddata/test27.log
diff --git a/tests/commanddata/test27.log b/tests/commanddata/test27.log
new file mode 100644
index 0000000000..40b2627c07
--- /dev/null
+++ b/tests/commanddata/test27.log
@@ -0,0 +1,20 @@
+ARG:--readfd
+ARG:5
+ARG:--readfd
+ARG:7
+ENV:DISPLAY=:0.0
+ENV:HOME=/home/test
+ENV:HOSTNAME=test
+ENV:LANG=C
+ENV:LOGNAME=test
+ENV:PATH=/usr/bin:/bin
+ENV:TMPDIR=/tmp
+ENV:USER=test
+FD:0
+FD:1
+FD:2
+FD:5
+FD:7
+DAEMON:no
+CWD:/tmp
+UMASK:0022
diff --git a/tests/commandtest.c b/tests/commandtest.c
index dfd15a2079..d7ab588969 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -1231,6 +1231,9 @@ static int test27(const void *unused ATTRIBUTE_UNUSED)
goto cleanup;
}
+ if (checkoutput("test27", NULL) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
--
2.21.0
5 years, 5 months
[libvirt] [PATCH v2 0/2] test_driver: implement virDomainGetCPUStats
by Ilias Stamatis
Changes since v1:
* Removed failing test cases
* Total CPUTIME now is the sum of the individual CPUs
Ilias Stamatis (2):
tests: virsh-optparse: remove no longer valid cpu-stats test cases
test_driver: implement virDomainGetCPUStats
src/test/test_driver.c | 132 +++++++++++++++++++++++++++++++++++++++++
tests/virsh-optparse | 20 -------
2 files changed, 132 insertions(+), 20 deletions(-)
--
2.22.0
5 years, 5 months
[libvirt] [PATCH 0/5] Fix hyperv and kvm features with QEMU 4.1
by Jiri Denemark
Originally the names of the hyperv and kvm CPU features were only used
internally for looking up their CPUID bits. But with QEMU 4.1 we check
which features were enabled or disabled by a freshly started QEMU
process using their names rather than their CPUID bits (mostly because
of MSR features). Thus we need to change our made up internal names into
the actual names used by QEMU.
Otherwise libvirt would mistakenly report the features as unavailable
and refuse to start any domain using them with QEMU 4.1.
Reported-by: Vitaly Kuznetsov <vkuznets(a)redhat.com>
Jiri Denemark (5):
qemu: Fix hyperv features with QEMU 4.1
qemu: Prefer dashes for hyperv features
cpu: Drop KVM_ from hyperv feature macros
cpu: Drop unused KVM features
qemu: Fix KVM features with QEMU 4.1
src/cpu/cpu_x86.c | 77 +++++++------------
src/cpu/cpu_x86_data.h | 38 ++++-----
src/qemu/qemu_command.c | 19 +++--
src/qemu/qemu_process.c | 2 +-
.../clock-timer-hyperv-rtc.args | 2 +-
tests/qemuxml2argvdata/hyperv-panic.args | 2 +-
tests/qemuxml2argvdata/hyperv.args | 4 +-
tests/qemuxml2argvdata/panic-double.args | 2 +-
8 files changed, 61 insertions(+), 85 deletions(-)
--
2.22.0
5 years, 5 months
[libvirt] [PATCH 0/6] Add support for Direct Mode for Hyper-V Synthetic timers
by Vitaly Kuznetsov
QEMU-4.1 will bring us Direct Mode for Hyper-V Synthetic timers support,
we need to support it in libvirt too. As this is not a new enlightenment
but rather an enhancement of an existing one ('stimer'), support it in
<stimer state='on'>
<direct state='on'/>
</stimer>
form. Backwards compatibility is (hopefully) preserved.
Because of an existing imcompatibility between libvirt-5.5+ and
QEMU-4.1-git (see https://www.redhat.com/archives/libvir-list/2019-July/msg01435.html)
I had to backport hv-stimer-direct to QEMU-4.0 to test this. If someone wants to
do it too here is a list of QEMU patches needed:
128531d9e1 i386/kvm: add support for Direct Mode for Hyper-V synthetic timers
8caba36db5 i386/kvm: hv-evmcs requires hv-vapic
bd59fbdf4f i386/kvm: hv-tlbflush/ipi require hv-vpindex
c686193072 i386/kvm: hv-stimer requires hv-time and hv-synic
e48ddcc6ce i386/kvm: implement 'hv-passthrough' mode
fb19f72b77 i386/kvm: document existing Hyper-V enlightenments
2344d22e50 i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties()
6760bd2002 i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID
2d384d7c83 i386/kvm: convert hyperv enlightenments properties from bools to bits
Vitaly Kuznetsov (6):
docs: formatdomain: add synic flag to the example xml
docs: formatdomain: fix 'SynIC' spelling
docs: formatdomain: move 'msrs' out of Hyper-V Enlightenments
conf: add support for Direct Mode for Hyper-V Synthetic timers
qemu: add support for Direct Mode for Hyper-V Synthetic timers
news: mention Direct Mode for Hyper-V Synthetic timers support
docs/formatdomain.html.in | 13 ++-
docs/news.xml | 9 ++
docs/schemas/domaincommon.rng | 16 +++-
src/conf/domain_conf.c | 138 +++++++++++++++++++++++++---
src/conf/domain_conf.h | 8 ++
src/cpu/cpu_x86.c | 51 +++++-----
src/cpu/cpu_x86_data.h | 2 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_command.c | 22 ++++-
src/qemu/qemu_process.c | 39 +++++++-
tests/qemuxml2argvdata/hyperv.args | 4 +-
tests/qemuxml2argvdata/hyperv.xml | 4 +-
tests/qemuxml2xmloutdata/hyperv.xml | 4 +-
13 files changed, 263 insertions(+), 49 deletions(-)
--
2.20.1
5 years, 5 months
[libvirt] [PATCH] qemumonitorjsontest: Don't leak 'query-jobs' info
by Michal Privoznik
The returned array of qemuMonitorJobInfo structs must be freed.
164 (16 direct, 148 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 84
at 0x4A3568B: realloc (vg_replace_malloc.c:826)
by 0x4D888BD: virReallocN (viralloc.c:244)
by 0x4D889B3: virExpandN (viralloc.c:293)
by 0x4D88C87: virInsertElementsN (viralloc.c:435)
by 0x214004: qemuMonitorJSONGetJobInfo (qemu_monitor_json.c:9185)
by 0x148B3F: testQueryJobs (qemumonitorjsontest.c:2979)
by 0x14C192: virTestRun (testutils.c:174)
by 0x14BF36: mymain (qemumonitorjsontest.c:3286)
by 0x14E256: virTestMain (testutils.c:1096)
by 0x14BFD9: main (qemumonitorjsontest.c:3298)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/qemumonitorjsontest.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index bf89f49aca..522ff5a3d5 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2996,6 +2996,9 @@ testQueryJobs(const void *opaque)
ret = 0;
cleanup:
+ for (i = 0; i < njobs; i++)
+ qemuMonitorJobInfoFree(jobs[i]);
+ VIR_FREE(jobs);
qemuMonitorTestFree(test);
return ret;
}
--
2.21.0
5 years, 5 months
[libvirt] UID/GID during kvm/qemu migrate
by Stephan von Krawczynski
Hello,
is there some immanent code in libvirt that forces UID/GID of the libvirt
standard user to be the same on two boxes migrating qemu vms against each
other?
The migration itself uses root obviously (password is requested). But if a vm
xml does not contain any definition regarding UID/GID what else could
prevent this from working?
I believe I ran into such a problem trying to migrate and ending up in an
error, a vm still working on original host but its fs (netfs pool (nfs/raw))
being switched to read-only...
--
Regards,
Stephan
5 years, 5 months
[libvirt] [PATCH 0/9] qemu: Support block pull/commit jobs with blockdev (blockdev-add saga)
by Peter Krempa
One of the final chapters of the saga. At the end we finally support
first blockjobs with blockdev.
This series depends on some of the previous postings so for convenience
it can be fetched at:
git fetch https://gitlab.com/pipo.sk/libvirt.git blockjobs-send-partial
The above branch also contains patches which enable blockdev support,
which is ideal for testing.
Peter Krempa (9):
qemu: blockjob: Use proper value when setting disk's READY state
tests: qemustatusxml: Add few disks with backing chains for blockdev
job testing
qemu: blockjob: Document qemuBlockJobRegister
qemu: blockjob: Register disk->mirror with a job only when required
qemu: blockjob: Split out update of persistent XML disk's source on
mirror jobs
qemu: blockjob: Esure that persistent definition source does not copy
irrelevant data
qemu: blockjob: Ensure that config disk source is identical when
modifying it
qemu: Add -blockdev support for block pull job
qemu: Add -blockdev support for block commit job
src/qemu/qemu_blockjob.c | 525 +++++++++++++++++-
src/qemu/qemu_blockjob.h | 40 ++
src/qemu/qemu_domain.c | 123 +++-
src/qemu/qemu_driver.c | 83 ++-
.../blockjob-blockdev-in.xml | 285 +++++++++-
5 files changed, 1001 insertions(+), 55 deletions(-)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] conf: Remove unnecessary declaration in virDomainCheckpointDefParse
by John Ferlan
The @creation variable wasn't used - caused a Travis build failure.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushing under the trivial and build break rules.
src/conf/checkpoint_conf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 30c6d2e717..5f4c275dd8 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -133,7 +133,6 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
int n;
char *tmp;
VIR_AUTOFREE(xmlNodePtr *) nodes = NULL;
- VIR_AUTOFREE(char *)creation = NULL;
VIR_AUTOUNREF(virDomainCheckpointDefPtr) def = NULL;
if (!(def = virDomainCheckpointDefNew()))
--
2.20.1
5 years, 5 months