Commit Graph

196 Commits

Author SHA1 Message Date
Daniel P. Berrange
8a1553e43a Fix windows build & build without QEMU driver 2008-11-18 12:46:13 +00:00
Daniel P. Berrange
89156f1985 Link QEMU, LXC, network and storage drivers directly into libvirtd 2008-11-17 12:18:18 +00:00
Daniel P. Berrange
c9ff52fb8a Move WITH_XXX driver feature flags into config.h instead of direct compiler/linker args 2008-11-04 23:37:23 +00:00
Daniel P. Berrange
6ace5a39c3 Move some API declarations out of internal.h & hash.c into dedicated files 2008-11-04 23:22:06 +00:00
Daniel P. Berrange
78439117bc Add support for -uuid and -domid args to QEMU 2008-11-04 22:15:30 +00:00
Jim Meyering
c8dc7e8ce2 add a test for today's fix
* tests/cpuset: New script.  Test for today's fix.
* tests/Makefile.am (test_scripts): Add cpuset.
2008-11-04 14:55:30 +00:00
Jim Meyering
a6c7f474eb avoid many mingw-specific warnings
* tests/virshtest.c (mymain): Use only one definition of this function.
[WIN32]: Call exit(77) to skip the test.
* tests/nodeinfotest.c: Likewise.
2008-10-28 17:48:01 +00:00
Jim Meyering
57d54689da cvsignore mingw build artifacts: *.exe 2008-10-28 17:47:54 +00:00
Jim Meyering
05589b72c4 use ARRAY_CARDINALITY more
* tests/nodeinfotest.c: Include "util.h".
* src/xen_internal.c: Likewise.
* src/qemu_conf.c (qemudCapsInit): Use ARRAY_CARDINALITY.
* src/storage_backend.c (virStorageBackendForType): Likewise.
* src/storage_backend_fs.c (virStorageBackendProbeFile): Likewise.
* src/xen_internal.c (xenHypervisorMakeCapabilitiesInternal): Likewise.
* src/xend_internal.c (xenDaemonParseSxpr): Likewise.
* tests/nodeinfotest.c (mymain): Likewise.
* tests/qparamtest.c (DO_TEST): Likewise.
2008-10-28 17:43:24 +00:00
Jim Meyering
164fbbd6e6 generate .gitignore files from .cvsignore ones
* Makefile.maint (sync-vcs-ignore-files): New target.
Prompted by a patch from James Morris.
http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
Add all (now-generated) .gitignore files.
* .gitignore: New file.
* build-aux/.gitignore: New file.
* docs/.gitignore: New file.
* docs/devhelp/.gitignore: New file.
* docs/examples/.gitignore: New file.
* docs/examples/python/.gitignore: New file.
* gnulib/lib/.gitignore: New file.
* gnulib/lib/arpa/.gitignore: New file.
* gnulib/lib/netinet/.gitignore: New file.
* gnulib/lib/sys/.gitignore: New file.
* gnulib/tests/.gitignore: New file.
* include/.gitignore: New file.
* include/libvirt/.gitignore: New file.
* po/.gitignore: New file.
* proxy/.gitignore: New file.
* python/.gitignore: New file.
* python/tests/.gitignore: New file.
* qemud/.gitignore: New file.
* src/.gitignore: New file.
* tests/.gitignore: New file.
* tests/confdata/.gitignore: New file.
* tests/sexpr2xmldata/.gitignore: New file.
* tests/virshdata/.gitignore: New file.
* tests/xencapsdata/.gitignore: New file.
* tests/xmconfigdata/.gitignore: New file.
* tests/xml2sexprdata/.gitignore: New file.
2008-10-17 10:03:15 +00:00
Jim Meyering
6ac274673c testError format strings: explicitly include domain and network names
This repairs the "make check" failure of tests/undefine.
* src/test.c (testResumeDomain, testPauseDomain): Likewise.
(testShutdownDomain, testGetDomainInfo, ): Likewise.
(testSetMemory, testSetVcpus, testDomainCreate, testDomainUndefine)
(testDomainGetSchedulerType, testDomainGetSchedulerParams): Likewise.
(testDomainSetSchedulerParams, testNetworkUndefine): Likewise.
(testNetworkStart, testNetworkGetBridgeName): Likewise.
(testDomainCoreDump, testDomainSave): Likewise, and...
Name the file upon failed open or write.
Use strerror(errno) in diagnostics.
* tests/undefine: Adjust expected output.

