- 13 8月, 2019 1 次提交
-
-
由 Daniel Henrique Barboza 提交于
If /etc/qemu/firmware directory exists, but is not readable then qemuxml2xmltest fails. This is because once domain XML is parsed it is validated. For that domain capabilities are needed. However, when constructing domain capabilities, FW descriptors are loaded and this is the point where the test fails, because it fails to open one of the directories. Fixes: 5b9819ee domain capabilities: Expose firmware auto selection feature Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 8月, 2019 2 次提交
-
-
由 Andrea Bolognani 提交于
We have some early replies that don't quite match with how QEMU 2.12.0 as released behaves. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wim ten Have 提交于
Update the KVM feature tests for QEMU's kvm-hint-dedicated performance hint. Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Signed-off-by: NMenno Lageman <menno.lageman@oracle.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 8月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The various distros have the following libxml2 vesions: CentOS 7: 2.9.1 Debian Stretch: 2.9.4 FreeBSD Ports: 2.9.9 Ubuntu 16.04 LTS: 2.9.3 Based on this sampling, we can reasonably bump libxml2 min version to 2.9.1 The 'query_raw' struct field was added in version 2.6.28, so can be assumed to exist. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 8月, 2019 4 次提交
-
-
由 Jiri Denemark 提交于
Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. QEMU capabilities lookup (via domainPostParseDataAlloc callback) is hidden inside virDomainDeviceDefPostParseOne with no way to pass qemuCaps to virDomainDeviceDef* functions. This patch fixes all remaining paths leading to virDomainDeviceDefPostParse. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. Several general snapshot and checkpoint APIs were lazily passing NULL as the parseOpaque pointer instead of letting their callers pass the right data. This patch fixes all paths leading to virDomainDefParseNode. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. Several general functions from domain_conf.c were lazily passing NULL as the parseOpaque pointer instead of letting their callers pass the right data. This patch fixes all paths leading to virDomainDefCopy to do the right thing. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Due to latest rewrite of NSS module, we are doing yajl parsing ourselves. This means, we had to introduce couple of callback that yajl calls. According to its documentation, a callback can cancel parsing if it returns a zero value. Well, we do just that in the string callback (findLeasesParserString()). If the JSON file we are parsing contains a key that we are not interested in, zero is returned meaning stop all parsing. This is not correct, because the JSON file can contain some other keys which are not harmful for our address translation (e.g. 'client-id'). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 08 8月, 2019 1 次提交
-
-
由 Roman Bolshakov 提交于
Confusing message is printed when a parse/format sockettest fails. E.g. there's a test that parses/formats ::ffff and the format fails like that: 38) Test format ::ffff family AF_UNSPEC ... Offset 2 Expect [0.0.255.255] Actual [ffff] It should be instead: 38) Test format ::ffff family AF_UNSPEC ... Offset 2 Expect [ffff] Actual [0.0.255.255] Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 07 8月, 2019 3 次提交
-
-
由 Daniel P. Berrangé 提交于
Now that 100% of libvirt code is forbidden in a SUID environment, we no longer need to worry about whether env variables are trustworthy or not. The virt-login-shell setuid program, which does not link to any libvirt code, will purge all environment variables, except $TERM, before invoking the virt-login-shell-helper program which uses libvirt. Thus we only need one API for env passthrough in virCommand. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit d2899a64 added a new exit path, but didn't free @fakerootdir. Let's just use VIR_AUTOFREE instead to make life easier. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cole Robinson 提交于
The model logic is taken from qemuDomainRNGDefValidate Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 06 8月, 2019 4 次提交
-
-
由 Michal Privoznik 提交于
In near future we will need to check for number of members of two different types of lists: PCI and NVMe. Rename CHECK_LIST_COUNT to CHECK_PCI_LIST_COUNT to mark explicitly what type of list it is working with. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
The myInit() function is called before any of the test cases because it prepares all internal structures for individual cases. Well, if it fails there's no point in proceeding with testing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
There is no restriction on maximum value of PCI domain. In fact, Linux kernel uses plain atomic inc when assigning PCI domains: drivers/pci/pci.c:static int pci_get_new_domain_nr(void) drivers/pci/pci.c-{ drivers/pci/pci.c- return atomic_inc_return(&__domain_nr); drivers/pci/pci.c-} Of course, this function is called only if kernel was compiled without PCI domain support or ACPI did not provide PCI domain. However, QEMU still has the same restriction as us: in set_pci_host_devaddr() QEMU checks if domain isn't greater than 0xffff. But one can argue that that's a QEMU limitation. We still want to be able to cope with other hypervisors that don't have this limitation (possibly). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
While it's true that older QEMUs were not able to deal with PCI domains, we don't support those versions anymore (see 4a42ece1). Therefore it is safe to always format fully expanded PCI address. Format PCI domain always as it will simplify next commits. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 02 8月, 2019 1 次提交
-
-
由 Eric Blake 提交于
readline-devel is an optional build dependency; when it is not present, the output of 'virsh <<EOF ... EOF' is different in that the input provided by the user is not echoed, and prompts become interleaved on the same line as actual output, which in turn causes the sed doing prompt filtering to mess up: | ./virsh-snapshot | --- exp 2019-07-31 18:42:31.107399428 -0300 | +++ out.cooked 2019-07-31 18:42:31.108399437 -0300 | @@ -1,8 +1,3 @@ | - | - | -Domain snapshot s3 created from 's3.xml' | -Domain snapshot s2 created from 's2.xml' | -Name: s2 | Domain: test | Current: yes | State: running Maybe we should fix virsh in interactive mode to echo regardless of whether readline-devel was used, but the quicker fix is to make the test use 'virsh "..."' rather than reading its input from stdin. Reported-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 29 7月, 2019 7 次提交
-
-
由 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: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ilias Stamatis 提交于
These test cases will start failing once the test driver provides implementation for the virDomainGetCPUStats API. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 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: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Jiri Denemark 提交于
Starting with QEMU 4.1, we're using the canonical feature names on the command line and avoid aliases to prepare for possible deprecation of all aliases in QEMU. But we do so only for features from our CPU map, hyperv features defined in the code were unchanged and this patch fixes it. Some features use "hv-" prefix unconditionally because they were introduced recently enough to always support spelling with a dash. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Tested-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Eric Blake 提交于
Earlier patches mentioned that the initial implementation will prevent snapshots and checkpoints from being used on the same domain at once. However, the actual restriction is done in this separate patch to make it easier to lift that restriction via a revert, when we are finally ready to tackle that integration in the future. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block commit and active bloc commit job which will allow to use it with blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block pull job which will allow to use it with blockdev. This patch also contains some additional machinery which is required to store all the relevant job data in the status XML which will also be reused with other block job types. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 27 7月, 2019 5 次提交
-
-
由 Eric Blake 提交于
Similar to virsh-snapshots. Provides decent coverage of the checkpoint API, the test driver implementation, and the virsh access to the API. A later patch will worry about testing that snapshots and checkpoints are mutually exclusive (in part so it is easier to revert that when we finally implement the interaction and lift that restriction). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
Add a new file checkpoint_conf.c that performs the translation to and from new XML describing a checkpoint. The code shares a common base class with snapshots, since a checkpoint similarly represents the domain state at a moment in time. Add some basic testing of round trip XML handling through the new code. Of note - this code intentionally differs from snapshots in that XML schema validation is unconditional, rather than based on a public API flag. We have many existing interfaces that still need to add a flag for opt-in schema validation, but those interfaces have existing clients that may not have been producing strictly-compliant XML, or we may still uncover bugs where our RNG grammar is inconsistent with our code (where omitting the opt-in flag allows existing apps to keep working while waiting for an RNG patch). But since checkpoints are brand-new, it's easier to ensure the code matches the schema by always using the schema. If needed, a later patch could extend the API and add a flag to turn on to request schema validation, rather than having it forced (possibly just the validation of the <domain> sub-element during REDEFINE) - but if a user encounters XML that looks like it should be good but fails to validate with our RNG schema, they would either have to upgrade to a new libvirt that adds the new flag, or upgrade to a new libvirt that fixes the RNG schema, which implies adding such a flag won't help much. Also, the redefine flag requires the <domain> sub-element to be present, rather than catering to historical back-compat to older versions. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Prepare for new checkpoint APIs by describing the XML that will represent a checkpoint. The checkpoint XML is modeled heavily after virDomainSnapshotPtr. See the docs for more details. Add testsuite coverage for some minimal uses of the XML (bare minimum, the sample from html, and a full dumpxml, and some counter-examples that should fail schema validation). Although use of the REDEFINE flag will require the <domain> subelement to be present, it is easier for most of the tests to provide counterpart output produced with the NO_DOMAIN flag (particularly since synthesizing a valid <domain> during testing is not trivial). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Fix a potential memory leak by calling virCommandFree() in the cleanup section. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Message-Id: <20190726205633.2041912-3-stefanb@linux.vnet.ibm.com>
-
由 Eric Blake 提交于
Creating an 'exp' output file, but never comparing it against the actual output, does not actually constitute testing the output. :) Fixes: 280a2b41Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 7月, 2019 5 次提交
-
-
由 Stefan Berger 提交于
Add a test case to commandtest.c to test the transfer of data to a process who received the read-end of pipes' file descriptors. Transfer large (128 kb) byte streams. Extend the commandhelper.c with support for --readfd <fd> command line parameter and convert the data receive loop to use poll and receive data on multiple file descriptors (up to 3) and read data into distinct buffers that we grow while adding more (string) data. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
The QEMU command line does not change when TPM state is encrypted compared to when it is plain. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add a test case for the TPM XML encryption parser and formatter. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add an already existing test case tpm-emulator-tpm2 to qemuxml2xmltest.c Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add support for usage type vTPM to secret. Extend the schema for the Secret to support the vTPM usage type and add a test case for parsing the Secret with usage type vTPM. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 7月, 2019 6 次提交
-
-
由 Peter Krempa 提交于
The <mirror> subelement is used in two ways: in a commit job to point to existing storage, and in a block-copy job to point to additional storage. We need a way to track only the distinct storage. This patch introduces qemuBlockJobDiskRegisterMirror which registers the mirror chain separately only for jobs which require it. This also comes with remembering that in the status XML. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add 4 disks to the blockjob-blockdev-in.xml test case to allow adding data for block pull, block copy, block commit, and active block commit jobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
In case when the backing store can be represented with something simpler such as a URI we can use it rather than falling back to the json: pseudo-protocol. In cases when it's not worth it (e.g. with the old ugly NBD or RBD strings) let's switch to json. The function is exported as we'll need it when overwriting the ugly strings qemu would come up with during blockjobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
The virsh-optparse test broke after commit 6ac402c4 because it always assumed the max memory limit can be adjusted on a running domain which used to be the case in the old code. This is only a hot fix for the CI build. The proper fix here is to re-write the whole test in a self-test/unit-test manner where we only test virsh's ability to parse various values, not running actual commands. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Changes noticed while copying to similar aspects of checkpoints. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
Any message that is easy to trigger (as evidenced by the testsuite update) should not use 'internal error' as its category. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-