summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add domain type checkingMatthias Bolte2011-07-111-1/+1
| | | | | | | | | The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. Add a check for the expected domain types to the virDomainDefParse* functions.
* 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-20/+31
| | | | | | | | | 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-15/+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-1/+1
|
* Moved SEXPR formatting functions to xenxsMarkus Groß2011-02-211-0/+1
|
* xend: Escape reserved sexpr charactersCole Robinson2010-11-221-0/+1
| | | | | If we don't escape ' or \ xend can't parse the generated sexpr. This might over apply the EscapeSexpr routine, but it shouldn't hurt.
* 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/+2
| | | | xml2sexpr and sexpr2xml tests for blktap2
* xen tests: Fix PV-VFB tests with RHEL-5 APIJiri Denemark2010-08-241-0/+5
| | | | | | RHEL-5 Xen doesn't support the old style vnc configuration. In sexpr, we can't really check it with rhel5-api turned on. However, for XM configuration files it's sufficient to use cfg version 1 instead of 2.
* 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-1/+1
| | | | | | | | | | | | | | | | | | | * 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
* 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-0/+1
|
* parse IP address for bridge interfacesJohn Levon2009-01-231-0/+1
|
* add missing flags argumentGuido Günther2009-01-081-1/+2
|
* Fix test suite build when Xen driver is disabledDaniel P. Berrange2008-11-241-7/+0
|
* Fix reading vncdisplay from xend, add several test cases for xen vnc corner caseCole Robinson2008-09-091-0/+1
| | | | s.
* Convert XenD XML->SEXPR conversion to new domain XML APIsDaniel P. Berrange2008-07-251-15/+19
|
* Convert test suites over to new test infrastructureDaniel P. Berrange2008-05-291-4/+6
|
* Remove all use of strcmp, strncmp in favour of STREQ, STREQLEN, STRPREFIXDaniel P. Berrange2008-05-141-1/+1
|
* Sound support for QEmu and XenDaniel Veillard2008-05-071-0/+2
| | | | | | | | | | * 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-291/+71
|
* convert TAB-based indentation in C sources to use only spacesJim Meyering2008-04-101-122/+122
| | | | | | 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 all trailing blanks; turn on the rule to detect them.Jim Meyering2008-02-051-1/+1
| | | | | * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank. * .x-sc_trailing_blank: New file, to exempt the few binary files.
* Added support for booting off kenrel+initrd with HVM guestsDaniel P. Berrange2008-02-051-0/+11
|
* 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-7/+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.
* Disable Xen specific functions if Xen driver is disabledDaniel P. Berrange2007-11-301-0/+10
|
* 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/+16
| | | | | | | | | | | 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>
* Fixed compiler warningsDaniel P. Berrange2007-07-181-23/+23
|
* Added support for input devicesDaniel P. Berrange2007-07-181-4/+27
|
* Added new <clock/> element in XML for choosing utc/localtimeDaniel P. Berrange2007-07-161-0/+22
|
* * src/xend_internal.c src/xm_internal.c src/xml.c: add supportDaniel Veillard2007-06-071-0/+11
| | | | | | | | | | | 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-4/+21
| | | | | | | | | | | 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
* Tue Feb 14 16:14:32 IST 2007 Mark McLoughlin <markmc@redhat.com>Mark McLoughlin2007-02-141-1/+1
| | | | | | | | | | | | * src/xend_internal.c, src/xm_internal.c: pass the connection to virDomainParseXMLDesc() * src/xml.[ch]: make virDomainParseXMLDesc accept a virConnectPtr so that we can use it later to lookup the bridge associated with a network * tests/xml2sexprtest.c: just pass NULL here, it's safe
* Added support for generating new style PV framebuffer. Added vnclisten & ↵Daniel P. Berrange2006-12-131-0/+23
| | | | vncpasswd handling
* Added support for non-bridged networkingDaniel P. Berrange2006-11-151-0/+22
|
* * src/xend_internal.c src/xml.c: add an extra element currentMemoryDaniel Veillard2006-11-101-0/+11
| | | | | | | | | | to the XML description and handle its serialization back and forth between XML and S-Expr * tests/sexpr2xmltest.c tests/xml2sexprtest.c tests/sexpr2xmldata/sexpr2xml-curmem.* tests/xml2sexprdata/xml2sexpr-curmem.*: added specific regression tests for this, this didn't disturb any of the other tests. Daniel