test.c (testError): Remove now-ignored dom and net parameters.
This is a sytnax-only change: removing the two unused parameters
and updating all callers:
* src/test.c (GET_DOMAIN, GET_NETWORK, testError)
(testBuildCapabilities, testOpenDefault, testOpenFromFile)
(testOpen, testGetHostname, testGetURI, testGetCapabilities)
(testLookupDomainByID, testLookupDomainByUUID)
(testLookupDomainByName, testResumeDomain, testPauseDomain)
(testShutdownDomain, testGetDomainInfo, testDomainSave)
(testDomainRestore, testDomainCoreDump, testGetOSType)
(testSetMemory, testSetVcpus, testListDefinedDomains)
(testNodeGetCellsFreeMemory, testDomainCreate)
(testDomainUndefine, testDomainGetSchedulerType)
(testDomainGetSchedulerParams, testDomainSetSchedulerParams)
(testLookupNetworkByUUID, testLookupNetworkByName)
(testListNetworks, testListDefinedNetworks, testNetworkUndefine)
(testNetworkStart, testNetworkGetBridgeName): Update callers.
2008-10-11 07:24:49 +00:00
Daniel P. Berrange
7e0d3e62e9 Support SDL config with QEMU guests 2008-10-10 16:52:20 +00:00
Daniel P. Berrange
427f7a8b09 Switch domain device objects to array instead of linked list 2008-10-10 16:08:01 +00:00
Cole Robinson
a588bf5514 Slim down schema test result output 2008-10-06 19:25:29 +00:00
Daniel P. Berrange
bf347f5af0 Fix broken test case data files 2008-09-17 15:39:11 +00:00
Cole Robinson
a82bd0784b Fix reading vncdisplay from xend, add several test cases for xen vnc corner case
s.
2008-09-09 13:53:58 +00:00
Daniel P. Berrange
126d3ebeea Fix starting of xen domains without a PVFB console by removing default emulator 2008-09-05 11:52:12 +00:00
Daniel P. Berrange
f193e19536 Fix xen capabilities data creation 2008-09-05 11:35:43 +00:00
Cole Robinson
34b1a03402 Fix disk ordering and add target duplication checking when parsing domain xml. 2008-09-03 14:30:24 +00:00
Daniel P. Berrange
bb16f4a25d Do conditional driver config in Makefile.am, not source files 2008-08-20 20:48:35 +00:00
Mark McLoughlin
7c3ccd6f14 Fri Aug 15 11:00:38 IST 2008 Mark McLoughlin <markmc@redhat.com>
* src/qemu_conf.c: fix serial/telnet to use "server" option
        rather than "listen"

        * tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args:
        fix the test case too
