Commit Graph

18 Commits

Author SHA1 Message Date
Jim Fehlig
1a01e8792c tests: add xlconfigdata to domainschematests
Include the XML files under tests/xlconfigdata in the domain
schema tests
2016-03-18 08:48:48 -06:00
Cole Robinson
e117bf642b tests: qemuargv2xml: separate from qemuxml2argv data
Most of the qemuargv2xml tests are parsing old style qemu command
lines (with -disk, -serial, etc), and it gets its input from
qemuxml2argv output.

But since we've raise the minimum supported qemu version to 0.12.0,
which supports -device, once that changes propagates through libvirt
the vast majority of qemuxml2argv output is _not_ going to be using
old style qemu options.

In preparation for this, switch qemuargv2xml to use its own copies
of input and output, so it's not tied to qemuxml2argv results.

This is just a straight copy of the current tests.
2016-02-05 15:07:07 -05:00
Cole Robinson
af3bd44fd6 tests: add genericxml2xmltest
For testing hypervisor independent XML handling. Right now it's just
populated with an example test case.
2016-01-08 21:21:34 -05:00
Cole Robinson
ace4aecd5e tests: Fix running schematests directly from topdir
Previously it failed like:

$ ./tests/domainschematest
./tests/domainschematest: line 4: ./test-lib.sh: No such file or directory
2016-01-08 21:21:34 -05:00
Roman Bogorodskiy
1281f4a100 schema: bhyve and nmdm updates
* docs/schemas/domaincommon.rng: Add bhyve domain type, nmdm
  serial type and master and slave optional attributes for
  serial that are used by nmdm
* tests/domainschematest: Add bhyvexml2argvdata directory
  to validate bhyve XMLs
2014-07-29 09:52:16 +04:00
Ján Tomko
3f029fb531 LXC: Fix handling of RAM filesystem size units
Since 76b644c when the support for RAM filesystems was introduced,
libvirt accepted the following XML:
<source usage='1024' unit='KiB'/>

This was parsed correctly and internally stored in bytes, but it
was formatted as (with an extra 's'):
<source usage='1024' units='KiB'/>
When read again, this was treated as if the units were missing,
meaning libvirt was unable to parse its own XML correctly.

The usage attribute was documented as being in KiB, but it was not
scaled if the unit was missing. Transient domains still worked,
because this was balanced by an extra 'k' in the mount options.

This patch:
Changes the parser to use 'units' instead of 'unit', as the latter
was never documented (fixing persistent domains) and some programs
(libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.

Removes the extra 'k' from the tmpfs mount options, which is needed
because now we parse our own XML correctly.

Changes the default input unit to KiB to match documentation, fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=1015689
2013-10-09 17:44:45 +02:00
Daniel P. Berrange
72c507317a Add LXC XML files to schema test & fix problems this uncovers
* docs/schemas/domaincommon.rng: Add missing lxc & openvz
  console target types. Allow arch on LXC <os> type element
* tests/domainschematest: Include tests/lxcxml2xmldata/
2012-03-27 15:52:25 +01:00
Cole Robinson
b2a4a383d3 tests: Test qemuxml2xml when expected xml changes
Add tests for auto memballon, implicit IDE, SCSI, virtio channel
controllers, and console/serial back compat.

Additionally, an explicit qemuxml2argvtest for scsi disks is added.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2010-07-28 16:47:56 -04:00
Daniel P. Berrange
e8ac4a79f1 Make test suite output less verbose
Only print out '.' for each test case, full test output can be
re-enabled with VIR_TEST_VERBOSE=1, or VIR_TEST_DEBUG=XXXX

Sample output now looks like

  TEST: statstest
        ........................................ 40
        ...................................      75  OK
  PASS: statstest
  TEST: qparamtest
        ................................         32  OK
  PASS: qparamtest
  TEST:
        ............                             12  OK
2010-01-15 16:28:05 +00:00
Jim Meyering
e6abf3d8f2 fix 7 "make check" test failures in non-srcdir build
* tests/capabilityschematest: Define and use $srcdir.
* tests/domainschematest: Likewise.
* tests/interfaceschematest: Likewise.
* tests/networkschematest: Likewise.
* tests/nodedevschematest: Likewise.
* tests/storagepoolschematest: Likewise.
* tests/storagevolschematest: Likewise.
2010-01-09 08:37:22 +01:00
Matthias Bolte
4f4a1deccb Remove bashisms from schema tests.
Introduced in commit 39a7be470c.

* tests/*schematest: replace 'source' with '.'
* tests/schematestutils.sh: remove 'function' keyword and add '()'
2009-10-17 01:16:25 +02:00
Cole Robinson
39a7be470c tests: Break out duplicate schema verification functionality.
All schema tests have identical functionality, so avoid the duplication.
2009-10-16 10:21:46 -04:00
Daniel P. Berrange
2c22a68ce2 Added complete set of RNG schemas for all XML formats 2009-01-27 15:29:53 +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
Cole Robinson
a588bf5514 Slim down schema test result output 2008-10-06 19:25:29 +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
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