diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
new file mode 100644
index 0000000000..d889aae4f6
--- /dev/null
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.xml
@@ -0,0 +1,32 @@
+
+ TPM-VM
+ 11d7cd22-da89-3094-6212-079a48a309a1
+ 2097152
+ 512288
+ 1
+
+ hvm
+
+
+
+
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
new file mode 100644
index 0000000000..8902725097
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.xml
@@ -0,0 +1,36 @@
+
+ TPM-VM
+ 11d7cd22-da89-3094-6212-079a48a309a1
+ 2097152
+ 512288
+ 1
+
+ hvm
+
+
+
+
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index f9e1151906..525eb9a740 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -656,6 +656,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);