2008-08-15 10:02:33 +00:00
Atsushi SAKAI
43c7f972aa fix compilation for MinGW 2008-08-12 08:25:48 +00:00
Jim Meyering
efb8492b9d tests: append a newline to expected-output files lacking NL-at-EOF
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Adjust the
code that creates "actual" output, so that it too produces a
newline-terminated buffer.
* tests/qemuxml2argvdata/*.args: Append a newline to each, via:
for i in $(find|grep '\.args$'); do echo >> $i;done
2008-08-11 12:29:58 +00:00
Daniel P. Berrange
b3728d7d72 Fix const-correctness of virRUn and virExec 2008-08-08 15:43:38 +00:00
Daniel Veillard
5ba372306a llow to add a disk as an USB device (QEmu/KVM)
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
  src/qemu_driver.c: patch from Guido Günther allowing to add
  disk as USB devices
* docs/libvirt.rng: extend the schemas for the new value
* tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args
  tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
  tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: add a specific
  test to the regression suite
Daniel
2008-08-08 15:03:00 +00:00
Daniel Veillard
d1710d35ea Extend parser and add support for USB devices in QEmu/KVM
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
  src/qemu_driver.c: Patch from Guido Günther allowing to pass
  usb devices to qemu/kvm
* docs/libvirt.rng: add the new functionality to the grammar
* tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml
  tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: adding examples
  to the regression tests
* libvirt.spec.in: fix the licence tag
Daniel
2008-08-08 14:27:05 +00:00
Daniel Veillard
f61ac900b7 * tests/domainschematest: patch from Guido Günther to fix RNG checking
in out of tree builds.
daniel
2008-08-07 17:52:16 +00:00
Chris Lalancette
8c30002862 Recently upstream Xen added support for having xvd devices > 16. For the most
part, this doesn't really concern libvirt, since for things like attach and
detach we just pass it through and let xend worry about whether it is supported
or not.  The one place this breaks down is in the stats collecting code, where
we need to figure out the device number so we can go digging in /sys for the
statistics.

To remedy this, I've re-written xenLinuxDomainDeviceID() to use regular
expressions to figure out the device number from the name.  The major advantage
is that now xenLinuxDomainDeviceID() looks fairly identical to
tools/python/xen/util/blkif.py (in the Xen sources), so that adding additional
devices in the future should be much easier.  It also reduces the size of the
code, and, in my opinion, the code complexity.

With this patch in place, I was able to get block statistics both on older style
devices (/dev/xvda) and on the new, expanded devices (/dev/xvdaa).

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-08-05 16:38:49 +00:00
Daniel P. Berrange
a7600746fb Support for container related domain XML extensions 2008-08-01 13:31:37 +00:00
Daniel P. Berrange
1b554381d1 Added test to validate all domain XML files against schema 2008-08-01 10:53:41 +00:00
Chris Lalancette
654c5714bf The new generic domain re-factor introduced a small regression into the drive
handling code.  In particular, if you had a section of XML like:

    <disk type='file' device='cdrom'>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>

This used to work with older libvirt, but now fails.  This is because we are
actually passing the literal string (null) to the qemu command-line, which qemu
barfs on.  This patch fixes it up by making it blank, which allows qemu to
continue on it's merry way.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-07-29 12:09:21 +00:00
Daniel P. Berrange
cb29913fb1 Switch XM config file driver to use new domain APIs for XML to config conversion 2008-07-25 14:10:49 +00:00
Daniel P. Berrange
225fb3e93c Prepare xm_internal driver for new domain XML apis 2008-07-25 13:39:02 +00:00
Daniel P. Berrange
8c6f5a546b Convert XenD XML->SEXPR conversion to new domain XML APIs 2008-07-25 13:17:27 +00:00
Daniel P. Berrange
31ac8125b8 Convert XenD SEXPR->XML convesion to new domain XML APIs 2008-07-25 10:49:33 +00:00
Daniel P. Berrange
3de646a51d Misc bug fixes 2008-07-25 09:31:24 +00:00
Jim Meyering
2eb8ab2057 better diagnostic when failing to undefine a running domain via ID
* src/virsh.c (cmdUndefine): Tell user to shutdown and then use name or UUID.
* tests/undefine: New test.  Exercise virsh's undefine command.
* tests/Makefile.am (test_scripts): Add undefine.
2008-07-22 16:12:01 +00:00
Daniel P. Berrange
de40fae555 Fix test file 2008-07-11 20:03:58 +00:00
Daniel P. Berrange
6385fe3ede Switch QEMU driver over to generic domain APIs 2008-07-11 19:34:11 +00:00
Daniel P. Berrange
d78c0a6800 Convert test driver to new domain XML apis 2008-07-11 16:41:27 +00:00
Daniel P. Berrange
69582431a0 Fix booting QEMU off CDROM devices with -drive arg 2008-07-11 09:56:23 +00:00
Daniel P. Berrange
c207f75890 Fix use of VIR_TEST_DEBUG var when OOM testing is not enabled & surpress more valgrind warnings 2008-07-09 10:27:17 +00:00
Daniel P. Berrange
08397146eb Remove legacy debug output 2008-07-09 10:18:03 +00:00
Daniel P. Berrange
0fac29a8c6 Fix QEMU test for xen bootloader 2008-07-09 08:46:09 +00:00
Daniel P. Berrange
93118c7efe Update RNG schema for domains 2008-07-08 12:05:13 +00:00
Daniel P. Berrange
d1b5773ec1 Remove bogus return statement in test code 2008-07-07 10:36:30 +00:00
Daniel P. Berrange
0caf27a2b0 ALlow OOM tests to be parallelized 2008-07-07 10:10:29 +00:00
Atsushi SAKAI
fbb5d771a0 Compilation fixes for MinGW 2008-06-26 09:37:51 +00:00
Daniel Veillard
93db3c61c0 * configure.in NEWS libvirt.spec* doc/* po/*: making libvirt-0.4.4
release
* src/xm_internal.c: fix xm driver serialization escapes
* tests/xmconfigtest.c tests/xmconfigdata/test-escape-paths.cfg
  tests/xmconfigdata/test-escape-paths.xml: add test for previous
  problem
Daniel
2008-06-25 08:59:37 +00:00
Jim Meyering
e09fab39a8 virsh fails to read files larger than BUFSIZ bytes
* src/util.c (fread_file_lim): Use VIR_REALLOC_N, not VIR_ALLOC_N.
Bug introduced in 895d0fdf5b.
* tests/Makefile.am (test_scripts): Add read-bufsiz.
* tests/read-bufsiz: New test for the above.
2008-06-19 14:30:52 +00:00