From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Michal Suchanek" <msuchanek@suse.de>, <linux-integrity@vger.kernel.org>
Cc: "Peter Huewe" <peterhuewe@gmx.de>,
"Jason Gunthorpe" <jgg@ziepe.ca>, "Shuah Khan" <shuah@kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 2/2] selftests: tpm2: test_smoke: Run only when TPM2 is avaialable.
Date: Wed, 28 Aug 2024 16:32:31 +0300 [thread overview]
Message-ID: <D3RKZJGWMFY4.3CHBC8OBPQ3SA@kernel.org> (raw)
In-Reply-To: <1794c9c1d60a34ebae28d3a18b408765e955907b.1724842902.git.msuchanek@suse.de>
On Wed Aug 28, 2024 at 2:23 PM EEST, Michal Suchanek wrote:
> Since Linux 5.6 tpm_version_major sysfs file is avaialble which gives
> the TPM version.
>
> Using this file the test can be skipped on systems with TPM 1.2.
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> tools/testing/selftests/tpm2/test_smoke.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
> index 58af963e5b55..e5e3386077d9 100755
> --- a/tools/testing/selftests/tpm2/test_smoke.sh
> +++ b/tools/testing/selftests/tpm2/test_smoke.sh
> @@ -5,5 +5,7 @@
> ksft_skip=4
>
> [ -e /dev/tpm0 ] || exit $ksft_skip
> +read tpm_version < /sys/class/tpm/tpm0/tpm_version_major
> +[ "$tpm_version" == 2 ] || exit $ksft_skip
>
> python3 -m unittest -v tpm2_tests.SmokeTest
Thanks, I tagged and reviewed the patches:
https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
prev parent reply other threads:[~2024-08-28 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 11:23 [PATCH 1/2] MAINTAINERS: Add selftest files to TPM section Michal Suchanek
2024-08-28 11:23 ` [PATCH 2/2] selftests: tpm2: test_smoke: Run only when TPM2 is avaialable Michal Suchanek
2024-08-28 13:32 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D3RKZJGWMFY4.3CHBC8OBPQ3SA@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=msuchanek@suse.de \
--cc=peterhuewe@gmx.de \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).