mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Tadeusz Struk <tstruk@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-integrity@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] selftests: tpm: add async space test with noneexisting handle
Date: Sun, 16 Jan 2022 22:04:55 +0200	[thread overview]
Message-ID: <YeR6Z9a4Z3Xz79Tp@iki.fi> (raw)
In-Reply-To: <YeQs7Fy5NaK6m6Ar@iki.fi>

On Sun, Jan 16, 2022 at 04:34:20PM +0200, Jarkko Sakkinen wrote:
> On Sat, Jan 15, 2022 at 05:26:27PM -0800, Tadeusz Struk wrote:
> > Add a test for /dev/tpmrm0 in async mode that checks if
> > the code handles invalid handles correctly.
> > 
> > Cc: Jarkko Sakkinen <jarkko@kernel.org>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: <linux-integrity@vger.kernel.org>
> > Cc: <linux-kselftest@vger.kernel.org>
> > Cc: <linux-kernel@vger.kernel.org>
> > 
> > Tested-by: Jarkko Sakkinen<jarkko@kernel.org>
> > Signed-off-by: Tadeusz Struk <tstruk@gmail.com>
> > ---
> > Changed in v2:
> > - Updated commit message
> > Changed in v3:
> > - Fixed typo in the function name
> > ---
> >  tools/testing/selftests/tpm2/tpm2_tests.py | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/tools/testing/selftests/tpm2/tpm2_tests.py b/tools/testing/selftests/tpm2/tpm2_tests.py
> > index 9d764306887b..340ffef97fb6 100644
> > --- a/tools/testing/selftests/tpm2/tpm2_tests.py
> > +++ b/tools/testing/selftests/tpm2/tpm2_tests.py
> > @@ -302,3 +302,19 @@ class AsyncTest(unittest.TestCase):
> >          log.debug("Calling get_cap in a NON_BLOCKING mode")
> >          async_client.get_cap(tpm2.TPM2_CAP_HANDLES, tpm2.HR_LOADED_SESSION)
> >          async_client.close()
> > +
> > +    def test_flush_invalid_context(self):
> > +        log = logging.getLogger(__name__)
> > +        log.debug(sys._getframe().f_code.co_name)
> > +
> > +        async_client = tpm2.Client(tpm2.Client.FLAG_SPACE | tpm2.Client.FLAG_NONBLOCK)
> > +        log.debug("Calling flush_context passing in an invalid handle ")
> > +        handle = 0x80123456
> > +        rc = 0
> > +        try:
> > +            async_client.flush_context(handle)
> > +        except OSError as e:
> > +            rc = e.errno
> > +
> > +        self.assertEqual(rc, 22)
> > +        async_client.close()
> > -- 
> > 2.30.2
> > 
> 
> Thank you.
> 
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> 
> BR, Jarkko



$ b4 am 20220116012627.2031-2-tstruk@gmail.com
Looking up https://lore.kernel.org/r/20220116012627.2031-2-tstruk%40gmail.com
Grabbing thread from lore.kernel.org/all/20220116012627.2031-2-tstruk%40gmail.com/t.mbox.gz
Analyzing 4 messages in the thread
Will use the latest revision: v4
You can pick other revisions using the -vN flag
Checking attestation on all messages, may take a moment...
---
  ✓ [PATCH v4 1/2] tpm: Fix error handling in async work
    ✓ Signed: DKIM/gmail.com
    + Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> (✓ DKIM/kernel.org)
  ERROR: missing [2/2]!
---
Total patches: 1
---
WARNING: Thread incomplete!
 Link: https://lore.kernel.org/r/20220116012627.2031-1-tstruk@gmail.com
 Base: applies clean to current tree
       git am ./v4_20220115_tstruk_tpm_fix_error_handling_in_async_work.mbx

The patch set is broken. It has patches from two different patch sets.

I saved the 2nd patch from my email client.

BR, Jarkko

  reply	other threads:[~2022-01-16 20:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16  1:26 [PATCH v4 1/2] tpm: Fix error handling in async work Tadeusz Struk
2022-01-16  1:26 ` [PATCH v3 2/2] selftests: tpm: add async space test with noneexisting handle Tadeusz Struk
2022-01-16 14:34   ` Jarkko Sakkinen
2022-01-16 20:04     ` Jarkko Sakkinen [this message]
2022-01-16 22:43       ` Tadeusz Struk
2022-01-17  1:44         ` Jarkko Sakkinen
2022-01-17  2:55           ` Tadeusz Struk
2022-01-17  7:02             ` Jarkko Sakkinen
2022-01-16 14:34 ` [PATCH v4 1/2] tpm: Fix error handling in async work Jarkko Sakkinen

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=YeR6Z9a4Z3Xz79Tp@iki.fi \
    --to=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tstruk@gmail.com \
    /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

all inboxes | Powered by JetHome®