[PATCH] domaincapstest: Drop support for old qemu
From: Michal Privoznik <mprivozn@redhat.com> The aim of domaincapstest is to check domain capabilities XML with respect to qemu capabilities. And we used to have old qemu capabilities where only TPM-1.2 was supported. But as of v12.4.0-rc1~130 QEMU-7.2 or newer is required which means the code that's handling older QEMUs is required no more. Drop it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/domaincapstest.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index ed0210678f..ec2ac8cb36 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -298,15 +298,7 @@ doTestQemuInternal(const char *version, version, typestr, mach, arch, variant, flag); - if (STRPREFIX(version, "3.") || - STRPREFIX(version, "4.") || - STRPREFIX(version, "5.")) { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_1_2, true); - } else if (STRPREFIX(version, "6.")) { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_1_2 TPM_VER_2_0, true); - } else { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_2_0, true); - } + g_setenv(TEST_TPM_ENV_VAR, TPM_VER_2_0, true); rc = virTestRun(name, test_virDomainCapsFormat, &data); -- 2.53.0
On a Wednesday in 2026, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
The aim of domaincapstest is to check domain capabilities XML with respect to qemu capabilities. And we used to have old qemu capabilities where only TPM-1.2 was supported. But as of v12.4.0-rc1~130 QEMU-7.2 or newer is required which means the code that's handling older QEMUs is required no more. Drop it.
The wording is unclear here - does QEMU 7.2 not support TPM 1.2 or do we just not care about testing it anymore?
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/domaincapstest.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index ed0210678f..ec2ac8cb36 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -298,15 +298,7 @@ doTestQemuInternal(const char *version, version, typestr, mach, arch, variant, flag);
- if (STRPREFIX(version, "3.") || - STRPREFIX(version, "4.") || - STRPREFIX(version, "5.")) { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_1_2, true); - } else if (STRPREFIX(version, "6.")) { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_1_2 TPM_VER_2_0, true); - } else { - g_setenv(TEST_TPM_ENV_VAR, TPM_VER_2_0, true); - } + g_setenv(TEST_TPM_ENV_VAR, TPM_VER_2_0, true);
Now only qemuxmlconftest sets TPM_VER_1_2, but from the code it should be only two tests, yet more are failing if I assume this in testutilsqemu.c. Let's remove that some other time. Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
rc = virTestRun(name, test_virDomainCapsFormat, &data);
-- 2.53.0
On Mon, Jun 08, 2026 at 04:08:11PM +0200, Ján Tomko via Devel wrote:
On a Wednesday in 2026, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
The aim of domaincapstest is to check domain capabilities XML with respect to qemu capabilities. And we used to have old qemu capabilities where only TPM-1.2 was supported. But as of v12.4.0-rc1~130 QEMU-7.2 or newer is required which means the code that's handling older QEMUs is required no more. Drop it.
The wording is unclear here - does QEMU 7.2 not support TPM 1.2 or do we just not care about testing it anymore?
AFAIK, QEMU mostly doesn't care about versions. The TPM device is just a simple command/response message passing protocol. QEMU's device impl just marshalls the messages to/from swtpm where the interesting logic lives. swtpm supports both 1.2 and 2.0, and I doubt 1.2 swill go away. At the same time no one should be using 1.2 unless their use case is around compat with obsolete OS versons, as 1.2 offers no meaningful security given it hardcodes sha1 everywhere. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
participants (3)
-
Daniel P. Berrangé -
Ján Tomko -
Michal Privoznik