- 04 5月, 2018 11 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Andrea Bolognani 提交于
Now that mocking NUMA information works on FreeBSD, there are no longer any test cases that need to be restricted to Linux only. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
While the current amount of mocking works just fine on most of our target platforms, it somehow causes issues when using Clang on FreeBSD. Work around the issue by mocking a couple more functions. It's not pretty, but it makes qemuxml2argvtest pass on FreeBSD at long last. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
There are only a couple remaining issues preventing it from working on FreeBSD. Let's fix them. With the mocking in place, qemumemlocktest and qemuxml2xmltest can finally succeed on FreeBSD. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Clang complains about it: error: second argument to 'va_arg' is of promotable type 'mode_t' (aka 'unsigned short'); this va_arg has undefined behavior because arguments will be promoted to 'int' [-Werror,-Wvarargs] mode = va_arg(ap, mode_t); ^~~~~~ Work around the issue by passing int to va_arg() and casting its return value to mode_t afterwards. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
We're using virFileCanonicalizePath() everywhere now, so mocking this function has become entirely pointless. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
The latter is impossible to mock on platforms that use the gnulib implementation, such as FreeBSD, while the former doesn't suffer from this limitation. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
We're going to need this later on. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
All the code now just uses the virHashTablePtr type directly. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
This removes the virNWFilterHashTableFree, virNWFilterHashTablePut and virNWFilterHashTableRemove methods, in favour of just calling the virHash APIs directly. The virNWFilterHashTablePut method was unreasonably complex because the virHashUpdateEntry already knows how to create the entry if it does not currently exist. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virNWFilterHashTable struct only contains a single virHashTable member since commit 293d4fe2 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon Mar 24 16:35:23 2014 +0000 Remove pointless storage of var names in virNWFilterHashTable Thus, this struct wrapper adds no real value over just using the virHashTable directly, but brings the complexity of needing to derefence the hashtable to call virHash* APIs, and adds extra memory allocation step. To minimize code churn this just turns virNWFilterHashTable into a typedef aliases virHashTable. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 03 5月, 2018 5 次提交
-
-
由 Stefan Berger 提交于
Alter qemuBuildTPMDevStr to format the tpm-crb on the command line and use the enum range checking for valid model. Add a test case for the formation of the tpm-crb QEMU device command line. The qemuxml2argvtest changes cannot use the newer DO_TEST_CAPS_LATEST since building of the command line involves calling qemuBuildTPMBackendStr which attempts to open the path to the device (e.g. /dev/tmp0). Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Stefan Berger 提交于
QEMU on x86_64 (since v2.12) can support tpm-crb devices. Introduce qemu capabilities for this device. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Stefan Berger 提交于
Enable the TPM CRB to be specified in the domain XML. This now allows to describe the TPM device like this: <tpm model='tpm-crb'> <backend type='passthrough'> <device path='/dev/tpm0'/> </backend> </tpm> Extend the XML schema to also allow tpm-crb. Extend the documentation. Add a test case for testing the XML parser and formatter. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
The libxlxml2domconfigtest causes a libxl-driver.log file to be created which breaks make distchck if libxl is enabled. Delete the log file at the end of the test. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Maciej Wolny 提交于
Fixes "can't find libtool" error when running valgrind checks. Signed-off-by: NMaciej Wolny <maciej.wolny@codethink.co.uk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 30 4月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
To allow encryption of the non-shared storage migration NBD connection we will need to instantiated the NBD server with the TLS env. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
The NBD server in qemu supports TLS transport. Detect this capability. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 26 4月, 2018 2 次提交
-
-
由 Ján Tomko 提交于
The script assumed to be run in the source directory. Pass top_srcdir as the argument to fix VPATH builds. My commit 81a7571 broke this. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Introduce a perl script that is able to regroup both the QEMU_CAPS constants and the capability strings. Check correct grouping as a part of syntax check. For in-place regrouping after a rebase, just run: tests/group-qemu-caps.pl without any parameters. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 25 4月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Currently the driver module loading code does not report an error if the driver module is physically missing on disk. This is useful for distro packaging optional pieces. When the daemons are split up into one daemon per driver, we will expect module loading to always succeed. If a driver is not desired, the entire daemon should not be installed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 24 4月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1569678 On some large systems (with ~400GB of RAM) it is possible for unsigned int to overflow in which case we report invalid number of 4K pages pool size. Switch to unsigned long long. We hit overflow in virNumaGetPages when doing: huge_page_sum += 1024 * page_size * page_avail; because although 'huge_page_sum' is an unsigned long long, the page_size and page_avail are both unsigned int, so the promotion to unsigned long long doesn't happen until the sum has been calculated, by which time we've already overflowed. Turning page_avail into a unsigned long long is not strictly needed until we need ability to represent more than 2^32 4k pages, which equates to 16 TB of RAM. That's not outside the realm of possibility, so makes sense that we change it to unsigned long long to avoid future problems. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 4月, 2018 2 次提交
-
-
由 Andrea Bolognani 提交于
Even though we just introduced the rom.enabled attribute to properly cover the use case, there might be guests out there that use the only previously available way of disabling PCI ROM loading by not opting in to schema validation. To make sure such guests will keep working going forward, introduce a test case covering the legacy workaround. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
The attribute can be used to disable ROM loading completely for a device. This might be needed because, even when the guest is configured such that the PCI ROM will not be loaded in the PCI BAR, some hypervisors (eg. QEMU) might still make it available to the guest in a form (eg. fw_cfg) that some firmwares (eg. SeaBIOS) will consume, thus not achieving the desired result. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1425058Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 21 4月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
Many of the old xm and sexpr test files used qemu-dm as the emulator. Modern Xen systems no longer use the old, forked qemu-dm, instead preferring the distro provided qemu or an "upstream" qemu that is built when the Xen tools are built. This qemu is typically installed in /usr/lib/xen/bin/qemu-system-i386. The libxl test files already use /usr/lib/xen/bin/qemu-system-i386. For consistency, change the old test files to use the same emulator Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 4月, 2018 5 次提交
-
-
由 Pino Toscano 提交于
When writing the VMX file from the domain XML, write cpuid.coresPerSocket if there is a specified CPU topology in the guest. Use the domain XML of esx-in-the-wild-9 in vmx2xml as testcase for xml2vmxtest. Signed-off-by: NPino Toscano <ptoscano@redhat.com> Acked-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Pino Toscano 提交于
Convert the cpuid.coresPerSocket key as both number of CPU sockets, and cores per socket. Add the VMX file attached to RHBZ#1568148 as testcase esx-in-the-wild-9; adapt the resulting XML of testcase esx-in-the-wild-8 to the CPU topology present in that VMX. https://bugzilla.redhat.com/show_bug.cgi?id=1568148Signed-off-by: NPino Toscano <ptoscano@redhat.com> Acked-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 John Ferlan 提交于
Commit id '6df5d777' somehow during the move from one branch to another added an erroneous '!'... Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
If @client hasn't been opened, then don't call virNetServerClientClose since that'll cause certain failure. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
If @log is not fopen'd then, going to cleanup and calling fclose will make for an unhappy callee. So just fail immediately instead since there's nothing to clean up. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 19 4月, 2018 8 次提交
-
-
由 Andrea Bolognani 提交于
The current private XML parsing code relies on the assumption that NUMA node IDs start from 0 and are densely allocated, neither of which is necessarily the case. Change it so that the bitmap size is dynamically calculated by looking at NUMA node IDs instead, which ensures all nodes will be able to fit and thus the bitmap will be parsed successfully. Update one of the test cases so that it would fail with the previous approach, but passes with the new one. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1490158Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
vircapstest has code to add a full host NUMA topology, that is, one that includes all information about nodes and CPUs including IDs; testQemuCapsInit(), which is used to create a mock virCapsPtr for QEMU tests, however, just fakes it by setting nnumaCell_max to some number. While the latter approach has served us well so far, we're going to need all the information to be filled in soon. In order to do that, we can just move the existing code from vircapstest to testutils and, with some renaming and trivial tweaking, use it as-is. Interestingly, the NUMA topology generated by the function is rigged up so that the NUMA nodes aren't (necessarily) numbered starting from 0, which is a nice way to spot mistaken assumptions in our codebase. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The disk cache mode translates to various frontend and backend attributes for the qemu block layer. For the frontend device the 'writeback' parameter is used and provided as 'write-cache'. Implement this so that we can later switch to using -blockdev where we will not pass the cachemode directly any more. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
QEMU translates the cache mode of a disk internally into 3 flags. 'write-cache' is a flag of the frontend while others are flag of the backing storage. Add capability which will allow expressing it via the frontend attribute. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Prepare the tests for adding the new parameter. The parameter was introduced in qemu-2.7.0, so add a forked version of the test case to see that it is formatted properly. This test is also an example how the new testing macros should be used. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Allow testing of XML->argv conversion with using a real capability map as used in the qemucapabilitiestest. This allows specifying the required qemu version with the test rather than having to enumerate all the required capabilities or allows to use the newest capabilities present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
To allow having more than one output file in the qemuxml2argvtest add a suffix member to the testInfo struct which will allow testing the same XML file with multiple capabilities files. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The helper iterates the directory with files for the capability test and looks up the most recent one for the given architecture. This will allow testing against the newest qemu capabilities so that we can catch regressions in behaviour more easily. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 18 4月, 2018 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
So far we are repeating the following lines over and over: if (!(virSomeObjectClass = virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose))) return -1; While this works, it is impossible to do some checking. Firstly, the class name (the 2nd argument) doesn't match the name in the code in all cases (the 3rd argument). Secondly, the current style is needlessly verbose. This commit turns example into following: if (!(VIR_CLASS_NEW(virSomeObject, virClassForObject))) return -1; Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-