Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220149/?format=api
{ "id": 2220149, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220149/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406141735.25844-9-armenon@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260406141735.25844-9-armenon@redhat.com>", "date": "2026-04-06T14:17:33", "name": "[v3,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/1.1/people/91136/?format=api", "name": "Arun Menon", "email": "armenon@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406141735.25844-9-armenon@redhat.com/mbox/", "series": [ { "id": 498860, "url": "http://patchwork.ozlabs.org/api/1.1/series/498860/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498860", "date": "2026-04-06T14:17:28", "name": "hw/tpm: CRB chunking capability to handle PQC", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/498860/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220149/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220149/checks/", "tags": {}, "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=GnK3uGcX;\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=KhWBD/J0;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.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 4fqBKn5JhFz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 00:19:41 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w9kn3-0004g6-HD; Mon, 06 Apr 2026 10:18:57 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.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 1w9kn1-0004Nq-2m\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:18:55 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.133.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 1w9kmy-00056t-Rj\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:18:54 -0400", "from mail-pl1-f198.google.com (mail-pl1-f198.google.com\n [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-440-RQ9sWMOGOy2UL_fmva4Wcg-1; Mon, 06 Apr 2026 10:18:50 -0400", "by mail-pl1-f198.google.com with SMTP id\n d9443c01a7336-2b2454fc131so71220185ad.3\n for <qemu-devel@nongnu.org>; Mon, 06 Apr 2026 07:18:50 -0700 (PDT)", "from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([152.59.100.84])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b27478cb4fsm156732905ad.29.2026.04.06.07.18.41\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Apr 2026 07:18:48 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775485131;\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=FsZ0r9k1iqZjmeQjH/H2Bi1lOvYyfsSHjj2hxULrQkQ=;\n b=GnK3uGcXkAMtYpuSGiERrodjkL6goOsTVQGqVjY0VPXe/TLmoiT6cfgKIhFFH0TKvwwt9M\n HZxkhHCFUQDkH6R4Xdcsu5NoRyuCkUOcpG7WcXP2mV3auWyRrXnXrvfbPBQs+xztklS7i2\n 5lkG6AgShwGR3Ibf834I458+di/4Cu0=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775485129; x=1776089929; 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=FsZ0r9k1iqZjmeQjH/H2Bi1lOvYyfsSHjj2hxULrQkQ=;\n b=KhWBD/J0Sqis0Ijiag1To/c/2IeSS9RL5RwHfVJpYg786kSA7CJGhICWk5G/4663yG\n S5Yh6BKMwPaU32KKJmzL1U2RHSx4Yd3go4L7ixG3FaIvld7BaaE+39+ZDb20TmiZKP0F\n yZewzVdIrG8EUOCv18orefl7AtkmAkyxes7aeUtJ/0RMM7x1OHVLK+KYLpBNvywXKrr9\n bEI8fYijD6OgE9Zw5OjoINRlQ+1pkhyVjHogshm7raxJlIs15c5hLNMhz5BGMcaenpKq\n 8Bd7ocUHjB+ig/hA+M1wezLd98VVYoYu45JwB/CJE2Ig24Q0bNY+zmWp96eVjB24ndcJ\n ibQA==" ], "X-MC-Unique": "RQ9sWMOGOy2UL_fmva4Wcg-1", "X-Mimecast-MFC-AGG-ID": "RQ9sWMOGOy2UL_fmva4Wcg_1775485129", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775485129; x=1776089929;\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=FsZ0r9k1iqZjmeQjH/H2Bi1lOvYyfsSHjj2hxULrQkQ=;\n b=XNJ4+ggrgnejHcR2XLIwAlEYRf4lvHtq9d78tH8tzKkmQV3gupgjQOMYWxgeZAii4X\n BbKfeDeAo+pEunNeX9QuRtsx96d7fnXSiBlccI5pKYo5JIn6XxziXimN2+izTBaL6DYw\n Dz1M7OEUhbRjQlebbuU+lb+b55lu+p/ReClVNPNBwnRRFaXvlTmRj90pHQKBWmMrMLGs\n XZS6sqhKhrAdTz3OkTaaB53JUIHuOUHSbKeFI0YU6vcS+tlVXXrA1zNKPuj/0m3QhPXV\n mT2AdJ2ja+NNA6gulco9p0Lfi7bFc41+x9oNCP8dGpNXUk9GBSPzw1OAa5KUei/eo6t2\n /Sfg==", "X-Gm-Message-State": "AOJu0YwvdUJJpTOFKu1JFSAwlLvHCx8Pfkh349PQ6UUD8LbDlDr24VpQ\n vORIu/LXaO3lv8xQMzMNogODMeDziEGFNPx/+k9G52CKV3JVkCXnBeTqFkcA8HOiWkayyqdrswo\n gh0Z/ibDbfyJHlhT/ix/M/J6oNiyunxdHllw7VQB/0gnLDW38hWjyLw1Z764dzQzvKD7rfT2x4t\n iQiEbg7UUxXEOZ0jsB4qy7WJzw5XRScmlfPLRAjiM=", "X-Gm-Gg": "AeBDiev6J0kS+XZqxRzjMki6bnhaLPT9dRwbT1/2/uy6ZfDW5d2MmMQFgz/rrtbmLc8\n EgI4PhwJNiYXSJHPHV0GaJ5xDNroAggNBRNz7FVZubljWbYf570GE990WqkIv3ZgUTKP/x2xI+B\n Jk+8g5u5PdmpUxNW705d6oWBjooJMrkfKL/YjepBwdsS480VQf+QN9D3eG/Axq9YzjuZZXK3xyv\n CsLGvVwPwPdZ+DZsqPP6bFS03iEzCRNZYNH6NEzDmWEfwbMcPhFzhfN131zNX+U3+ze2ZIMjhSr\n On1P8stsR3vhUWBBvdtiRbyBtXOU44uc2TLjV7l5hiQkd6+2t5Vfb98maSaUHqFb6200Ktv5ihI\n oDxKOozslS4r+bMA6CKAJdP/PMM7+dyYhw2nBLCpjr2NXbYNTsjwajzilJJaJuZBgoro=", "X-Received": [ "by 2002:a17:903:1248:b0:2b2:5857:601c with SMTP id\n d9443c01a7336-2b281888579mr136946185ad.18.1775485129215;\n Mon, 06 Apr 2026 07:18:49 -0700 (PDT)", "by 2002:a17:903:1248:b0:2b2:5857:601c with SMTP id\n d9443c01a7336-2b281888579mr136945655ad.18.1775485128537;\n Mon, 06 Apr 2026 07:18:48 -0700 (PDT)" ], "From": "Arun Menon <armenon@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Ani Sinha <anisinha@redhat.com>, Laurent Vivier <lvivier@redhat.com>,\n Zhao Liu <zhao1.liu@intel.com>, Stefan Berger <stefanb@linux.vnet.ibm.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Paolo Bonzini <pbonzini@redhat.com>, Fabiano Rosas <farosas@suse.de>,\n marcandre.lureau@redhat.com, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Yanan Wang <wangyanan55@huawei.com>, Igor Mammedov <imammedo@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Arun Menon <armenon@redhat.com>, Stefan Berger <stefanb@linux.ibm.com>", "Subject": "[PATCH v3 08/10] tests: Use ML-DSA-87 operations to caused large TPM\n transfers with CRB", "Date": "Mon, 6 Apr 2026 19:47:33 +0530", "Message-ID": "<20260406141735.25844-9-armenon@redhat.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260406141735.25844-1-armenon@redhat.com>", "References": "<20260406141735.25844-1-armenon@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.133.124; envelope-from=armenon@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-25", "X-Spam_score": "-2.6", "X-Spam_bar": "--", "X-Spam_report": "(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\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_H2=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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 us 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 24243065c1..6163f5a533 100644\n--- a/tests/qtest/tpm-util.c\n+++ b/tests/qtest/tpm-util.c\n@@ -209,6 +209,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": [ "v3", "08/10" ] }