From patchwork Wed Mar 12 10:32:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omri Sarig X-Patchwork-Id: 58777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C9BAC28B2E for ; Wed, 12 Mar 2025 10:33:48 +0000 (UTC) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by mx.groups.io with SMTP id smtpd.web10.33629.1741775619692727095 for ; Wed, 12 Mar 2025 03:33:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ckIFA+f0; spf=pass (domain: gmail.com, ip: 209.85.208.169, mailfrom: omri.sarig13@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-30761be8fa8so72048531fa.2 for ; Wed, 12 Mar 2025 03:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741775617; x=1742380417; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QC4KiBOiRjsARrYMmoeNsh1SYyyKNTAEJHoulJ9AfbE=; b=ckIFA+f0I5QBE3I8E/eEDIhDwwaxnmTWYtEboatl3R+O9bokiRaSZ5JTdNS3A8Y0wv VCx4AXsAu4Jbqf2ppJAY9UZgiE6dAqc918n6M6YBFWXe5tHSJ5kVJ4LuH79g7/4lLx5j qFd26iZUsKwbVdbaDo7Z+XcHs732VkDkZ94LvGbMOtEooxf3BYRmEuKyzQMvFp4oWZX6 /n9edTb5YM5hc2mhlz9vpB6xdBZTTZ38o9zaf5krS8OjgLxsEsPg81lW+PVOwoeyoqkq PABwJ5k1SRVEMpnhVnIlC6IbuniLLmAHY7ikMtj4YHJKblUZJm66ZyynkmniC80SiyAu +Ftg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741775617; x=1742380417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QC4KiBOiRjsARrYMmoeNsh1SYyyKNTAEJHoulJ9AfbE=; b=v15o9lxIzFXzzeDYyM9hyw2xnD1kjriU2wRUXzt9h29UcHkPG0wmSGnfhNu1E8MwuJ mWcLPFsZxGrh2Fvf3N/yL7e0VcZQ1FM9rPWOSR9Qgs8DIzeDB4RjsFF05HKDkVJhlDVL TyMX5pRHG9aSA+Eskx0RiKN2ySiXZI0RJeiHDXZ+Jmo5/PZr1s07SfyI4LQhSbldyYG7 wpy5NYUhDnD7IrbtjSb7c4RDZsSvK1OAgCB3l9PMYdQnMGI1DHVytUSYBwRgAGNCgoAe dYgWpKOsPs7yEZ1/Huirx8USEdppwgXzm2i9ZevNUbB9KylmNJtYf40iXsaEO3cis3ZE xR0g== X-Gm-Message-State: AOJu0YyfHozeqeEOVtia0z4N6Tlo8E+l66d9QJv09Cf73NXKT1hlpjWV 9MP08X7A9gCKNzJ+CRl/Okw8yuO2iXqwQfiIV0emyHksJf0Z2A+iXl7HeUsf X-Gm-Gg: ASbGncuRKY8dC76lgMzDIbJWnRa1ybVxSDYCOfURGj5mdcDuoCtBU6SBFfcrQX4jZpA C4DMPUEfi9cRJj6RgZ8kEXqPLOf/3oxSFO94VY9osMnt6zhjIX07kkAg2rhw8EbZo41A6pZmpV3 DYGl7ENxd4ZQeoPHH7bO7CDmcKckOy0qe6LuxoU1l4S4yg8zddyn4qzFkx6VAgd5+T7eaxBRxC4 HlwlmyfD/qx/EhtQih9SqYnETd94G5mcv+PVsOI/JNsVPAo4jpzJzy6+3aWHhpVcoKrAfg545wI iwg2QzsE8hgA0a7IzZcwY+H1KctY6/R3NQwqbmldVG2HpK4EUMetSYfMXlEOIGPVdbf0Zdh7RkT Y3lpkYXBDSOh47CB399iZ8wxJlYFvglK4X/UAcw== X-Google-Smtp-Source: AGHT+IF3gOmVkJ5IHEXE9b7VkYLjg2yJjxPc02cBVgyH0XK7xpFFrRkh8FRW/Kl+sZmQw0vzZJFW3g== X-Received: by 2002:a2e:bc16:0:b0:30b:ca48:1089 with SMTP id 38308e7fff4ca-30bf44ed6f9mr73783701fa.2.1741775616965; Wed, 12 Mar 2025 03:33:36 -0700 (PDT) Received: from omsa-HP-EliteBook-840-14-inch-G9-Notebook-PC.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30bfceebd49sm18030821fa.60.2025.03.12.03.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 03:33:35 -0700 (PDT) From: Omri Sarig To: yocto-patches@lists.yoctoproject.org Cc: Omri Sarig Subject: [PATCH v2 1/3] tpm2-pytss: Add python3-asn1crypto runtime dependency Date: Wed, 12 Mar 2025 11:32:39 +0100 Message-ID: <20250312103241.2526274-2-omri.sarig13@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250312103241.2526274-1-omri.sarig13@gmail.com> References: <20250312103241.2526274-1-omri.sarig13@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Mar 2025 10:33:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/1191 The tpm2-pytss module is importing the module asn1crypto in tsskey.py, however, the current bitbake recipe is not including this python package as runtime dependency. This causes the module invocation to fail at the moment. The commit adds this dependency to the bitbake recipe, to make the recipe self contained. Signed-off-by: Omri Sarig --- meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb b/meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb index 57e284b..4ddf287 100644 --- a/meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb +++ b/meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb @@ -18,4 +18,4 @@ DEPENDS = " \ tpm2-tss \ " -RDEPENDS:${PN} = "libtss2" +RDEPENDS:${PN} = "libtss2 python3-asn1crypto" From patchwork Wed Mar 12 10:32:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omri Sarig X-Patchwork-Id: 58776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E069C28B28 for ; Wed, 12 Mar 2025 10:33:48 +0000 (UTC) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by mx.groups.io with SMTP id smtpd.web10.33630.1741775622638480384 for ; Wed, 12 Mar 2025 03:33:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Hcm3q12W; spf=pass (domain: gmail.com, ip: 209.85.208.181, mailfrom: omri.sarig13@gmail.com) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-30bfc8faef9so43559201fa.1 for ; Wed, 12 Mar 2025 03:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741775620; x=1742380420; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zYokqhiuf6XaVjTzpRxsNCGZoDFaBpezR/c+jNdVSWI=; b=Hcm3q12WsWaSUESfXdYCWbFBbF7la9ZQHCa80AUfHCtu/J+joMvaxkodBRpSq/kIsA XmC/mQZfd1QUjoE9SA4/vfgZor3BcvtfBDQQSEieXLyIiq2/f75i/IjGyxdeX6y2IVd9 oWRWc6k2rFn95/LvEElu+0HZl7woYGycF32/276/wL8NVtm9YiU9SABjfV4Eq6z6eMpK 9C7TNZqKx4q/IRR5aPoZsbBrbowwfbs7Sr8k1CT0QcskJJQTx6nSqqNXN6mJnzSQVsKB vExUfuflytM6W3Eibkn3lg743upGpCGLiivu1bMGJhrKy4L/ylFdnQ3cKkzoFRgDJH+d K5eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741775620; x=1742380420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zYokqhiuf6XaVjTzpRxsNCGZoDFaBpezR/c+jNdVSWI=; b=CZVlpHq6+bDhFsDipuOX+l420d1bzbSPZzx2ePJXz31ydH9GnLwCMiVn1+TI0ivFMy GjX+P+ZtWIHvaWulAq9eMTT6PK+aHmmReyvxhTuwC37zWCNLg7MVr1Nj1pjIulJwI0DP Wxq9rbKvs7MI1WVsrCv9RM27B/W3axeG3+neq1Rrudp68ynlevZWzAAqLpICKcTRvPxr lHPzB0VibShGu7wzp7SFuOYhQl1+wan1L60Exe56FIWk3jZJf8dJtoAHoBokyVGQ4X1h sFXkGOA46a97aavfzeaPXOFkVUUPiFpiDaOo0V2Qq65BDgKFP0oMxxDGMrBsVbmnC9+j TyOA== X-Gm-Message-State: AOJu0Yzsup/B5qGydF5zQ8Vwg3FoQtvqGX305QeY5uzIgvpRvIVCaHoU yJb+/o6erdXmZDtRtAzyXvRmFqlYZvB87m817HH+3kE4w2w/Wi2Tj0Nn/jWL X-Gm-Gg: ASbGncvhL60noHfcoU/1HVAsferqs0+6Mzkb653g4RByxFycSnnODw/QHmdMglGd1Cy lxzr5AoZ0DSjTPjXOj3eiSQdEVwujWkSUjERLCyGTP6KJstOi/CUNJaKauxNb9L6l6gHQIUS4P3 pz3dYQ0+EY2Ti/PxbDHrtFkFEQFBskq7S+INmyQfIfeSmGzvcGYBL95L+rFVtyIY8OGasLv56iS cX94c24l41UZxQIyvT8wzr2y5obHTCh9BFrnVcx0ix5O9RDGJuI1y4pJLjdzelDEeReb3qVmJ5N K1XAkyptaI/+aMH2zS2rqPqd68s4MxsWjQFsYZcoN4GZysmrCbkih7BD2mVkUhweLwzo7w3c4X0 y0M0C1iT/Po33lZvMQfZbQfR2g70= X-Google-Smtp-Source: AGHT+IFZvRk+jJqZRowRDQ35fvA2lWeIP9/hvTtgOa4Pbo/GNpwbAbE6Dt34cy1CfsSqnTrLTgiFQA== X-Received: by 2002:a05:651c:221e:b0:30b:f274:d1ea with SMTP id 38308e7fff4ca-30bf44ed47dmr74507631fa.3.1741775620175; Wed, 12 Mar 2025 03:33:40 -0700 (PDT) Received: from omsa-HP-EliteBook-840-14-inch-G9-Notebook-PC.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30bfceebd49sm18030821fa.60.2025.03.12.03.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 03:33:39 -0700 (PDT) From: Omri Sarig To: yocto-patches@lists.yoctoproject.org Cc: Omri Sarig Subject: [PATCH v2 2/3] tpm2-pkcs11: Add tools python runtime dependencies Date: Wed, 12 Mar 2025 11:32:40 +0100 Message-ID: <20250312103241.2526274-3-omri.sarig13@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250312103241.2526274-1-omri.sarig13@gmail.com> References: <20250312103241.2526274-1-omri.sarig13@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Mar 2025 10:33:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/1192 The tpm2-pkcs11-tools python module is importing several modules which are not currently included in it's dependencies. This causes the script invocation to fail. The current commit adds the relevant dependencies, to ensure that the python module is always able to run. The relevant dependencies are: * python3-fcntl: To add the fcntl module, imported in db.py. * python3-sqlite3: To add the sqlite3 module, imported in db.py. * python3-tpm2-pytss: To add the tpm2_pytss module, imported in utils.py. * python3-compression: To add the zipfile module, imported through "importlib.metadata import distribution" in tpm2_ptool. Signed-off-by: Omri Sarig --- meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.1.bb b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.1.bb index a7d8170..331dc4f 100644 --- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.1.bb +++ b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.9.1.bb @@ -44,6 +44,6 @@ FILES:${PN} += "\ INSANE_SKIP:${PN} += "dev-so" RDEPENDS:${PN} = "p11-kit tpm2-tools " -RDEPENDS:${PN}-tools = "python3-pyyaml python3-cryptography python3-pyasn1-modules" +RDEPENDS:${PN}-tools = "python3-pyyaml python3-cryptography python3-pyasn1-modules python3-compression python3-fcntl python3-sqlite3 python3-tpm2-pytss" BBCLASSEXTEND = "native nativesdk" From patchwork Wed Mar 12 10:32:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omri Sarig X-Patchwork-Id: 58778 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AC2CC28B2E for ; Wed, 12 Mar 2025 10:33:58 +0000 (UTC) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mx.groups.io with SMTP id smtpd.web10.33631.1741775626560949948 for ; Wed, 12 Mar 2025 03:33:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QDHlOnNS; spf=pass (domain: gmail.com, ip: 209.85.208.176, mailfrom: omri.sarig13@gmail.com) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-30613802a6bso69743451fa.1 for ; Wed, 12 Mar 2025 03:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741775624; x=1742380424; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1V7Ej+ZwKCrxbObQW0py6PzlhdfDGdlyN4aeXhJlx/o=; b=QDHlOnNSP5DHFKLmmsVkHrqrAWXd+XkXVMGYeWPC26Qmzy6ps7n8ak0MmcUD4aaErU gKKf7259TqqNBgbB6zGX1jks/gC9ABj2zQ16q4XxmRcpPK143IqlSSBj9NJFK+cJVcIn edcRpT0Fo/TR5TLt0QJcpVpUTEXhIZPk0uWvrSpT4OBAEM0wzytnfcqTz9FMtUAr4e2q ri3BNthwgkZJPh5pLg0go3Bf/1kqujSMg5StowagLc0xCyJHiKnr5j1LdJtb42SKhJ9i sWthAQIzbl4Gyt3I51KW1vyrMlztMxy5NyTpkfsEVHjcQUwa4djk/dcG9AQnT5ksuAgf tosg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741775624; x=1742380424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1V7Ej+ZwKCrxbObQW0py6PzlhdfDGdlyN4aeXhJlx/o=; b=eF9LEc0yAjZflzYukUkcjMd6Ibvmq+OvmscuWXXfUEX44J9Ol9t215M8kOXWLXdcym q4I+FczUYcskH8PUPLniz5xgkZYBLTZ/pXbtNLDOl6x/2AwV++FLZLFLWWenflRI3rzO fdl2U9kGssCzSVi9x1oqU96MLgPIRs9LzfQ+jbwC90EQNEar3YFK4GgX7mu26i03wYnb 728t9UUvZjo29VASlRKZpQ3k+SveNbStlAWWJQh3m5B8hdOlyuwwHD+9HF2WnCzOyJRZ dR7nQ+2bmyTzWLu85PzYovLCVxOrsAjn/SGgFAY7AEWaNm+OmhterPM+tPuCz3U8h+V3 i6ew== X-Gm-Message-State: AOJu0YzCrCXrAKT8z1v5tgno9BONXmQc65BtkJLOqrdIi9/evNfpPdKA 8TPjmvfKWYFuy3BP9OfwUIxELcLmMwK3E03iZXAbIi4I+tu5AcQb3w6f7z3S X-Gm-Gg: ASbGncuLcp19ujEvXRD8leYZg8zhRwJeoSfW1RVALCoovLrrpcLWMORaO2AOIJJhFdm K+TLWafgS9QBBra9OPCmbcL0yC+b8FaHzkIbn4Uu7t4CrfzrelVnFpr5pEtTDdsfcr5BaMVzHpr 2D3ZzxTjax0jUCDzDuxk1CvUkqt6e2X3wxCaqmNzfTMEKcGuBBe/4BU/VHoulCm9Zi/BXTrPXo2 ON0jV0ZezzkQy7lbjmOqjnM2A1tbxqlnLAWwErVqFyw7Z7C+ZfY8pBC/XcY2/7Avi4VdrRLu1je i8LSc+jHU4g5twCiGWtB5b5UQSninFcQEogQHwop964TmnfyDK6wD11+fxLteRh6rrwlHNBbZiY 8vBuTyJCZLiH0BfSVF1eEKOv4V3E= X-Google-Smtp-Source: AGHT+IH7/WuWzpNd0Rz7AbavoMsFtoLIlChdPaf8OPDPJ/VFjO6pHFkh7P31f9rE4bNxXnI12dULUQ== X-Received: by 2002:a2e:a403:0:b0:30c:189d:a169 with SMTP id 38308e7fff4ca-30c189da6b0mr34424051fa.25.1741775624166; Wed, 12 Mar 2025 03:33:44 -0700 (PDT) Received: from omsa-HP-EliteBook-840-14-inch-G9-Notebook-PC.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30bfceebd49sm18030821fa.60.2025.03.12.03.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 03:33:42 -0700 (PDT) From: Omri Sarig To: yocto-patches@lists.yoctoproject.org Cc: Omri Sarig Subject: [PATCH v2 3/3] oeqa/cases/tpm2: Add tpm2-pkcs11-tools sanity test Date: Wed, 12 Mar 2025 11:32:41 +0100 Message-ID: <20250312103241.2526274-4-omri.sarig13@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250312103241.2526274-1-omri.sarig13@gmail.com> References: <20250312103241.2526274-1-omri.sarig13@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Mar 2025 10:33:58 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/1193 Add a very simple sanity test, which ensures that tpm2_ptool can run without problems when the relevant package is available. This test case is available here to help prevent future errors, where the tool is unable to run after installation, due to missing dependencies for example. Contrary to other tests in the file, this test does not communicate with the TPM module itself, it only ensures that the tool (tpm2_ptool) can be loaded without any errors. Therefore, we don't need to depend on anything other than having the package installed. Signed-off-by: Omri Sarig --- meta-tpm/lib/oeqa/runtime/cases/tpm2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-tpm/lib/oeqa/runtime/cases/tpm2.py b/meta-tpm/lib/oeqa/runtime/cases/tpm2.py index 8e90dc9..c2e6dfa 100644 --- a/meta-tpm/lib/oeqa/runtime/cases/tpm2.py +++ b/meta-tpm/lib/oeqa/runtime/cases/tpm2.py @@ -67,3 +67,8 @@ class Tpm2Test(OERuntimeTestCase): def test_tpm2_swtpm_reset(self): (status, output) = self.target.run('swtpm_ioctl -i --tcp :2322') self.assertEqual(status, 0, msg="swtpm reset failed: %s" % output) + + @OEHasPackage(['tpm2-pkcs11-tools']) + def test_tpm2_pkcs11_tools(self): + (status, output) = self.target.run("tpm2_ptool --help") + self.assertEqual(status, 0, msg="Module cannot be run with error: %s" % output)