- 09 4月, 2014 7 次提交
-
-
由 Eric Blake 提交于
As I add more tests, it's getting harder to follow the split between a struct in one place and a test using the struct in another. Interleaving the tests makes changes more localized, and also makes debugging easier when a test goes wrong during my refactoring work. * tests/virstoragetest.c (mymain): Modify structs as we go, rather than up-front. (testStorageChain): Make failure debugging easier. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Part of the upcoming refactoring will change how broken chains are detected; it makes sense to test that this works. In particular, test the just-fixed infinite loop detection bug. Also, make sure that detection of directories is sane. * tests/virstoragetest.c (testStorageChain): Enhance test. (mymain): Add more tests. (testCleanupImages, testPrepImages): Populate a directory. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
While trying to refactor the backing file chain, I noticed that if you have a self-referential qcow2 file via a relative name: qemu-img create -f qcow2 loop 10M qemu-img rebase -u -f qcow2 -F qcow2 -b loop loop then libvirt was creating a chain 2 deep before realizing it had hit a loop; furthermore, virStorageFileChainCheckBroken was not identifying the chain as broken. With this patch, the loop is detected when the chain is only 1 deep; still enough for storage volume XML to display the file, but now with a proper error report about where the loop was found. This patch adds a parameter to virStorageFileGetMetadataRecurse, so that errors at the top of the chain remain unchanged; messages issued for backing files now use the name provided by the user instead of the canonical name (for VDSM, which uses relative symlinks to device mapper block devices, this is actually more useful). * src/util/virstoragefile.c (virStorageFileGetMetadataRecurse): Add parameter, require canonical path up front. Mark chain broken on OOM or loop detection. (virStorageFileGetMetadata): Pass in canonical name. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jean-Baptiste Rouault 提交于
Since commit 7457cbe8 the vmware driver version isn't set anymore. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Roman Bogorodskiy 提交于
The only implemented test for now is domain metadata test.
-
由 Roman Bogorodskiy 提交于
Implement domainSetMetadata and domainGetMetadata driver calls.
-
由 Roman Bogorodskiy 提交于
Fix incorrect ATTRIBUTE_NONNULL usage introduced in 17b17565 which caused build failure: bhyve/bhyve_driver.c:127:48: error: expected ')' bhyveDriverGetCapabilities(bhyveConnPtr driver ATTRIBUTE_NONNULL) ^ bhyve/bhyve_driver.c:127:27: note: to match this '(' bhyveDriverGetCapabilities(bhyveConnPtr driver ATTRIBUTE_NONNULL) Pushed under the build breaker rule.
-
- 08 4月, 2014 18 次提交
-
-
由 Richard Weinberger 提交于
Commit b9dd878f (util: make it easier to grab only regular command exit) changed the call semantics of virCommandRun() and therefore of virRun() too. But lxcCheckNetNsSupport() was not updated. As consequence of this lxcCheckNetNsSupport always failed and broke LXC. Signed-off-by: NRichard Weinberger <richard@nod.at>
-
由 Daniel P. Berrange 提交于
Now that we ditched our custom pthread impl for Win32, we can use PTHREAD_MUTEX_INITIALIZER for static mutexes. This avoids the need to use a virOnce one-time global initializer in a number of places. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Use a syntax-check rule to force PCI, USB and SCSI instead of Pci, Usb and Scsi. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, PCI should always be fully capitalized or full lower case, never Pci. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, USB should always be fully capitalized or full lower case, never Usb. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, SCSI should always be fully capitalized or full lower case, never Scsi. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove the virsystemdmock.la library and instead make use of the shared virmockdbus.la library Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A number of test suites want to mock the DBus APIs. To avoid re-inventing the wheel create a re-usable virmockdbus.la library for LD_PRELOAD usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce virmock.h which provides some macros to assist in creation of LD_PRELOAD overrides. When these are used, the LD_PRELOAD code simply has some stubs which forward to a wrapper function inside the main test case. This means that logic for the test no longer has to be split between the virXXXtest.c and virXXXmock.c files. It will also make it possible to provide some common reusable modules for mocking code like DBus. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Wangrui (K) 提交于
Functions virNetDevRestoreMacAddress() and virNetDevRestoreMacAddress() allocate memory for variable @path using virAsprintf(), but they haven't freed that memory before returning out. Signed-off-by: NZhang bo <oscar.zhangbo@huawei.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
At the beginning of the function we gain a reference to the driver capabilities. Then, we call format function (*) which if failed, unref over caps is called. Then, at the end another unref occurs. * - Moreover, the format was not called over gained caps, but over privconn->caps directly which is not allowed anymore. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The driver passed as the only argument to the function should never be NULL so there's no need to check it. After removing it, the whole function collapses to a single line doing ref over driver capabilities. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Since b15a2bbd we have the new bhyve_capabilities.[ch] files. However, the copyright is held by both Roman and Semihalf. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Guido Günther 提交于
As observed when building in a chroot and QEMU_USER doesn't exist
-
由 Guido Günther 提交于
to avoid CCLD storagevolxml2argvtest /usr/bin/ld: ../src/.libs/libvirt_driver_storage_impl.a(libvirt_driver_storage_impl_la-storage_backend.o): undefined reference to symbol 'xmlFreeDoc@@LIBXML2_2.4.30' //usr/lib/x86_64-linux-gnu/libxml2.so.2: error adding symbols: DSO missing from command line
-
由 Eric Blake 提交于
I noticed that the apparmor code could request metadata even for a cdrom with no media, which would cause a memory leak of the hash table used to look for loops in the backing chain. But even before that, we blindly dereferenced the path for printing a debug statement, so it is just better to enforce that this is only used on non-NULL names. * src/util/virstoragefile.c (virStorageFileGetMetadata): Assume non-NULL path. * src/util/virstoragefile.h: Annotate this. * src/security/virt-aa-helper.c (get_files): Fix caller. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
-
- 07 4月, 2014 9 次提交
-
-
由 Wojciech Macek 提交于
Implement support for connectCompareCPU.
-
由 Wojciech Macek 提交于
- Move all capabilities functions to separate file - Add initCPU
-
由 Wojciech Macek 提交于
Implement bhyveConnectBaselineCPU to support OpenStack/Nova
-
由 Laine Stump 提交于
Other drivers in libvirt (e.g. network, qemu) will automatically return the "inactive" (persistent configuration) XML of an object when that object is inactive. The netcf backend of the interface driver would always try to return the live status XML of the interface, even when it was down. Although netcf does return valid XML in that case, for bond interfaces it is missing almost all of its content, including the <bond> subelement itself, leading to this error message from "virsh iface-dumpxml" of a bond interface that is inactive: error: XML error: bond interface misses the bond element (this is because libvirt's validation of the XML returned by netcf always requires a <bond> element be present). This patch modifies the interface driver netcf backend to check if the interface is inactive, and in that case always return the inactive XML (which will always have a <bond> element, thus eliminating the error message, as well as making operation more in line with other drivers. This fixes the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=878394
-
由 Eric Blake 提交于
I almost wrote a hash value free function that just called VIR_FREE, then realized I couldn't be the first person to do that. Sure enough, it was worth factoring into a common helper routine. * src/util/virhash.h (virHashValueFree): New function. * src/util/virhash.c (virHashValueFree): Implement it. * src/util/virobject.h (virObjectFreeHashData): New function. * src/libvirt_private.syms (virhash.h, virobject.h): Export them. * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit): Use common function. * src/qemu/qemu_capabilities.c (virQEMUCapsCacheNew): Likewise. * src/qemu/qemu_command.c (qemuDomainCCWAddressSetCreate): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorGetBlockInfo): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/util/virclosecallbacks.c (virCloseCallbacksNew): Likewise. * src/util/virkeyfile.c (virKeyFileParseGroup): Likewise. * tests/qemumonitorjsontest.c (testQemuMonitorJSONqemuMonitorJSONGetBlockInfo): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jincheng Miao 提交于
Commit d7c4e003 assumed all SELinux tests depended upon securityselinuxhelper need xattr support, but forgot to move viridentitytest under WITH_ATTR. Reported-by: NNehal J Wani <nehaljw.kkd1@gmail.com> Signed-off-by: NJincheng Miao <jmiao@redhat.com>
-
由 Peter Krempa 提交于
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible.
-
由 Guido Günther 提交于
At least Debian uses dash to run the init scripts
-
由 Antoni S. Puimedon 提交于
Up until now the traffic control filters for the vNIC QoS were matching only ip traffic. For egress traffic that was unnoticed because the unmatched traffic would just go to the default htb class and be shaped anyway. For ingress, though, since the policing of the rate is done by the filter itself. The problem is solved by changing protocol to all and making anything match the filter. Bug-Url: https://bugzilla.redhat.com/1084444Signed-off-by: NAntoni S. Puimedon <asegurap@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 4月, 2014 6 次提交
-
-
由 Roman Bogorodskiy 提交于
-
由 Roman Bogorodskiy 提交于
nmdm is a FreeBSD driver which allows to create a pair of tty devices one of which is passed to the guest and second is used by the client. This patch adds new 'nmdm' character device type. Its definition looks this way: <serial type='nmdm'> <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/> </serial> Master is passed to the hypervisior and slave is used for client connection. Also implement domainOpenConsole() for bhyve driver based on that.
-
由 David Shane Holden 提交于
Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
由 Eric Blake 提交于
Right now, virStorageFileMetadata tracks bool backingStoreIsFile for whether the backing string specified in metadata can be resolved as a file (covering both block and regular file resources) or is treated as a network protocol. But when merging this struct with virStorageSource, it will be easier to just actually track which type of resource it is, as well as have a reserved value for the case where the resource type is unknown (or had an error during probing). * src/util/virstoragefile.h (virStorageType): Add a placeholder value, swap order to match similar public enum. * src/util/virstoragefile.c (virStorage): Update string mapping. * src/conf/domain_conf.c (virDomainDiskSourceParse) (virDomainDiskDefParseXML, virDomainDiskDefFormat) (virDomainDiskSourceFormat): Adjust clients. * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML): Likewise. * src/qemu/qemu_driver.c (qemuDomainSnapshotPrepareDiskExternalBackingInactive) (qemuDomainSnapshotPrepareDiskExternalOverlayActive) (qemuDomainSnapshotPrepareDiskExternalOverlayInactive) (qemuDomainSnapshotPrepareDiskInternal) (qemuDomainSnapshotCreateSingleDiskActive): Likewise. * src/qemu/qemu_command.c (qemuGetDriveSourceString): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I'm about to add fields to virStorageFileMetadata, which means also adding fields to the testFileData struct in virstoragetest. Alas, adding even one pointer on an x86_64 machine gave me a dreaded compiler error: virstoragetest.c:712:1: error: the frame size of 4208 bytes is larger than 4096 bytes [-Werror=frame-larger-than=] After some experimentation, I realized that each test was creating yet another testChainData (which contains testFileData) on the stack; forcing the reuse of one of these structures instead of creating a fresh one each time drastically reduces the size requirements. While at it, I also got rid of a lot of intermediate structs, with some macro magic that lets me directly build up the destination chains inline. For a bit more insight into what this patch does: The old code uses an intermediate variable as a fixed-size array of structs: testFileData chain[] = { a, b }; data.files = chain; In the new code, the use of VIR_FLATTEN_* allows the TEST_CHAIN() macro to still take a single argument for each chain, but now of the form '(a, b)', where it is turned into the var-args 'a, b' multiple arguments understood by TEST_ONE_CHAIN(). Thus, the new code avoids an intermediate variable, and directly provides the list of pointers to be assigned into array elements: data.files = { &a, &b }; * tests/virstoragetest.c (mymain): Rewrite TEST_ONE_CHAIN to reuse the same struct for each test, and to take the data inline rather than via intermediate variables. (testChainData): Use bounded array of pointers instead of unlimited array of struct. (testStorageChain): Reflect struct change. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Writing this test with C99 initializers will make it easier to test additions and deletions to struct members as I refactor the code. * tests/virstoragetest.c (mymain): Rewrite initializers. Signed-off-by: NEric Blake <eblake@redhat.com>
-