Commit Graph

208 Commits

Author SHA1 Message Date
Daniel Veillard
a3d570c7b9 Adding support for SDL fullscreen option
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
  tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c
  tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args
  tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml:
  slightly modified patch for SDL fullscreen from Itamar Heim
* docs/formatdomain.html docs/formatdomain.html.in docs/libvirt.rng:
  update the schemas and docs about the sdl graphic element attributes
* AUTHORS: add Itamar Heim
Daniel
2008-12-11 11:44:30 +00:00
Jim Meyering
3693a02fff fix just-broken "virsh start" and "virsh pool-start" commands
* src/virsh.c (cmdPoolStart, cmdStart): Change hard-coded
vshCommandOptDomainBy string argument to match just-changed
option name.  Cole Robinson reported that "virsh start" was
broken and provided that part of the fix.
Bug introduced by yesterday's "virsh.c: tweak options to produce
more accurate help".
* tests/start: New file.  Test for the above fix.
* tests/Makefile.am (test_scripts): Add start.
2008-12-09 21:38:04 +00:00
Daniel P. Berrange
2a23198886 Add locking for thread safety to test driver 2008-12-04 20:59:06 +00:00
Guido Günther
1d7d2fae10 Differentiate between active and inactive configs by honoring the
VIR_DOMAIN_XML_INACTIVE flag.
2008-12-04 12:02:59 +00:00
Jim Meyering
fb23f4f4f4 tests: daemon-conf: accommodate numeric-valued config params
This test would hang when failing to perturb the soon-to-be-
added numeric (and non-boolean) valued parameters, max_clients,
max_workers, min_workers.
* tests/daemon-conf: Require that all commented-out settings
in libvirtd.conf have the same form.  Before, two parameters
were not being tested, since a space had snuck between the
leading "#" and the "param = value" parts.
Apply each RHS-value-perturbing transformation
separately, not in series.
Let VERBOSE=yes turn on debugging.
Be more verbose by default, since this is a relatively
long-running test.
* qemud/libvirtd.conf: Normalize the spacing around each setting
that is to be perturbed by tests/daemon-conf.
2008-12-01 15:04:28 +00:00
Daniel P. Berrange
319b83fc28 Fix XM driver handling of disk source paths 2008-11-28 11:23:34 +00:00
Jim Meyering
d5ae2c8882 don't silently skip a test
* tests/Makefile.am (EXTRA_DIST): Distribute domainschemadata/.
* tests/domainschematest: Fail the test if find invocation fails.
2008-11-25 15:34:59 +00:00
Daniel P. Berrange
cfb0dca6ec Fix test suite build when Xen driver is disabled 2008-11-24 19:23:39 +00:00
Jim Meyering
62bcd5d32b tests: new test: virsh-synopsis
* tests/virsh-synopsis: new file
* tests/Makefile.am (test_scripts): Add virsh-synopsis.
* src/virsh.c: Correct help SYNOPSIS for each of seven commands.

When I first ran this script, "make check" failed like this:
  ...
  invalid help SYNOPSIS for net-create:
      create a network from an XML <file>
  invalid help SYNOPSIS for net-define:
      define a network from an XML <file>
  invalid help SYNOPSIS for net-start:
      start <network>
  invalid help SYNOPSIS for pool-create:
      create a pool from an XML <file>
  invalid help SYNOPSIS for pool-define:
      define a pool from an XML <file>
  invalid help SYNOPSIS for pool-start:
      start <pool>
  invalid help SYNOPSIS for vol-create:
      create <file>
  FAIL: virsh-synopsis
2008-11-24 07:13:29 +00:00
Jim Meyering
8275cc5eb0 tests: virsh-all: new script
* tests/virsh-all: New script.
* tests/Makefile.am (test_scripts): Add virsh-all.
2008-11-24 07:12:41 +00:00
Jim Meyering
5b5393f27a Move the expected output data from virshdata/*.txt into virshtest.c.
* tests/virshtest.c: Embed literal, expected output here, rather than
using virshdata/*.txt file names.
Factor out some common constructs.
(testCompareOutputLit): New function.
(testCompareOutput): #ifdef-out, not that it's unused.
* tests/Makefile.am (SUBDIRS): Remove virshdata/ and all files in it.
* docs/testnode.xml: Fix typo in a comment.
* configure.in (AC_OUTPUT): Remove tests/virshdata/Makefile.
2008-11-24 07:11:26 +00:00
Daniel P. Berrange
2c855c1c66 Optional dlopen support for drivers 2008-11-21 12:16:08 +00:00
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