Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226181/?format=api
{ "id": 2226181, "url": "http://patchwork.ozlabs.org/api/patches/2226181/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422103018.123608-9-armenon@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260422103018.123608-9-armenon@redhat.com>", "list_archive_url": null, "date": "2026-04-22T10:30:16", "name": "[v5,08/10] tests: Use ML-DSA-87 operations to caused large TPM transfers with CRB", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f761cd2fb0f2e9440b9315f4886ce98efacdf92d", "submitter": { "id": 91136, "url": "http://patchwork.ozlabs.org/api/people/91136/?format=api", "name": "Arun Menon", "email": "armenon@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422103018.123608-9-armenon@redhat.com/mbox/", "series": [ { "id": 500964, "url": "http://patchwork.ozlabs.org/api/series/500964/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500964", "date": "2026-04-22T10:30:14", "name": "hw/tpm: CRB chunking capability to handle PQC", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/500964/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226181/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226181/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=It/SdsLe;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=fZsL8P1I;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0wWw1Nxfz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 20:32:12 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFUrh-0006pD-0O; Wed, 22 Apr 2026 06:31:29 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <armenon@redhat.com>)\n id 1wFUre-0006ox-Nz\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 06:31:26 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <armenon@redhat.com>)\n id 1wFUrc-000748-AO\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 06:31:26 -0400", "from mail-pg1-f197.google.com (mail-pg1-f197.google.com\n [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-553-D__6adXPM6CSdjbWf2Damw-1; Wed, 22 Apr 2026 06:31:21 -0400", "by mail-pg1-f197.google.com with SMTP id\n 41be03b00d2f7-c7ada7b25f0so45838a12.2\n for <qemu-devel@nongnu.org>; Wed, 22 Apr 2026 03:31:20 -0700 (PDT)", "from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([49.36.110.202])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c7976f920e1sm12589666a12.2.2026.04.22.03.31.09\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 22 Apr 2026 03:31:13 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776853883;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=oB2qQatP86NDHo/fOW4g+asa3pzyhpj3nK6Gfp6npWc=;\n b=It/SdsLej7xrK7ix/JtRUUStxOaTRICrI0JH1xTIlINgWCE800sEdM/AM9vnrmCLoDtpoW\n boM1OhEIOPIteemSHwxmy1Lx1yWUXTgZyES8G9ouw9sKJp/th/rpe2U3FHFUfFHmTVi23n\n BQKYsDS7YbS5yOzsa4UvuL9IXjEWQyk=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1776853880; x=1777458680; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=oB2qQatP86NDHo/fOW4g+asa3pzyhpj3nK6Gfp6npWc=;\n b=fZsL8P1IgXszNEoEzBGduD1DHwW0tEejqQoLLVjWR+jnC/aU1L2TZh6gL3XE+Rim55\n HckXJfZtxSgvGIRL7NBtXkLvRRlddx8qaG0nuJDXurQPxfDWONYfLoKNkK+IHXtEasfn\n bsTajbbvNmntK1Aw3beVyPlOknfMygogKcwTIITMhA1nlvohwVxhKiNZtekyzpLud9NO\n OaSWZ4FWpkr46R7Mgyid6sU70ouw28GYnSbtKUKobL9HctouyIwh4R5ZLIiuf85NDOVn\n PUNiJtUMs51D4uo4vw90/J7HhxWaDbKOlfOsmHsyb+8OaejqQ9Gg6x/o9saNB9ZYHpci\n a8Ug==" ], "X-MC-Unique": "D__6adXPM6CSdjbWf2Damw-1", "X-Mimecast-MFC-AGG-ID": "D__6adXPM6CSdjbWf2Damw_1776853880", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776853880; x=1777458680;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=oB2qQatP86NDHo/fOW4g+asa3pzyhpj3nK6Gfp6npWc=;\n b=Ivv4uMvb0WQJaq1jaqJGjAKeDVLSN4yPN/PaZraL39avLN9iMqdqfldhRHw+x9z3ss\n V13CcIaqPpE3HZDo62FMqavKBmTOzTqULpQe6mJ3SFAppPfS5R3MRZB9oO3Y81MrrmF/\n 9HQqG/0mczbJRJU+Ksidqi1YxDyyCnI7gtKB6ZV4NgwqaPA+9Vrdz4ppJ2mitH4+v5uO\n 06vnx4XNTbk9ZarVg0AL8prSYRdbavaZ/FWxWw+6jBEuR5hfkYDlAaxcKJjsuwpw7aQZ\n iOWpyqEVmth6BmFdRCc7ive9vGaUu9E/8FXRdc6IgsWjNbnZf9QFV7SttO01FD5O1S7Y\n KlZg==", "X-Gm-Message-State": "AOJu0YxO+6DZ/V73Eit/rR9bUrIs5jYMOInLrK9M7YZ8Ka5PVtJUHYT9\n d1TddTgHeWYyADz1ut5giPjqR6KBEGCd6Sphh2N22+BlzFIgjjHUs+WakqY7eazoJ9ida04/mnB\n 1ZG8+kAa7fEA4z7oe3mBQZKgbGPKBmdKQ96UpY8z2jQ5Q+4dNOHwPW6Q7z+J/P82wZa9Zq9RrV/\n OAazvCSWpgoZ9F2BAt1tek5mIj+DuWiR6dFqzzRiM=", "X-Gm-Gg": "AeBDieswH2HGxDeEE2ryMOpuUO3nR00nCC0CNTJKyu1fUuzTS41GN5gbF4RpUCoxq/O\n Nyq8idvHE0u6Pi/7Fnodh3SjB1xlUTnQCrmK8Uww4j8zYqOoYdPIEHUc6T+TnV1YoKP5kUfokiJ\n rAJKWh4jDOlCxfyXykKWvW2K/IbuVoXmMzEI0zynumw7rRn4oSebGGjXgXZjwS/SG3J1tcSTn7p\n Fm5Q2SlO5OvQfM7e164iYirdeqDtalkwBPV97JgaEZKqEzABLjZWwbzgkyEu6T1JvNEHtG4eQ7W\n UhfXSiYCxqCJwn5L+rejtizFoFf+dJB1MmY2wODMm9/pydh8JaqbqzzSH1oBEbUFQrCX/bqrCL3\n iq85+F2ZeXdGyrTuw/zYTei27UUkrikJcDAFuYsBwdb2sPWR9qhm7FpXsdw4XpKWbvwuz7c/5Ng\n ==", "X-Received": [ "by 2002:a05:6a20:a12b:b0:3a2:d79c:4161 with SMTP id\n adf61e73a8af0-3a2d79c44a2mr13037933637.47.1776853874782;\n Wed, 22 Apr 2026 03:31:14 -0700 (PDT)", "by 2002:a05:6a20:a12b:b0:3a2:d79c:4161 with SMTP id\n adf61e73a8af0-3a2d79c44a2mr13037881637.47.1776853874086;\n Wed, 22 Apr 2026 03:31:14 -0700 (PDT)" ], "From": "Arun Menon <armenon@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Zhao Liu <zhao1.liu@intel.com>,\n Stefan Berger <stefanb@linux.vnet.ibm.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Fabiano Rosas <farosas@suse.de>, Igor Mammedov <imammedo@redhat.com>,\n marcandre.lureau@redhat.com,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n \"Michael S. Tsirkin\" <mst@redhat.com>, Yanan Wang <wangyanan55@huawei.com>,\n Ani Sinha <anisinha@redhat.com>, Arun Menon <armenon@redhat.com>,\n Stefan Berger <stefanb@linux.ibm.com>", "Subject": "[PATCH v5 08/10] tests: Use ML-DSA-87 operations to caused large TPM\n transfers with CRB", "Date": "Wed, 22 Apr 2026 16:00:16 +0530", "Message-ID": "<20260422103018.123608-9-armenon@redhat.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260422103018.123608-1-armenon@redhat.com>", "References": "<20260422103018.123608-1-armenon@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=armenon@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Stefan Berger <stefanb@linux.ibm.com>\n\nTo test large data transfers (receiving and sending) that make use of a CRB\nchunked transfer, create an ML-DSA-87 key and sign some data with it and\nreceive the 4627 bytes signature. After this send the signature back to the\nTPM to have the TPM verify the signature.\n\nSigned-off-by: Stefan Berger <stefanb@linux.ibm.com>\nSigned-off-by: Arun Menon <armenon@redhat.com>\n---\n tests/qtest/tpm-crb-swtpm-test.c | 5 +-\n tests/qtest/tpm-tests.c | 96 ++++++++++++++++++++++++++++++++\n tests/qtest/tpm-tests.h | 4 ++\n tests/qtest/tpm-util.c | 37 ++++++++++++\n tests/qtest/tpm-util.h | 2 +\n 5 files changed, 142 insertions(+), 2 deletions(-)", "diff": "diff --git a/tests/qtest/tpm-crb-swtpm-test.c b/tests/qtest/tpm-crb-swtpm-test.c\nindex 050c7b0c1f..541fd58133 100644\n--- a/tests/qtest/tpm-crb-swtpm-test.c\n+++ b/tests/qtest/tpm-crb-swtpm-test.c\n@@ -37,8 +37,9 @@ static void tpm_crb_chunk_swtpm_test(const void *data)\n {\n const TestState *ts = data;\n \n- tpm_test_swtpm_test(ts->src_tpm_path, tpm_util_crb_chunk_transfer,\n- \"tpm-crb\", NULL);\n+ tpm_test_swtpm_large_tx_test(ts->src_tpm_path,\n+ tpm_util_crb_chunk_transfer,\n+ \"tpm-crb\", NULL);\n }\n \n static void tpm_crb_swtpm_migration_test(const void *data)\ndiff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c\nindex f71d882990..21811f3a2e 100644\n--- a/tests/qtest/tpm-tests.c\n+++ b/tests/qtest/tpm-tests.c\n@@ -13,6 +13,7 @@\n */\n \n #include \"qemu/osdep.h\"\n+#include \"system/tpm_util.h\"\n #include <glib/gstdio.h>\n \n #include \"libqtest-single.h\"\n@@ -130,3 +131,98 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path,\n g_unlink(src_tpm_addr->u.q_unix.path);\n qapi_free_SocketAddress(src_tpm_addr);\n }\n+\n+void tpm_test_swtpm_large_tx_test(const char *src_tpm_path, tx_func *tx,\n+ const char *ifmodel,\n+ const char *machine_options)\n+{\n+ unsigned char signature[2 + 2 + 4627]; /* TPMT_SIGNATURE */\n+ unsigned char response[8192];\n+ unsigned char request[8192];\n+ SocketAddress *addr = NULL;\n+ GError *error = NULL;\n+ char *args = NULL;\n+ GPid swtpm_pid;\n+ QTestState *s;\n+ gboolean succ;\n+\n+ if (tpm_test_swtpm_skip()) {\n+ return;\n+ }\n+\n+ /* Large transfers based on ML-DSA operations required default-v2 profile */\n+ if (!tpm_util_swtpm_has_profile(\"default-v2\", \"ml-dsa\")) {\n+ return;\n+ }\n+\n+ succ = tpm_util_swtpm_start(src_tpm_path, &swtpm_pid, &addr, \"default-v2\",\n+ &error);\n+ g_assert_true(succ);\n+\n+ args = g_strdup_printf(\n+ \"%s \"\n+ \"-chardev socket,id=chr,path=%s \"\n+ \"-tpmdev emulator,id=dev,chardev=chr \"\n+ \"-device %s,tpmdev=dev\",\n+ machine_options ? : \"\", addr->u.q_unix.path, ifmodel);\n+\n+ s = qtest_start(args);\n+ g_free(args);\n+\n+ tpm_util_startup(s, tx);\n+\n+ static const unsigned char tpm_createprimary_mldsa[] =\n+ \"\\x80\\x02\\x00\\x00\\x00\\x38\\x00\\x00\\x01\\x31\\x40\\x00\\x00\\x07\\x00\\x00\"\n+ \"\\x00\\x09\\x40\\x00\\x00\\x09\\x00\\x00\\x00\\x00\\x00\\x00\\x04\\x00\\x00\\x00\"\n+ \"\\x00\\x00\\x0f\\x00\\xa1\\x00\\x0b\\x00\\x04\\x04\\x72\\x00\\x00\\x00\\x03\\x00\"\n+ \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\n+ tx(s, tpm_createprimary_mldsa, sizeof(tpm_createprimary_mldsa),\n+ response, sizeof(response));\n+ g_assert_cmpint(tpm_cmd_get_errcode(response), ==, 0);\n+ g_assert_cmpint(tpm_cmd_get_size(response), ==, 2831);\n+\n+ static const unsigned char tpm_signsequencestart[] =\n+ \"\\x80\\x01\\x00\\x00\\x00\\x12\\x00\\x00\\x01\\xaa\\x80\\x00\\x00\\x00\\x00\\x00\"\n+ \"\\x00\\x00\";\n+ tx(s, tpm_signsequencestart, sizeof(tpm_signsequencestart),\n+ response, sizeof(response));\n+ g_assert_cmpint(tpm_cmd_get_errcode(response), ==, 0);\n+ g_assert_cmpint(tpm_cmd_get_size(response), ==, 14);\n+\n+ /* Complete sequence and get signature */\n+ static const unsigned char tpm_signsequencecomplete[] =\n+ \"\\x80\\x02\\x00\\x00\\x00\\x2a\\x00\\x00\\x01\\xa4\\x80\\x00\\x00\\x01\\x80\\x00\"\n+ \"\\x00\\x00\\x00\\x00\\x00\\x12\\x40\\x00\\x00\\x09\\x00\\x00\\x00\\x00\\x00\\x40\"\n+ \"\\x00\\x00\\x09\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\n+ tx(s, tpm_signsequencecomplete, sizeof(tpm_signsequencecomplete),\n+ response, sizeof(response));\n+ g_assert_cmpint(tpm_cmd_get_errcode(response), ==, 0);\n+ g_assert_cmpint(tpm_cmd_get_size(response), ==, 4655);\n+\n+ /* TPMT_SIGNATURE found at offset 14 */\n+ memcpy(signature, &response[14], sizeof(signature));\n+\n+ static const unsigned char tpm_verifysequencestart[] =\n+ \"\\x80\\x01\\x00\\x00\\x00\\x14\\x00\\x00\\x01\\xa9\\x80\\x00\\x00\\x00\\x00\\x00\"\n+ \"\\x00\\x00\\x00\\x00\";\n+ tx(s, tpm_verifysequencestart, sizeof(tpm_verifysequencestart),\n+ response, sizeof(response));\n+ g_assert_cmpint(tpm_cmd_get_errcode(response), ==, 0);\n+ g_assert_cmpint(tpm_cmd_get_size(response), ==, 14);\n+\n+ /* TPM2_VerifySequenceComplete */\n+ memcpy(request,\n+ \"\\x80\\x02\\x00\\x00\\x12\\x36\\x00\\x00\\x01\\xa3\\x80\\x00\\x00\\x01\\x80\\x00\"\n+ \"\\x00\\x00\\x00\\x00\\x00\\x09\\x40\\x00\\x00\\x09\\x00\\x00\\x00\\x00\\x00\",\n+ 31);\n+ memcpy(&request[31], signature, sizeof(signature));\n+ tx(s, request, 31 + sizeof(signature), response, sizeof(response));\n+ g_assert_cmpint(tpm_cmd_get_errcode(response), ==, 0);\n+ g_assert_cmpint(tpm_cmd_get_size(response), ==, 27);\n+\n+ qtest_end();\n+ tpm_util_swtpm_kill(swtpm_pid);\n+\n+ g_unlink(addr->u.q_unix.path);\n+ qapi_free_SocketAddress(addr);\n+}\ndiff --git a/tests/qtest/tpm-tests.h b/tests/qtest/tpm-tests.h\nindex 07ba60d26e..6993ce40dc 100644\n--- a/tests/qtest/tpm-tests.h\n+++ b/tests/qtest/tpm-tests.h\n@@ -24,4 +24,8 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path,\n const char *ifmodel,\n const char *machine_options);\n \n+void tpm_test_swtpm_large_tx_test(const char *src_tpm_path, tx_func *tx,\n+ const char *ifmodel,\n+ const char *machine_options);\n+\n #endif /* TESTS_TPM_TESTS_H */\ndiff --git a/tests/qtest/tpm-util.c b/tests/qtest/tpm-util.c\nindex cbba5b1c1f..ad4325aade 100644\n--- a/tests/qtest/tpm-util.c\n+++ b/tests/qtest/tpm-util.c\n@@ -211,6 +211,43 @@ bool tpm_util_swtpm_has_tpm2(void)\n return has_tpm2;\n }\n \n+bool tpm_util_swtpm_has_profile(const char *profilename,\n+ const char *content)\n+{\n+ bool has_profile = false;\n+ char *out = NULL;\n+ static const char *argv[] = {\n+ \"swtpm\", \"socket\", \"--tpm2\", \"--print-profiles\", NULL\n+ };\n+\n+ if (!tpm_util_swtpm_has_tpm2()) {\n+ return false;\n+ }\n+\n+ if (!g_spawn_sync(NULL /* working_dir */,\n+ (char **)argv,\n+ NULL /* envp */,\n+ G_SPAWN_SEARCH_PATH,\n+ NULL /* child_setup */,\n+ NULL /* user_data */,\n+ &out,\n+ NULL /* err */,\n+ NULL /* exit_status */,\n+ NULL)) {\n+ return false;\n+ }\n+\n+ if (strstr(out, profilename)) {\n+ has_profile = true;\n+ }\n+ if (has_profile && content && strstr(out, content) == NULL) {\n+ has_profile = false;\n+ }\n+\n+ g_free(out);\n+ return has_profile;\n+}\n+\n gboolean tpm_util_swtpm_start(const char *path, GPid *pid,\n SocketAddress **addr, const char *profilename,\n GError **error)\ndiff --git a/tests/qtest/tpm-util.h b/tests/qtest/tpm-util.h\nindex ca2d7d173f..90790f30db 100644\n--- a/tests/qtest/tpm-util.h\n+++ b/tests/qtest/tpm-util.h\n@@ -39,6 +39,8 @@ void tpm_util_pcrread(QTestState *s, tx_func *tx,\n const unsigned char *exp_resp, size_t exp_resp_size);\n \n bool tpm_util_swtpm_has_tpm2(void);\n+bool tpm_util_swtpm_has_profile(const char *profilename,\n+ const char *content);\n \n gboolean tpm_util_swtpm_start(const char *path, GPid *pid,\n SocketAddress **addr, const char *profilename,\n", "prefixes": [ "v5", "08/10" ] }