Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223042/?format=api
{ "id": 2223042, "url": "http://patchwork.ozlabs.org/api/patches/2223042/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414082915.112122-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": "<20260414082915.112122-9-armenon@redhat.com>", "list_archive_url": null, "date": "2026-04-14T08:29:13", "name": "[v4,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/20260414082915.112122-9-armenon@redhat.com/mbox/", "series": [ { "id": 499802, "url": "http://patchwork.ozlabs.org/api/series/499802/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499802", "date": "2026-04-14T08:29:05", "name": "hw/tpm: CRB chunking capability to handle PQC", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/499802/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223042/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223042/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=S0GVeBRf;\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=arLMS+y/;\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 4fvyDC4CYvz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 18:31:23 +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 1wCZAo-0000L9-Si; Tue, 14 Apr 2026 04:31:06 -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 1wCZAn-00009x-A6\n for qemu-devel@nongnu.org; Tue, 14 Apr 2026 04:31:05 -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 1wCZAl-00044d-6w\n for qemu-devel@nongnu.org; Tue, 14 Apr 2026 04:31:05 -0400", "from mail-pl1-f200.google.com (mail-pl1-f200.google.com\n [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-364-5Hh7u_oIP-GHt96bglKHOA-1; Tue, 14 Apr 2026 04:31:01 -0400", "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2b24308165dso99849315ad.1\n for <qemu-devel@nongnu.org>; Tue, 14 Apr 2026 01:31:00 -0700 (PDT)", "from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([49.36.110.202])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2d4e0f909sm181493785ad.35.2026.04.14.01.30.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 01:30:58 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776155462;\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=S0GVeBRfKHx7IqVq1hOMLlCCtNfPcj9AkDmhuMRSV3Jzh7obz1kg+y/osNdmXkz9LizxXX\n eTruRlhFx6wNn0bEyhXf0yjp4GMOvxK9tb41C4B5aS1qLnozg8s+Wjinln5RQGVPAlEeD0\n RdVdFXGT4wXvt+dGdn6A8+13MAuNGWw=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1776155460; x=1776760260; 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=arLMS+y/363snBFIknmoLXSPYI8pSJeZTRWx66Id+RVg20CPjPjxo9Wq0Haosp7zAC\n DUKyoH+3zQEPJa0T8ONk7ApU8zDDsXa6x7a4AN2xWLpAfPKC4WVwc2JbVcroGdJDpFV2\n mB6JXI20STkkqgCnTi9rdmBwgiHX6NqL4EoF0egZ7utIXiogS33UEAo9QrnUoSreDV7W\n HEph4vEvjFHxGZAc24+fwzj1ODI0GM1UhPe6IP5bJd/f3Vv8328rFFF2pkYRfPamLQvM\n /ZTPbMdm7N7CGGVaBGBNoGgNtkjd2BHQ6xvyHkWXIKpRwiFSXUIYbWINOzfG6c2zijKW\n Yn5A==" ], "X-MC-Unique": "5Hh7u_oIP-GHt96bglKHOA-1", "X-Mimecast-MFC-AGG-ID": "5Hh7u_oIP-GHt96bglKHOA_1776155460", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776155460; x=1776760260;\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=RVc/03D8qwpw5uR5ruFC9u7EoqVdC0q5WFs6eYOjMDSxrqWr6pwdbl1bL2rGv8CRBh\n tA/vlreEgz9IpLNSPt/zJNF38omzq8T9zmUyq0oGeWqXGMgqC1PI6Rd0I4X6LP8737UJ\n VirCjogcb/UZatrf6VqRvVIQlELL/RboH3bTtqd3+ZsDTiLmcj9ZnusZW8kh+wopFLBI\n oImwacfZ7epJRheWUBiuMlVJsX/6TCJux/q26UPWkghwBVwkMn+VqkurHzWWnV7swrI0\n oyFlgpFO5v7EBECEG/x3pM4UnVbHIECe2vIJN5nTD87lx71PFRIJTlJJUdAxbdVy7V9W\n YlkA==", "X-Gm-Message-State": "AOJu0Yxpf+BP0aBQhVeLYvggJkDlr+H4UZbjgdffa3K2bDmnMOcIg029\n ff/JYsu/PIwrF+HQIjJDwPaKpe6kXK2Q6owuhGz9Sx8zM5QKCG/91Vr+sLpPjC4TIjdhu+SvG7U\n +bF+hZZCMGDKwdPJYWDwH27mq3cfJukz2v4H3FtOmlKqtyG8qgfhNO7md0I2yX5HHRgrmk8VGyQ\n 6E8l1eAagswzaoAAqhwJy1mwPwk2AOGXJBjip+KzU=", "X-Gm-Gg": "AeBDietSyqUCbbHTxxlUMS76+MyY9iyoU1Ms/06tRNrHXx7tR3HazKqaKwVgOLHJfW7\n +F4xjopSy8TL0l5jF66810mxklPYGsEPIsBFptHmE+7NLNz8SK+mC6aM8D9Qm7126826mKyx84k\n PxSiHH1o/HMKS5RiXkBquPLN9PY2WVcQUJpqEjKhl0ew9s+QgHU2CsYWSMlbXNCVgosUiLUCKaO\n Dkbj1q9OhaLoSDi7CNYUsBWW4fEy/pfYrV9oFKpXNJFj8mjdgyc/+wsO1C2ZJefW7YN1NXyWfUi\n 7uUhu+X7h6Nfvjx0i7j3i7fYGvzMuLgyrUdPpfYnD+rGaG4r8wjXhWDnq9sXUnWeGLDW9lRi06w\n 9936F7HZoImfU35ZgrPuwAgBe5Nh8demptYz0T7yks+18gAZsnMfPJPEFuSFjqnE=", "X-Received": [ "by 2002:a17:902:d507:b0:2b4:5cd0:b6c3 with SMTP id\n d9443c01a7336-2b45cd0bb63mr93404655ad.29.1776155459587;\n Tue, 14 Apr 2026 01:30:59 -0700 (PDT)", "by 2002:a17:902:d507:b0:2b4:5cd0:b6c3 with SMTP id\n d9443c01a7336-2b45cd0bb63mr93404135ad.29.1776155459002;\n Tue, 14 Apr 2026 01:30:59 -0700 (PDT)" ], "From": "Arun Menon <armenon@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Yanan Wang <wangyanan55@huawei.com>, Ani Sinha <anisinha@redhat.com>,\n \"Michael S. Tsirkin\" <mst@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud?=\n\t=?utf-8?q?=C3=A9?= <philmd@linaro.org>,\n Stefan Berger <stefanb@linux.vnet.ibm.com>,\n Paolo Bonzini <pbonzini@redhat.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Zhao Liu <zhao1.liu@intel.com>, marcandre.lureau@redhat.com,\n Igor Mammedov <imammedo@redhat.com>, Laurent Vivier <lvivier@redhat.com>,\n Fabiano Rosas <farosas@suse.de>, Arun Menon <armenon@redhat.com>,\n Stefan Berger <stefanb@linux.ibm.com>", "Subject": "[PATCH v4 08/10] tests: Use ML-DSA-87 operations to caused large TPM\n transfers with CRB", "Date": "Tue, 14 Apr 2026 13:59:13 +0530", "Message-ID": "<20260414082915.112122-9-armenon@redhat.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260414082915.112122-1-armenon@redhat.com>", "References": "<20260414082915.112122-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 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": [ "v4", "08/10" ] }