
On Fri, Jul 29, 2022 at 09:42:12AM +0200, Michal Privoznik wrote:
In a recent commit of v8.5.0-85-g430ab88ab1 I've made domaincaps XML report supported TPM versions. This was done by calling virTPMSwtpmSetupCapsGet(). But this function isn't mocked and thus domaincapstest calls the real implementation, which tries to execute swtpm_setup binary. This fails, because virFindFileInPath() is mocked in such way that it returns NULL for anything else than qemu-*.
Anyway, while the real binary is not executed after all, we should mock the function which tries to execute it so that predictable result is returned.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/testutilsqemu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization