Add nodedevxml2xml test

Add a test to check node device XML parsing by first parsing
the XML, then re-formatting as XML and finally comparing the
resulting XML to the original XML.
This commit is contained in:
Mark McLoughlin 2009-02-24 14:58:32 +00:00
parent c4c5e9dbbb
commit da61daa2e6
16 changed files with 22 additions and 24 deletions

View File

@ -1,3 +1,14 @@
Tue Feb 24 14:55:28 GMT 2009 Mark McLoughlin <markmc@redhat.com>
* tests/nodedevxml2xmltest.c: Add a test to check node
device XML parsing by first parsing the XML, then
re-formatting as XML and finally comparing the resulting
XML to the original XML.
* tests/nodedevschemadata/*.xml: strip trailing newlines.
* tests/Makefile.am, tests/.*ignore: adminstrivia
Tue Feb 24 14:54:05 GMT 2009 Mark McLoughlin <markmc@redhat.com> Tue Feb 24 14:54:05 GMT 2009 Mark McLoughlin <markmc@redhat.com>
* src/libvirt_private.syms, src/node_device_conf.[ch]: * src/libvirt_private.syms, src/node_device_conf.[ch]:

View File

@ -11,6 +11,7 @@ xmconfigtest
xencapstest xencapstest
qemuxml2xmltest qemuxml2xmltest
qemuxml2argvtest qemuxml2argvtest
nodedevxml2xmltest
nodeinfotest nodeinfotest
statstest statstest
qparamtest qparamtest

1
tests/.gitignore vendored
View File

@ -11,6 +11,7 @@ xmconfigtest
xencapstest xencapstest
qemuxml2xmltest qemuxml2xmltest
qemuxml2argvtest qemuxml2argvtest
nodedevxml2xmltest
nodeinfotest nodeinfotest
statstest statstest
qparamtest qparamtest

View File

@ -64,6 +64,8 @@ if WITH_QEMU
noinst_PROGRAMS += qemuxml2argvtest qemuxml2xmltest noinst_PROGRAMS += qemuxml2argvtest qemuxml2xmltest
endif endif
noinst_PROGRAMS += nodedevxml2xmltest
test_scripts = \ test_scripts = \
capabilityschematest \ capabilityschematest \
networkschematest \ networkschematest \
@ -110,6 +112,8 @@ if WITH_QEMU
TESTS += qemuxml2argvtest qemuxml2xmltest TESTS += qemuxml2argvtest qemuxml2xmltest
endif endif
TESTS += nodedevxml2xmltest
path_add = $$abs_top_builddir/src$(PATH_SEPARATOR)$$abs_top_builddir/qemud path_add = $$abs_top_builddir/src$(PATH_SEPARATOR)$$abs_top_builddir/qemud
# NB, automake < 1.10 does not provide the real # NB, automake < 1.10 does not provide the real
@ -175,6 +179,11 @@ else
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h
endif endif
nodedevxml2xmltest_SOURCES = \
nodedevxml2xmltest.c \
testutils.c testutils.h
nodedevxml2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)
virshtest_SOURCES = \ virshtest_SOURCES = \
virshtest.c \ virshtest.c \
testutils.c testutils.h testutils.c testutils.h

View File

@ -13,5 +13,3 @@
</capability> </capability>
</capability> </capability>
</device> </device>

View File

@ -14,5 +14,3 @@
</firmware> </firmware>
</capability> </capability>
</device> </device>

View File

@ -7,5 +7,3 @@
<capability type='80211'/> <capability type='80211'/>
</capability> </capability>
</device> </device>

View File

@ -7,5 +7,3 @@
<capability type='80203'/> <capability type='80203'/>
</capability> </capability>
</device> </device>

View File

@ -10,5 +10,3 @@
<vendor id='0x1002'>ATI Technologies Inc</vendor> <vendor id='0x1002'>ATI Technologies Inc</vendor>
</capability> </capability>
</device> </device>

View File

@ -5,5 +5,3 @@
<host>0</host> <host>0</host>
</capability> </capability>
</device> </device>

View File

@ -5,5 +5,3 @@
<host>1</host> <host>1</host>
</capability> </capability>
</device> </device>

View File

@ -9,5 +9,3 @@
<type>disk</type> <type>disk</type>
</capability> </capability>
</device> </device>

View File

@ -5,5 +5,3 @@
<host>0</host> <host>0</host>
</capability> </capability>
</device> </device>

View File

@ -10,5 +10,3 @@
<size>100030242816</size> <size>100030242816</size>
</capability> </capability>
</device> </device>

View File

@ -8,5 +8,3 @@
<vendor id='0x1d6b'>Linux Foundation</vendor> <vendor id='0x1d6b'>Linux Foundation</vendor>
</capability> </capability>
</device> </device>

View File

@ -8,5 +8,3 @@
<protocol>0</protocol> <protocol>0</protocol>
</capability> </capability>
</device> </device>