[libvirt] [PATCH 00/10] tests: More XML 2 XML tests and cleanups

Cole Robinson crobinso at redhat.com
Mon Oct 12 14:45:05 UTC 2009


In attempting to refactor some storage pool XML parsing, I wanted some unit
tests to ensure I wasn't causing regressions. So, the following series adds
XML 2 XML tests for storage pools (and virtual networks and storage vols).
Also included are several cleanups in tests/, and bug fixes needed to make
the new tests actually pass.

Cole Robinson (10):
  tests: Fix text output for interface XML 2 XML
  tests: Document VIR_TEST_DEBUG environment variable.
  tests: Break out duplicate schema verification functionality.
  storage: Fix generating iscsi 'auth' xml
  schema: Update storage pool schema.
  tests: Add XML 2 XML tests for storage pools.
  network: Fix reading 'forwardDelay' attribute.
  schema: Update network schema.
  tests: Add network XML to XML tests.
  tests: Add storage volume XML 2 XML tests.

 HACKING                                            |   10 ++
 docs/schemas/network.rng                           |   41 ++++++-
 docs/schemas/storagepool.rng                       |   51 ++++++++-
 src/conf/network_conf.c                            |   10 ++-
 src/conf/storage_conf.c                            |    2 +-
 tests/.gitignore                                   |    3 +
 tests/Makefile.am                                  |   33 +++++-
 tests/capabilityschematest                         |   34 +-----
 tests/domainschematest                             |   33 +-----
 tests/interfaceschematest                          |   31 +-----
 tests/interfacexml2xmltest.c                       |    4 +-
 tests/networkschemadata/netboot-network.xml        |   12 --
 tests/networkschematest                            |   33 +-----
 tests/networkxml2xmlin/forward-delay-network.xml   |   13 ++
 tests/networkxml2xmlin/isolated-network.xml        |   10 ++
 tests/networkxml2xmlin/nat-network.xml             |   13 ++
 tests/networkxml2xmlin/netboot-network.xml         |   14 +++
 tests/networkxml2xmlin/routed-network.xml          |   11 ++
 tests/networkxml2xmlout/forward-delay-network.xml  |   13 ++
 tests/networkxml2xmlout/isolated-network.xml       |   10 ++
 tests/networkxml2xmlout/nat-network.xml            |   13 ++
 tests/networkxml2xmlout/netboot-network.xml        |   14 +++
 tests/networkxml2xmlout/routed-network.xml         |   11 ++
 tests/networkxml2xmltest.c                         |   97 +++++++++++++++
 tests/nodedevschematest                            |   31 +-----
 tests/schematestutils.sh                           |   39 ++++++
 tests/statstest.c                                  |    2 +-
 tests/storagepoolschemadata/pool-dir.xml           |   17 ---
 tests/storagepoolschemadata/pool-disk.xml          |   22 ----
 tests/storagepoolschemadata/pool-fs.xml            |   19 ---
 tests/storagepoolschemadata/pool-iscsi.xml         |   10 --
 tests/storagepoolschemadata/pool-logical.xml       |   19 ---
 tests/storagepoolschemadata/pool-netfs.xml         |   20 ---
 tests/storagepoolschematest                        |   33 +-----
 tests/storagepoolxml2xmlin/pool-dir.xml            |   18 +++
 tests/storagepoolxml2xmlin/pool-disk.xml           |   22 ++++
 tests/storagepoolxml2xmlin/pool-fs.xml             |   19 +++
 tests/storagepoolxml2xmlin/pool-iscsi-auth.xml     |   17 +++
 tests/storagepoolxml2xmlin/pool-iscsi.xml          |   16 +++
 tests/storagepoolxml2xmlin/pool-logical-create.xml |   20 +++
 tests/storagepoolxml2xmlin/pool-logical.xml        |   19 +++
 tests/storagepoolxml2xmlin/pool-mpath.xml          |   12 ++
 tests/storagepoolxml2xmlin/pool-netfs.xml          |   20 +++
 tests/storagepoolxml2xmlin/pool-scsi.xml           |   15 +++
 tests/storagepoolxml2xmlout/pool-dir.xml           |   18 +++
 tests/storagepoolxml2xmlout/pool-disk.xml          |   19 +++
 tests/storagepoolxml2xmlout/pool-fs.xml            |   19 +++
 tests/storagepoolxml2xmlout/pool-iscsi-auth.xml    |   20 +++
 tests/storagepoolxml2xmlout/pool-iscsi.xml         |   19 +++
 .../storagepoolxml2xmlout/pool-logical-create.xml  |   22 ++++
 tests/storagepoolxml2xmlout/pool-logical.xml       |   19 +++
 tests/storagepoolxml2xmlout/pool-mpath.xml         |   17 +++
 tests/storagepoolxml2xmlout/pool-netfs.xml         |   20 +++
 tests/storagepoolxml2xmlout/pool-scsi.xml          |   18 +++
 tests/storagepoolxml2xmltest.c                     |  102 ++++++++++++++++
 tests/storagevolschemadata/vol-logical.xml         |   20 ---
 tests/storagevolschemadata/vol-partition.xml       |   21 ----
 tests/storagevolschemadata/vol-qcow2.xml           |   31 -----
 tests/storagevolschematest                         |   33 +-----
 tests/storagevolxml2xmlin/vol-file-backing.xml     |   24 ++++
 tests/storagevolxml2xmlin/vol-file.xml             |   15 +++
 tests/storagevolxml2xmlin/vol-logical-backing.xml  |   29 +++++
 tests/storagevolxml2xmlin/vol-logical.xml          |   20 +++
 tests/storagevolxml2xmlin/vol-partition.xml        |   21 ++++
 tests/storagevolxml2xmlin/vol-qcow2.xml            |   31 +++++
 tests/storagevolxml2xmlout/vol-file-backing.xml    |   27 +++++
 tests/storagevolxml2xmlout/vol-file.xml            |   18 +++
 tests/storagevolxml2xmlout/vol-logical-backing.xml |   26 ++++
 tests/storagevolxml2xmlout/vol-logical.xml         |   17 +++
 tests/storagevolxml2xmlout/vol-partition.xml       |   18 +++
 tests/storagevolxml2xmlout/vol-qcow2.xml           |   31 +++++
 tests/storagevolxml2xmltest.c                      |  123 ++++++++++++++++++++
 72 files changed, 1291 insertions(+), 413 deletions(-)
 delete mode 100644 tests/networkschemadata/netboot-network.xml
 create mode 100644 tests/networkxml2xmlin/forward-delay-network.xml
 create mode 100644 tests/networkxml2xmlin/isolated-network.xml
 create mode 100644 tests/networkxml2xmlin/nat-network.xml
 create mode 100644 tests/networkxml2xmlin/netboot-network.xml
 create mode 100644 tests/networkxml2xmlin/routed-network.xml
 create mode 100644 tests/networkxml2xmlout/forward-delay-network.xml
 create mode 100644 tests/networkxml2xmlout/isolated-network.xml
 create mode 100644 tests/networkxml2xmlout/nat-network.xml
 create mode 100644 tests/networkxml2xmlout/netboot-network.xml
 create mode 100644 tests/networkxml2xmlout/routed-network.xml
 create mode 100644 tests/networkxml2xmltest.c
 create mode 100644 tests/schematestutils.sh
 delete mode 100644 tests/storagepoolschemadata/pool-dir.xml
 delete mode 100644 tests/storagepoolschemadata/pool-disk.xml
 delete mode 100644 tests/storagepoolschemadata/pool-fs.xml
 delete mode 100644 tests/storagepoolschemadata/pool-iscsi.xml
 delete mode 100644 tests/storagepoolschemadata/pool-logical.xml
 delete mode 100644 tests/storagepoolschemadata/pool-netfs.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-dir.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-disk.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-fs.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-iscsi.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-logical-create.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-logical.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-mpath.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-netfs.xml
 create mode 100644 tests/storagepoolxml2xmlin/pool-scsi.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-dir.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-disk.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-fs.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-iscsi-auth.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-iscsi.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-logical-create.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-logical.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-mpath.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-netfs.xml
 create mode 100644 tests/storagepoolxml2xmlout/pool-scsi.xml
 create mode 100644 tests/storagepoolxml2xmltest.c
 delete mode 100644 tests/storagevolschemadata/vol-logical.xml
 delete mode 100644 tests/storagevolschemadata/vol-partition.xml
 delete mode 100644 tests/storagevolschemadata/vol-qcow2.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-file-backing.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-file.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-logical-backing.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-logical.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-partition.xml
 create mode 100644 tests/storagevolxml2xmlin/vol-qcow2.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-file-backing.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-file.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-logical-backing.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-logical.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-partition.xml
 create mode 100644 tests/storagevolxml2xmlout/vol-qcow2.xml
 create mode 100644 tests/storagevolxml2xmltest.c




More information about the libvir-list mailing list