mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
qemu: mock swtpm initialization in tests
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. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6f7fc0b54a
commit
6e1baedd2f
@ -176,6 +176,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -189,6 +189,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -176,6 +176,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -192,6 +192,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -202,6 +202,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -192,6 +192,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -193,6 +193,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -205,6 +205,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -193,6 +193,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -196,6 +196,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -208,6 +208,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -196,6 +196,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -196,6 +196,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -209,6 +209,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -196,6 +196,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -202,6 +202,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -211,6 +211,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -202,6 +202,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -210,6 +210,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -218,6 +218,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -210,6 +210,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -212,6 +212,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -219,6 +219,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -171,6 +171,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -169,6 +169,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -135,6 +135,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -212,6 +212,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -213,6 +213,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -219,6 +219,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -213,6 +213,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -213,6 +213,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -219,6 +219,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -171,6 +171,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -169,6 +169,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -135,6 +135,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -213,6 +213,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -214,6 +214,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -220,6 +220,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -172,6 +172,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -170,6 +170,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -214,6 +214,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -215,6 +215,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -220,6 +220,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -215,6 +215,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -215,6 +215,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -221,6 +221,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -174,6 +174,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -172,6 +172,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -133,6 +133,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -215,6 +215,7 @@
|
||||
</enum>
|
||||
<enum name='backendModel'>
|
||||
<value>passthrough</value>
|
||||
<value>emulator</value>
|
||||
</enum>
|
||||
</tpm>
|
||||
</devices>
|
||||
|
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user