- 11 1月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any test suite which involves a virDomainDefPtr should call virDomainDefCheckABIStability with itself just as a basic sanity check that the identity-comparison always succeeds. This would have caught the recent NULL pointer access crash. Make sure we cope with def->name being NULL since the VMWare config parser produces NULL names. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
While trying to debug a failure of virpcitest during 'make distcheck', I noticed that with a VPATH build, 'cd tests; ./virpcitest' fails for an entirely different reason. To reproduce the distcheck failure, I had to run 'cd tests; abs_srcdir=/path/to/src ./virpcitest'. But we document in HACKING that all of our tests are supposed to be runnable without requiring extra environment variables. The solution: hardcode the location of srcdir into the just-built binaries, rather than requiring make to prepopulate environment variables. With this, './virpcitest' passes even in a VPATH build (provided that $(srcdir) is writable; a followup patch will fix the conditions required by 'make distcheck'). [Note: the makefile must still pass on directory variables to the test environment of shell scripts, since those aren't compiled. So while this solves the case of a compiled test, it still requires environment variables to pass a VPATH build of any shell script test case that relies on srcdir.] * tests/Makefile.am (AM_CFLAGS): Define abs_srcdir in all compiled tests. * tests/testutils.h (abs_srcdir): Quit declaring. * tests/testutils.c (virtTestMain): Rely on define rather than environment variable. * tests/virpcimock.c (pci_device_new_from_stub): Rely on define. * tests/cputest.c (mymain): Adjust abs_top_srcdir default. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxmlnstest.c (mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The test case average timing code has not been used by any test case ever. Delete it to remove complexity. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
Since 0d70656a, it starts to access the sysfs files to build the qemu command line (by virSCSIDeviceGetSgName, which is to find out the scsi generic device name by adpater:bus:target:unit), there is no way to work around, qemu wants to see the scsi generic device like "/dev/sg6" anyway. And there might be other places which need to access sysfs files when building qemu command line in future. Instead of increasing the arguments of qemuBuildCommandLine, this introduces a new callback for qemuBuildCommandLine, and thus tests can register their own callbacks for sysfs test input files accessing. * src/qemu/qemu_command.h: (New callback struct qemuBuildCommandLineCallbacks; extern buildCommandLineCallbacks) * src/qemu/qemu_command.c: (wire up the callback struct) * src/qemu/qemu_driver.c: (Use the new syntax of qemuBuildCommandLine) * src/qemu/qemu_hotplug.c: Likewise * src/qemu/qemu_process.c: Likewise * tests/testutilsqemu.[ch]: (Helper testSCSIDeviceGetSgName; callback struct testCallbacks;) * tests/qemuxml2argvtest.c: (Use testCallbacks) * src/tests/qemuxmlnstest.c: (Like above)
-
- 10 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 17 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
No reason to include it in both "if" and "else" branches.
-
- 05 4月, 2013 3 次提交
-
-
由 Peter Krempa 提交于
This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of propagating it through virCaps.
-
由 Peter Krempa 提交于
Move the xmlopt and caps arguments to the end of the argument list.
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-
- 13 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The virCaps structure gathered a ton of irrelevant data over time that. The original reason is that it was propagated to the XML parser functions. This patch aims to create a new data structure virDomainXMLConf that will contain immutable data that are used by the XML parser. This will allow two things we need: 1) Get rid of the stuff from virCaps 2) Allow us to add callbacks to check and add driver specific stuff after domain XML is parsed. This first attempt removes pointers to private data allocation functions to this new structure and update all callers and function that require them.
-
- 08 2月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
To avoid confusion between 'virCapsPtr' and 'qemuCapsPtr' do some renaming of various fucntions/variables. All instances of 'qemuCapsPtr' are renamed to 'qemuCaps'. To avoid that clashing with the 'qemuCaps' typedef though, rename the latter to virQEMUCaps. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To enable virCapabilities instances to be reference counted, turn it into a virObject. All cases of virCapabilitiesFree turn into virObjectUnref Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the virQEMUDriverPtr struct contains an wide variety of data with varying access needs. Move all the static config data into a dedicated virQEMUDriverConfigPtr object. The only locking requirement is to hold the driver lock, while obtaining an instance of virQEMUDriverConfigPtr. Once a reference is held on the config object, it can be used completely lockless since it is immutable. NB, not all APIs correctly hold the driver lock while getting a reference to the config object in this patch. This is safe for now since the config is never updated on the fly. Later patches will address this fully. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 19 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 29 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the obsolete 'qemud' naming prefix and underscore based type name. Introduce virQEMUDriverPtr as the replacement, in common with LXC driver naming style
-
- 27 9月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
When XML for a new guest is received, the machine type is immediately canonicalized into the version specific name. This involves probing QEMU for supported machine types. Replace this probing with a lookup of the machine types in the (hopefully cached) qemuCapsPtr object Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove all use of the existing APIs for querying QEMU capability flags. Instead obtain a qemuCapsPtr object from the global cache. This avoids the execution of 'qemu -help' (and related commands) when launching new guests. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 9月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current qemu capabilities are stored in a virBitmapPtr object, whose type is exposed to callers. We want to store more data besides just the flags, so we need to move to a struct type. This object will also need to be reference counted, since we'll be maintaining a cache of data per binary. This change introduces a 'qemuCapsPtr' virObject class. Most of the change is just renaming types and variables in all the callers Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
This converts the following public API datatypes to use the virObject infrastructure: virConnectPtr virDomainPtr virDomainSnapshotPtr virInterfacePtr virNetworkPtr virNodeDevicePtr virNWFilterPtr virSecretPtr virStreamPtr virStorageVolPtr virStoragePoolPtr The code is significantly simplified, since the mutex in the virConnectPtr object now only needs to be held when accessing the per-connection virError object instance. All other operations are completely lock free. * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert public datatypes to use virObject * src/conf/domain_event.c, src/phyp/phyp_driver.c, src/qemu/qemu_command.c, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/storage/storage_driver.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c, tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c, tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert to use virObjectUnref/virObjectRef Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 7月, 2012 1 次提交
-
-
由 Viktor Mihajlovski 提交于
Rewrote the device assignment parts in tests to use qemuDomainAssignAddresses. This way the tests will work for new device address types as they show up in the future (like s390 device types). Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 27 3月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
-
- 04 2月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The bulk of this patch was done with: sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c followed by fixing the few compile errors that resulted. * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation): Remove tests from exemption. * tests/testutils.h: Add common header. * tests/commandhelper.c: Fix offenders. * tests/cputest.c: Likewise. * tests/domainsnapshotxml2xmltest.c: Likewise. * tests/interfacexml2xmltest.c: Likewise. * tests/networkxml2argvtest.c: Likewise. * tests/networkxml2xmltest.c: Likewise. * tests/nodedevxml2xmltest.c: Likewise. * tests/nodeinfotest.c: Likewise. * tests/nwfilterxml2xmltest.c: Likewise. * tests/qemuargv2xmltest.c: Likewise. * tests/qemuxml2argvtest.c: Likewise. * tests/qemuxml2xmltest.c: Likewise. * tests/qemuxmlnstest.c: Likewise. * tests/qparamtest.c: Likewise. * tests/sexpr2xmltest.c: Likewise. * tests/storagepoolxml2xmltest.c: Likewise. * tests/storagevolxml2xmltest.c: Likewise. * tests/testutils.c: Likewise. * tests/virshtest.c: Likewise. * tests/xencapstest.c: Likewise. * tests/xmconfigtest.c: Likewise. * tests/xml2sexprtest.c: Likewise.
-
- 21 12月, 2011 1 次提交
-
-
由 Michael Ellerman 提交于
Currently non-x86 guests must have <acpi/> defined in <features> to prevent libvirt from running qemu with -no-acpi. Although it works, it is a hack. Instead add a capability flag which indicates whether qemu understands the -no-acpi option. Use it to control whether libvirt emits -no-acpi. Current versions of qemu always display -no-acpi in their help output, so this patch has no effect. However the development version of qemu has been modified such that -no-acpi is only displayed when it is actually supported. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
- 02 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
I got this failure on FreeBSD: shunloadtest.c: In function 'main': shunloadtest.c:150: error: 'EXIT_AM_SKIP' undeclared (first use in this function) but inspection showed several other problems, all fixed here. * tests/domainsnapshotxml2xmltest.c [!WITH_QEMU]: Ensure EXIT_AM_SKIP is defined. * tests/esxutilstest.c [!WITH_ESX]: Likewise. * tests/openvzutilstest.c [!WITH_OPENVZ]: Likewise. * tests/qemuargv2xmltest.c [!WITH_QEMU]: Likewise. * tests/qemuhelptest.c [!WITH_QEMU]: Likewise. * tests/qemuxml2argvtest.c [!WITH_QEMU]: Likewise. * tests/qemuxml2xmltest.c [!WITH_QEMU]: Likewise. * tests/qemuxmlnstest.c [!WITH_QEMU]: Likewise. * tests/shunloadtest.c [!linux]: Likewise. * tests/vmx2xmltest.c [!WITH_VMX]: Likewise. * tests/xml2vmxtest.c [!WITH_VMX]: Likewise.
-
- 19 11月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
In preparation for code re-organization, rename the Macvtap management APIs to have the following patterns virNetDevMacVLanXXXXX - macvlan/macvtap interface management virNetDevVPortProfileXXXX - virtual port profile management * src/util/macvtap.c, src/util/macvtap.h: Rename APIs * src/conf/domain_conf.c, src/network/bridge_driver.c, src/qemu/qemu_command.c, src/qemu/qemu_command.h, src/qemu/qemu_driver.c, src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/qemu/qemu_process.h: Update for renamed APIs
-
- 25 10月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
This patch is rather cosmetic as it only moves device alias assignation from command line construction just before that. However, it is needed in connotation of previous and next patch.
-
- 19 10月, 2011 1 次提交
-
-
由 Philipp Hahn 提交于
Add test cases for parsing the qemu-name-space. This is based on qemuxml2argv{test,data/}, but can not reside in qemuxml2argv{test,data/} because ... 1. qemuxmlns-qemu-ns-domain.xml is not schema-valid and breaks domainschematest. The test is still important to detect xmlns:qemu bindings to a name-space other than http://libvirt.org/schemas/domain/qemu/1.0 2. they break qemuxml2xml, because the xmlns:qemu binding is moved to the top-level <domain> element when converting from argv to xml. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-