- 24 4月, 2014 5 次提交
-
-
由 Peter Krempa 提交于
To conform with the naming of the planned XML output rename the metadata variable name. s/backingMeta/backingStore/g
-
由 Peter Krempa 提交于
Replace the old structure with the new one. This change is a trivial name change operation (along with change of the freeing function).
-
由 Peter Krempa 提交于
Remove the obsolete field replaced by data in "path". The testsuite requires tweaking as the name of the backing file is now stored one layer deeper in the backing chain linked list.
-
由 Peter Krempa 提交于
As for the previous patch, this change is needed to achieve compatibility with all the existing code, where we expect a fully qualified path of local files to be present.
-
由 Peter Krempa 提交于
To allow future change of virStorageFileMetadata to virStorageSource we need to store a full path in the "path" variable as rest of the code expects it to be a full path. Rename the "path" field to "relPath" to keep tracking the info but allowing a real "path" field.
-
- 23 4月, 2014 1 次提交
-
-
由 Li Zhang 提交于
Currently, libvirt is using legacy USB controller as default. There are problems with VGA which can't work correctly with USB Keyboard and USB Mouse. While providing -nodefaults, ppc64 should be specifying the usb controller explicitly in place of using the legacy controller(-usb). Qemu spapr initialization code when sees "-usb" adds a USB Keyboard and USB Mouse by default. And libvirt has added a USB keyboard and USB mouse. A recent fix in the in qemu VGA code uncoverd this problem, which resulted in addition of extra keyboard and mouse to the qemu machine. This patch is to set pci-ohci as USB default controller. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
-
- 22 4月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Fix minor typos in source comments Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 4月, 2014 3 次提交
-
-
由 Eric Blake 提交于
I noticed that depending on the <driver> attributes the user passed in, the output may omit the <driver> element altogether. For example, the rerror_policy has had this problem since commit 4bb4109f in Oct 2011. But in adding testsuite coverage to expose it, I found another problem: the C code is just fine without a driver name, but the XML validator required either a name or a cache mode. * src/conf/domain_conf.c (virDomainDiskDefFormat): Update conditional. * docs/schemas/domaincommon.rng (diskDriver): Simplify. * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.xml: * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.args: New files. * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml: Enhance test. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml: Likewise. * tests/qemuxml2argvtest.c (mymain): New test. * tests/qemuxml2xmltest.c (mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Eric Blake 提交于
To make <disk> schema more maintainable and to allow for moving the pieces to a common file in the future. It relies on the ability to override definitions as part of an include, set up in the previous patch. The diff is a bit hard to read, because it mixes reindentation with refactoring; 'git diff -b --patience' may help. * docs/schemas/domaincommon.rng (disk): Refactor into pieces. (diskSource, diskSourceFile, diskSourceBlock, diskSourceDir) (diskSourceVolume: New defines. (diskSourceNetwork): Revise scope. * docs/schemas/domainsnapshot.rng (disksnapshot): Adjust. * tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml, tests/domainsnapshotxml2xmlin/disk-network-seclabel-invalid.xml: New tests to check seclabel is forbidden in domain snapshot by schema. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Eric Blake 提交于
This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 15 4月, 2014 1 次提交
-
-
由 Eric Blake 提交于
In general, we try to make virt-xml-validate tolerant of input elements in any order when possible. However, as written, the RNG grammar did not permit <source> unless there was an explicit type= attribute (even though the C code manages just fine by defaulting to type='file'). After making the attribute optional on the 'file' branch, I noticed that the use of diskspec was now redundant with the branch when no <source> was supplied. View this patch with 'git diff -b' for a better picture of the schema change. * docs/schemas/domaincommon.rng (disk): Hoist 'diskspec' out of choice, make type='file' default, and still preserve interleave. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-source-pool.xml: * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml: New files. * tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml: * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml: Reorder XML. * tests/qemuxml2xmltest.c (mymain): Cover new files. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 4月, 2014 6 次提交
-
-
由 Eric Blake 提交于
Another field no longer needed, getting us one step closer to merging virStorageFileMetadata and virStorageSource. * src/util/virstoragefile.h (_virStorageFileMetadata): Drop field. * src/util/virstoragefile.c (virStorageFileGetMetadataInternal) (virStorageFileGetMetadataFromFDInternal): Alter signature. (virStorageFileFreeMetadata, virStorageFileGetMetadataFromBuf) (virStorageFileGetMetadataFromFD): Adjust clients. * tests/virstoragetest.c (_testFileData, testStorageChain) (mymain): Simplify test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Thanks to the testsuite, I feel quite confident that this rewrite is correct; it gives the same results for all cases except for one. I can make the argument that _that_ case was a pre-existing bug: when looking up relative names, the lookup is supposed to be pegged to the directory that contains the parent qcow2 file. Thus, this resolves the fixme first mentioned in commit 367cd69d (even though I accidentally removed the fixme comment early in 74430fe3). * src/util/virstoragefile.c (virStorageFileChainLookup): Depend on new rather than old fields. * tests/virstoragetest.c (mymain): Adjust test to match fix. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The original chain lookup code had to pass in the starting name, because it was not available in the chain. But now that we have added fields to the struct, this parameter is redundant. * src/util/virstoragefile.h (virStorageFileChainLookup): Alter signature. * src/util/virstoragefile.c (virStorageFileChainLookup): Adjust handling of top of chain. * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Adjust caller. * tests/virstoragetest.c (testStorageLookup, mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I realized that we had no good test coverage of looking up a name from within a backing chain, even though code like block-commit is relying on it. * tests/virstoragetest.c (testStorageLookup): New function. (mymain): New tests. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
This uses the dbus api of systemd to check the power management capabilities of the node.
-
由 Eric Blake 提交于
Noticed while tweaking the RelaxNG grammar for <disk> elements. * tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml: * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml: Drop unused files. * tests/qemuargv2xmltest.c (testInfo, DO_TEST_FULL): Drop unused field. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 11 4月, 2014 5 次提交
-
-
由 Eric Blake 提交于
Drop another redundant field from virStorageFileMetadata. * src/util/virstoragefile.h (_virStorageFileMetadata): Drop field. * src/util/virstoragefile.c (virStorageFileGetMetadataFromFDInternal) (virStorageFileGetMetadataFromFD) (virStorageFileGetMetadataRecurse): Adjust callers. * tests/virstoragetest.c (_testFileData, testStorageChain) (mymain): Simplify test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Finally starting to prune away some of the old fields that have been made redundant by the new fields, on my way towards directly reusing virStorageSource. * src/util/virstoragefile.h (_virStorageFileMetadata): Drop field. * src/util/virstoragefile.c (virStorageFileGetMetadataInternal) (virStorageFileChainLookup): Adjust callers. * tests/virstoragetest.c (_testFileData, testStorageChain) (mymain): Simplify test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
So far, my work has been merely preserving the status quo of backing file analysis. But this patch starts to tread in the territory of making the backing chain code more powerful - we will eventually support network storage containing non-raw formats. Here, we expose metadata information about a network backing store, even if that information is still hardcoded to a raw format for now. * src/util/virstoragefile.c (virStorageFileGetMetadataRecurse): Also populate struct for non-file backing. (virStorageFileGetMetadata, virStorageFileGetMetadatainternal): Recognize non-file top image. (virFindBackingFile): Add comment. (virStorageFileChainGetBroken): Adjust comment, ensure output is set. * tests/virstoragetest.c (mymain): Update test to reflect it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I'm tired of alternating between test failures due to bugs in my refactoring work, vs. test failures due to leftovers in the file system from the previous test. This patch has no impact when the testsuite is successful, but doeesn't hurt either. * tests/virstoragetest.c (testPrepImages): Clean up from prior failed test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jiri Denemark 提交于
Every test that makes use of virmock.h (only virsystemdtest as of now) needs to be linked with -export-dynamic to make sure the LD_PRELOADed mock library can access its wrap_* symbols. Normally, DRIVER_MODULE_LDFLAGS variable contains -export-dynamic but when --without-driver-modules configure option is used, DRIVER_MODULE_LDFLAGS is empty. This patch turns on -export-dynamic for all tests unconditionally regardless on --without-driver-modules. This fixes virsystemdtest and all future users of virmock.h. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 09 4月, 2014 10 次提交
-
-
由 Ján Tomko 提交于
Currently, virCgroupGetPercpuStats is only used by the LXC driver, filling out the CPUTIME stats. qemuDomainGetPercpuStats does this and also filles out VCPUTIME stats. Extend virCgroupGetPercpuStats to also report VCPUTIME stats if nvcpupids is non-zero. In the LXC driver, we don't have cpupids. In the QEMU driver, there is at least one cpupid for a running domain, so the behavior shouldn't change for QEMU either. Also rename getSumVcpuPercpuStats to virCgroupGetPercpuVcpuSum.
-
由 Eric Blake 提交于
Validate that all the new fields are getting set to desired values. * tests/virstoragetest.c (_testFileData, testStorageChain): Check for more fields. (mymain): Populate additional fields. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The testsuite is absolutely essential to feeling comfortable about swapping the backing chain structure over to a new format. This patch tests the path settings, and demonstrates that the correct short name is being passed to the child. * tests/virstoragetest.c (testStorageChain): Test path. (mymain): Update expected data. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
A later patch will be adding some new fields to virStorageFileMetadata; to minimize confusion, renaming the test fields now will make it more obvious which fields are being tested later. * tests/virstoragetest.c (_testFileData): Alter names. (testStorageChain, mymain): Adjust clients. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jean-Baptiste Rouault 提交于
Introduced in commit d1e55de3. virstoragetest.c: In function ‘testStorageChain’: virstoragetest.c:249:10: warning: declaration of ‘abs’ shadows a global declaration [-Wshadow]
-
由 Roman Bogorodskiy 提交于
As we can use virBhyveCapsBuild() now, replace testBhyveBuildCapabilities() with it.
-
由 Eric Blake 提交于
Another reduction in the number of structs I have to modify when I start tracking new fields in virStorageFileMetadata. * tests/virstoragetest.c (_testFileData): Add fields. (testStorageChain): Select between fields based on flag. (mymain): Record both absolute and relative expectations in one struct. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 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>
-
由 Roman Bogorodskiy 提交于
The only implemented test for now is domain metadata test.
-
- 08 4月, 2014 7 次提交
-
-
由 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 提交于
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>
-
由 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
-
由 Cédric Bosdonnat 提交于
-
- 07 4月, 2014 1 次提交
-
-
由 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>
-