On Tue, Jul 9, 2019 at 9:25 PM Stefan Berger wrote:
>
> Add a test case for the TPM XML encryption parser and formatter.
>
> Signed-off-by: Stefan Berger
Reviewed-by: Marc-André Lureau
> ---
> .../tpm-emulator-tpm2-enc.xml | 34 +
> .../tpm-emulator-tpm2-enc.xml | 38 +++
> tests/qemuxml2xmltest.c | 1 +
> 3 files changed, 73 insertions(+)
> create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
> create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
>
> diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
> b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
> new file mode 100644
> index 00..3838518e65
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
> @@ -0,0 +1,34 @@
> +
> + TPM-VM
> + 11d7cd22-da89-3094-6212-079a48a309a1
> + 2097152
> + 512288
> + 1
> +
> +hvm
> +
> +
> +
> +
> +
> +
> +
> + destroy
> + restart
> + destroy
> +
> +/usr/bin/qemu-system-x86_64
> +
> +
> +
> +
> +
> +
> +
> + uuid='32ee7e76-2178-47a1-ab7b-269e6e348015'/>
> +
> +
> +
> +
> +
> +
> diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
> b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
> new file mode 100644
> index 00..7083fc9c13
> --- /dev/null
> +++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
> @@ -0,0 +1,38 @@
> +
> + TPM-VM
> + 11d7cd22-da89-3094-6212-079a48a309a1
> + 2097152
> + 512288
> + 1
> +
> +hvm
> +
> +
> +
> +
> +
> +
> +
> + destroy
> + restart
> + destroy
> +
> +/usr/bin/qemu-system-x86_64
> +
> + function='0x2'/>
> +
> +
> +
> +
> +
> +
> +
> + uuid='32ee7e76-2178-47a1-ab7b-269e6e348015'/>
> +
> +
> +
> +
> + function='0x0'/>
> +
> +
> +
> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
> index a29958ae29..f6cd56cc8f 100644
> --- a/tests/qemuxml2xmltest.c
> +++ b/tests/qemuxml2xmltest.c
> @@ -654,6 +654,7 @@ mymain(void)
> DO_TEST("tpm-passthrough-crb", NONE);
> DO_TEST("tpm-emulator", NONE);
> DO_TEST("tpm-emulator-tpm2", NONE);
> +DO_TEST("tpm-emulator-tpm2-enc", NONE);
>
> DO_TEST("metadata", NONE);
> DO_TEST("metadata-duplicate", NONE);
> --
> 2.20.1
>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list