The domain capabilities won't report TPM support unless SWTPM can be
initialized. To avoid relying on the swtpm install in the host, mock
the entire initialization method, since all it needs todo is return
a non-error value.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
tests/domaincapsdata/qemu_2.11.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 1 +
tests/domaincapstest.c | 9 +++++++++
51 files changed, 59 insertions(+)
diff --git a/tests/domaincapsdata/qemu_2.11.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_2.11.0-q35.x86_64.xml
index 79d14234fe..ea9737d9ce 100644
--- a/tests/domaincapsdata/qemu_2.11.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.11.0-q35.x86_64.xml
@@ -176,6 +176,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
index fc71f9cc7c..cccc6830f9 100644
--- a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
@@ -189,6 +189,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_2.11.0.x86_64.xml
b/tests/domaincapsdata/qemu_2.11.0.x86_64.xml
index 44d57900e2..3a8aa2ab71 100644
--- a/tests/domaincapsdata/qemu_2.11.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.11.0.x86_64.xml
@@ -176,6 +176,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_2.12.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_2.12.0-q35.x86_64.xml
index e9082540b7..9f41dfaf2b 100644
--- a/tests/domaincapsdata/qemu_2.12.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.12.0-q35.x86_64.xml
@@ -192,6 +192,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
index 1c91661942..d5f9d8ebe3 100644
--- a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
@@ -202,6 +202,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_2.12.0.x86_64.xml
b/tests/domaincapsdata/qemu_2.12.0.x86_64.xml
index 2e5e63308d..dc2c3ec4dd 100644
--- a/tests/domaincapsdata/qemu_2.12.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_2.12.0.x86_64.xml
@@ -192,6 +192,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.0.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_3.0.0-q35.x86_64.xml
index ab63745e97..4f80439eb4 100644
--- a/tests/domaincapsdata/qemu_3.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.0.0-q35.x86_64.xml
@@ -193,6 +193,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
index 119b7020a7..301101095c 100644
--- a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
@@ -205,6 +205,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.0.0.x86_64.xml
b/tests/domaincapsdata/qemu_3.0.0.x86_64.xml
index 087f3608b2..650728566e 100644
--- a/tests/domaincapsdata/qemu_3.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.0.0.x86_64.xml
@@ -193,6 +193,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.1.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_3.1.0-q35.x86_64.xml
index 5c0cf79efd..c4277c53a1 100644
--- a/tests/domaincapsdata/qemu_3.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.1.0-q35.x86_64.xml
@@ -196,6 +196,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
index e51dc28f79..1a5bc25b99 100644
--- a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
@@ -208,6 +208,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_3.1.0.x86_64.xml
b/tests/domaincapsdata/qemu_3.1.0.x86_64.xml
index 5b42add078..6e3ddda356 100644
--- a/tests/domaincapsdata/qemu_3.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_3.1.0.x86_64.xml
@@ -196,6 +196,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.0.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_4.0.0-q35.x86_64.xml
index 5e20814beb..8f3911b4b3 100644
--- a/tests/domaincapsdata/qemu_4.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.0.0-q35.x86_64.xml
@@ -196,6 +196,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
index fa41ed288b..e744ac27ac 100644
--- a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
@@ -209,6 +209,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.0.0.x86_64.xml
b/tests/domaincapsdata/qemu_4.0.0.x86_64.xml
index 14f0062817..24e732d9c3 100644
--- a/tests/domaincapsdata/qemu_4.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.0.0.x86_64.xml
@@ -196,6 +196,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
index f1446f8655..3ee7feea48 100644
--- a/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
@@ -202,6 +202,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
index 77aca157b1..80b1ce8ef9 100644
--- a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
@@ -211,6 +211,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
b/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
index 854d62b89e..0f1d398e2c 100644
--- a/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
@@ -202,6 +202,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
index 739e0c6a13..c8a77cdd41 100644
--- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
@@ -210,6 +210,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
index 30de3cede7..91b3ed6f80 100644
--- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
@@ -218,6 +218,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
index 6b8e895ff6..6578fd04b6 100644
--- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
@@ -210,6 +210,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
index b0eba3550a..8a6797c2f1 100644
--- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
@@ -212,6 +212,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
index fdce0eaaad..b8737613e9 100644
--- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
@@ -219,6 +219,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml
b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml
index f926e025aa..f8cea230d9 100644
--- a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml
@@ -171,6 +171,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml
b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml
index 3c842d3642..ab72b7ffeb 100644
--- a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml
@@ -169,6 +169,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml
b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml
index f85f4e6268..5772045e35 100644
--- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml
@@ -135,6 +135,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
index 4a4893c030..51ca1d98e0 100644
--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
@@ -212,6 +212,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
index 5b4bb4246e..3468fb2e72 100644
--- a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
@@ -213,6 +213,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
index b28f7dd549..034036ca96 100644
--- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
@@ -219,6 +219,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml
b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml
index 1eabdf1a6d..8ff49c7899 100644
--- a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml
@@ -213,6 +213,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
index 794e1d7b22..2301a475eb 100644
--- a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
@@ -213,6 +213,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
index e8ec912cee..d3a4b01234 100644
--- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
@@ -219,6 +219,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
index 14d93448e9..a863a6052d 100644
--- a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
@@ -171,6 +171,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
index 3c842d3642..ab72b7ffeb 100644
--- a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
@@ -169,6 +169,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
index 7691d1d762..051b7d43a8 100644
--- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
@@ -135,6 +135,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
index f6911b06b3..41a54985d7 100644
--- a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
@@ -213,6 +213,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
index d59772cbf6..90acb29775 100644
--- a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
@@ -214,6 +214,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
index 7a0ee26854..768cba5a41 100644
--- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
@@ -220,6 +220,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
index ca66634456..61eab9de0e 100644
--- a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
@@ -172,6 +172,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
index 7c2d0c6120..fa722b5fd3 100644
--- a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
@@ -170,6 +170,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
index 3255765c75..7a95c530f9 100644
--- a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
@@ -214,6 +214,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
index 86fdf9b884..f4d0fcf673 100644
--- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
@@ -215,6 +215,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
index 034273c847..2c761fc1af 100644
--- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
@@ -220,6 +220,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
index 4a943c4f36..67fc449f5d 100644
--- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
@@ -215,6 +215,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
index 52819a9532..9d68c0a404 100644
--- a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
@@ -215,6 +215,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
index 7d14e53255..8db840faac 100644
--- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
@@ -221,6 +221,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
index 665f7e568f..f6045623f5 100644
--- a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
@@ -174,6 +174,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
index e1005392e1..35e18adcd5 100644
--- a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
@@ -172,6 +172,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
index 720d6ad885..8fed9d30b7 100644
--- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
@@ -133,6 +133,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
index beb473cd73..0f89790b60 100644
--- a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
@@ -215,6 +215,7 @@
</enum>
<enum name='backendModel'>
<value>passthrough</value>
+ <value>emulator</value>
</enum>
</tpm>
</devices>
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 4a46acb9ad..479bcb1c35 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -22,6 +22,7 @@
#include "domain_capabilities.h"
#include "virfilewrapper.h"
#include "configmake.h"
+#include "virtpm.h"
#define VIR_FROM_THIS VIR_FROM_NONE
@@ -126,6 +127,14 @@ fillQemuCaps(virDomainCaps *domCaps,
return 0;
}
+
+
+/* Enough to tell capabilities code that swtpm is usable */
+bool virTPMHasSwtpm(void)
+{
+ return true;
+}
+
#endif /* WITH_QEMU */
--
2.33.1