[libvirt] [PATCH v2 2/2] conf: don't crash on a tpm device with no backends
Eric Blake
eblake at redhat.com
Thu May 9 17:22:05 UTC 2013
On 05/09/2013 06:18 AM, Ján Tomko wrote:
> Print an error instead of crashing when a TPM device without
> a backend is specified.
>
> Add a test for tpm device with no backend, which should fail
> with a parse error.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=961252
> ---
> src/conf/domain_conf.c | 6 +++++
> .../qemuxml2argv-tpm-no-backend-invalid.xml | 27 ++++++++++++++++++++++
> tests/qemuxml2argvtest.c | 2 ++
> 3 files changed, 35 insertions(+)
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-tpm-no-backend-invalid.xml
Awesome that we've enhanced the testsuite to check RNG parser rejection
of invalid xml!
>
> DO_TEST("tpm-passthrough", QEMU_CAPS_DEVICE,
> QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS);
> + DO_TEST_PARSE_ERROR("tpm-no-backend-invalid", QEMU_CAPS_DEVICE,
> + QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, QEMU_CAPS_DEVICE_TPM_TIS);
Should we be tweaking things for the other xml files (renaming files
and/or tightening RNG) so that other uses of DO_TEST_PARSE_ERROR can
also stress RNG validation?
tests/qemuxml2argvtest.c: DO_TEST_PARSE_ERROR("boot-dev+order",
tests/qemuxml2argvtest.c: DO_TEST_PARSE_ERROR("usb-ich9-no-companion",
tests/qemuxml2argvtest.c: DO_TEST_PARSE_ERROR("usb-none-other",
tests/qemuxml2argvtest.c: DO_TEST_PARSE_ERROR("usb-none-hub",
tests/qemuxml2argvtest.c: DO_TEST_PARSE_ERROR("usb-none-usbtablet",
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130509/9328663c/attachment-0001.sig>
More information about the libvir-list
mailing list