aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Convert public datatypes to inherit from virObjectDaniel P. Berrange2012-08-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel P. Berrange <berrange@redhat.com>
* Consistent style for usage of sizeof operatorDaniel P. Berrange2012-03-301-1/+1
| | | | | | | | | | | | | The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Cleanup for a return statement in source filesMartin Kletzander2012-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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_'
* build: expand rule to cover testsuiteEric Blake2012-02-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* xen_xs: Guard against set but empty kernel argumentGuido Günther2011-10-101-0/+2
| | | | | | | | | | | | | | | On xen 4.1 I observed configurations that look like: (image (hvm (kernel '') (loader '/foo/bar') )) The kernel element is there but unset. This leads to an empty <kernel/> element in the XML and even worse makes us skip the boot order parsing and therefore not emit a <boot device='$dev>'/> element which breaks CD booting.
* Do not drop kernel cmdline for xen pv domainsJim Fehlig2011-07-111-0/+1
| | | | | | | | | | | | | Kernel cmdline args can be passed to xen pv domains even when a bootloader is specified. The current config-to-sxpr mapping ignores cmdline when bootloader is present. Since the xend sub-driver is used with many xen toolstack versions, this patch takes conservative approach of adding an else block to existing !def->os.bootloader, and only appends sxpr if def->os.cmdline is non-NULL. V2: Fix existing testcase broken by this patch and add new testcases
* xen: parse and generate hpet item in sxprPaolo Bonzini2011-05-101-0/+2
| | | | | | | | | | | | | | Recent versions of Xen disable the virtual HPET by default. This is usually more precise because tick policies are not implemented for the HPET in Xen. However, there may be several reasons to control the HPET manually: 1) to test the emulation; 2) because distros may provide the knob while leaving the default to "enabled" for compatibility reasons. This patch provides support for the hpet item in both sexpr and xm formats, and translates it to a <timer> element. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests: Lower stack usage below 4096 bytesMatthias Bolte2011-04-301-19/+30
| | | | | | | | | Make virtTestLoadFile allocate the buffer to read the file into. Fix logic error in virtTestLoadFile, stop reading on the first empty line. Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual buffer handling.
* tests: simplify common setupEric Blake2011-04-291-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few of the tests were missing basic sanity checks, while most of them were doing copy-and-paste initialization (in fact, some of them pasted the argc > 1 check more than once!). It's much nicer to do things in one common place, and minimizes the size of the next patch that fixes getcwd usage. * tests/testutils.h (EXIT_AM_HARDFAIL): New define. (progname, abs_srcdir): Define for all tests. (VIRT_TEST_MAIN): Change callback signature. * tests/testutils.c (virtTestMain): Do more common init. * tests/commandtest.c (mymain): Simplify. * tests/cputest.c (mymain): Likewise. * tests/esxutilstest.c (mymain): Likewise. * tests/eventtest.c (mymain): Likewise. * tests/hashtest.c (mymain): Likewise. * tests/networkxml2xmltest.c (mymain): Likewise. * tests/nodedevxml2xmltest.c (myname): Likewise. * tests/nodeinfotest.c (mymain): Likewise. * tests/nwfilterxml2xmltest.c (mymain): Likewise. * tests/qemuargv2xmltest.c (mymain): Likewise. * tests/qemuhelptest.c (mymain): Likewise. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qparamtest.c (mymain): Likewise. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/sockettest.c (mymain): Likewise. * tests/statstest.c (mymain): Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/virbuftest.c (mymain): Likewise. * tests/virshtest.c (mymain): Likewise. * tests/vmx2xmltest.c (mymain): Likewise. * tests/xencapstest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise. * tests/xml2sexprtest.c (mymain): Likewise. * tests/xml2vmxtest.c (mymain): Likewise.
* Add support for multiple serial ports into the Xen driverMichal Novotny2011-02-251-0/+2
| | | | | | | | | | | | | | | this is the patch to add support for multiple serial ports to the libvirt Xen driver. It support both old style (serial = "pty") and new style (serial = [ "/dev/ttyS0", "/dev/ttyS1" ]) definition and tests for xml2sexpr, sexpr2xml and xmconfig have been added as well. Written and tested on RHEL-5 Xen dom0 and working as designed but the Xen version have to have patch for RHBZ #614004 but this patch is for upstream version of libvirt. Also, this patch is addressing issue described in RHBZ #670789. Signed-off-by: Michal Novotny <minovotn@redhat.com>
* Renamed functions in xenxsMarkus Groß2011-02-211-2/+1
|
* Moved SEXPR parsing functions to xenxsMarkus Groß2011-02-211-1/+12
|
* vcpu: improve vcpu support in xen command lineEric Blake2010-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch series focuses on xendConfigVersion 2 (xm_internal) and 3 (xend_internal), but leaves out changes for xenapi drivers. See this link for more details about vcpu_avail for xm usage. http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01061.html This relies on the fact that def->maxvcpus can be at most 32 with xen. * src/xen/xend_internal.c (xenDaemonParseSxpr) (sexpr_to_xend_domain_info, xenDaemonFormatSxpr): Use vcpu_avail when current vcpus is less than maximum. * src/xen/xm_internal.c (xenXMDomainConfigParse) (xenXMDomainConfigFormat): Likewise. * tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr: New file. * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr: Likewise. * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml: Likewise. * tests/xmconfigdata/test-paravirt-vcpu.cfg: Likewise. * tests/xmconfigdata/test-paravirt-vcpu.xml: Likewise. * tests/xml2sexprtest.c (mymain): New test. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise.
* Fix Xen SEXPR generation to properly quote strings containing ()Daniel P. Berrange2010-10-131-0/+2
| | | | | | | | | | | * src/xen/sexpr.c: Ensure () are escaped in sexpr2string * tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr, tests/sexpr2xmldata/sexpr2xml-boot-grub.xml, tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr, tests/xml2sexprdata/xml2sexpr-boot-grub.xml: Data files to check escaping * tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Add boot-grub escaping test case
* Add tests for Xen's blktap2 implementationJim Fehlig2010-08-311-0/+1
| | | | xml2sexpr and sexpr2xml tests for blktap2
* Remove virConnectPtr from all domain XML parsing/formatting APIsDaniel P. Berrange2010-02-101-1/+1
|
* Tests for interface type/model configurationJiri Denemark2009-12-041-0/+3
| | | | add a set of tests for Xen interface type and model configurations
* Move xen driver code into src/xen/ directoryDaniel P. Berrange2009-09-211-2/+2
| | | | | | | | | | | | | | | | | | | * src/Makefile.am, src/proxy_internal.c, src/proxy_internal.h src/sexpr.c, src/sexpr.h, src/xen_unified.c, src/xen_unified.h, src/xen_internal.c, src/xen_internal.h, src/xen_inotify.c, src/xen_inotify.h, src/xend_internal.c, src/xend_internal.h, src/xm_internal.c, src/xm_internal.h, src/xs_internal.c, src/xs_internal.h: Move to src/xen/ directory * proxy/Makefile.am, proxy/libvirt_proxy.c, src/Makefile.am, src/libvirt.c, tests/sexpr2xmltest.c, tests/statstest.c, tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c: Adapt to changed xen location * src/stats_linux.h, src/stats_linux.c: Remove xen specific block stats APIs * src/qemu_driver.c, src/uml_driver.c: Add missing sys/un.h include uncovered after change to stats_linux.h * src/xen/block_stats.h, src/xen/block_stats.c: Add xen specific block stats APIs
* Add test for recently fixed crash with latest XenDDaniel P. Berrange2009-08-191-0/+1
| | | | | | | | | | | | | Test case for the fix applied in commit 14435163a086c0bcdff04308077fa46a5fa08bb0 Author: Daniel Veillard <veillard@redhat.com> Date: Fri Jun 26 18:14:16 2009 +0000 * tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.sexpr, tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml: Data files exhibiting the crash * tests/sexpr2xmltest.c: Process new data files
* remove all trailing blank linesJim Meyering2009-07-161-1/+0
| | | | | | | by running this command: git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/' This is in preparation for a more strict make syntax-check rule that will detect trailing blank lines.
* Support PCI passthrough for XenDaniel P. Berrange2009-04-031-0/+1
|
* Fix localtime handling for newer XenDDaniel P. Berrange2009-04-011-0/+1
|
* Misc fixes uncovered by OOM testingDaniel P. Berrange2009-04-011-1/+5
|
* fix VNC port reporting when vncunused is setJohn Levon2009-01-291-0/+1
|
* parse IP address for bridge interfacesJohn Levon2009-01-231-0/+1
|
* Fix to xen test case for threadsafety patchesDaniel P. Berrange2009-01-221-1/+23
|
* Fix test suite build when Xen driver is disabledDaniel P. Berrange2008-11-241-10/+0
|
* Fix reading vncdisplay from xend, add several test cases for xen vnc corner caseCole Robinson2008-09-091-0/+1
| | | | s.
* Convert XenD SEXPR->XML convesion to new domain XML APIsDaniel P. Berrange2008-07-251-9/+10
|
* Convert test suites over to new test infrastructureDaniel P. Berrange2008-05-291-5/+8
|
* Added disk target bus type to Xen driverDaniel P. Berrange2008-05-081-2/+2
|
* Sound support for QEmu and XenDaniel Veillard2008-05-071-0/+3
| | | | | | | | | | * src/qemu_conf.c src/qemu_conf.h src/xend_internal.c src/xend_internal.h src/xm_internal.c src/xml.c src/xml.h: Patch from Cole Robinson adding sound support for QEmu and Xen * tests/qemuxml2argvtest.c tests/sexpr2xmltest.c tests/xmconfigtest.c tests/xml2sexprtest.c: Associated regression tests Daniel
* Added support for network interface model settingDaniel P. Berrange2008-04-301-0/+1
|
* Added full support for serial and parallel devices to Xen driversDaniel P. Berrange2008-04-261-239/+78
|
* convert TAB-based indentation in C sources to use only spacesJim Meyering2008-04-101-83/+83
| | | | | | Done using this command (also includes .c.in and .h.in files): for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do expand -i $i > j && mv j $i;done
* remove Vim and Emacs variable settings from C source filesJim Meyering2008-04-101-8/+0
| | | | | | | | | Done with these commands: git grep -l Local.variab|xargs \ perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,' git grep -l Local.variab|xargs \ perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
* Added support for booting off kenrel+initrd with HVM guestsDaniel P. Berrange2008-02-051-0/+20
|
* Enable the <config.h>-requiring test; fix violationsJim Meyering2008-01-291-1/+1
| | | | | | | Use <config.h>, not "config.h", per autoconf documentation. * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable. * .x-sc_require_config_h: New file, to list exempted files. * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
* Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-12-051-5/+2
| | | | | | | | | | | | | | | | | | | * python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c, qemud/remote.c, src/internal.h, src/openvz_conf.c, src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c, src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c, src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c, tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c, tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c: Change #include <> to #include "" for local includes. Removed many includes from src/internal.h and put them in the C files which actually use them. Removed <ansidecl.h> - unused. Added a comment around __func__. Removed a clashing redefinition of VERSION symbol. All limits (PATH_MAX etc) now done in src/internal.h, so we don't need to include those headers in other files.
* Mon Nov 26 12:03:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-11-261-0/+6
| | | | | | | * tests/Makefile.am, tests/nodeinfotest.c, tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c: Miscellaneous fixes to the tests to compile under Cygwin.
* * tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exitingDaniel Veillard2007-11-201-2/+14
| | | | | | | | | | | if the path environment variable is missing, add the tests for <shareable/> from/to w! ode for disk * tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml: the new tests data Daniel
* Arrange for tests to pass in a non-srcdir build.Jim Meyering2007-11-141-1/+12
| | | | | | | | | | | | | | | | | | | | * tests/Makefile.am: Include the contents of the *data directories in the make-dist-built tarball by adding each of that *data directories to EXTRA_DIST. Also add int-overflow (via $(test_scripts)) to EXTRA_DIST. * tests/nodeinfotest.c: Prepend "$abs_top_srcdir/tests" to each input file name. * tests/qemuxml2argvtest.c: Likewise. * tests/qemuxml2xmltest.c: Likewise. * tests/sexpr2xmltest.c: Likewise. * tests/test_conf.sh: Likewise. * tests/virshtest.c: Likewise. * tests/xencapstest.c: Likewise. * tests/xmconfigtest.c: Likewise. * tests/xml2sexprtest.c: Likewise. Author: Jim Meyering <meyering@redhat.com>
* Tue Aug 21 10:36:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-08-211-1/+1
| | | | | * tests/xencapsdata/*.xml: Fixed tests to include new <migration_features> element in capabilities XML.
* Tue Aug 21 09:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-08-211-0/+1
| | | | | | * src/xend_internal.c: Return the interface device name as <target dev='vifX.Y'/> in domain XML. * tests/*: Update XML in regression tests.
* Added support for input devicesDaniel P. Berrange2007-07-181-18/+36
|
* Added new <clock/> element in XML for choosing utc/localtimeDaniel P. Berrange2007-07-161-5/+27
|
* * src/xend_internal.c src/xm_internal.c src/xml.c: add supportDaniel Veillard2007-06-071-0/+10
| | | | | | | | | | | for arguments to bootloader, patch from Hugh Brock * tests/sexpr2xmltest.c tests/xml2sexprtest.c tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific regression tests Daniel
* * src/xend_internal.c src/xml.c: applied patch from Nobuhiro ItouDaniel Veillard2007-04-111-0/+10
| | | | | | | | | | | to handle CDRom devices with no device name * tests/sexpr2xmltest.c tests/xml2sexprtest.c tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.sexpr tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr tests/xml2sexprdata/xml2sexpr-no-source-cdrom.xml: added regression tests for this case based on Nobuhiro Itou test inputs. Daniel
* * src/xml.c tests/sexpr2xmltest.c tests/xmconfigtest.c: avoidDaniel Veillard2007-03-161-1/+1
| | | | | warnings when compiling without Xen Daniel
* * configure.in proxy/Makefile.am proxy/libvirt_proxy.cDaniel Veillard2007-03-151-0/+17
| | | | | | | | | | | | src/Makefile.am src/libvirt.c src/qemu_internal.c src/test.c src/xen_internal.c src/xen_internal.h src/xend_internal.c src/xm_internal.c src/xml.c src/xs_internal.c tests/Makefile.am tests/sexpr2xmltest.c tests/xmconfigtest.c: allow selective compilation of Xen,QEmu/KVM and test support in or out at configure time. Also allows to compile on a system without Xen development installed. All drivers are selected by default. Daniel