From: Armin Kuster <akuster808@gmail.com>
To: yocto@lists.yoctoproject.org
Subject: [kirkstone][meta-tpm][PATCH 3/3] oeqa: meta-tpm shut swtpm down before and after testing
Date: Wed, 1 Feb 2023 08:26:14 -0500 [thread overview]
Message-ID: <20230201132614.2840970-3-akuster808@gmail.com> (raw)
In-Reply-To: <20230201132614.2840970-1-akuster808@gmail.com>
fixes:
swtpm: Could not open TCP socket: Address already in use
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit b5642c519b90f83ab6ec1507db9b3b36db43c548)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta-tpm/lib/oeqa/runtime/cases/swtpm.py | 2 ++
meta-tpm/lib/oeqa/runtime/cases/tpm2.py | 2 ++
2 files changed, 4 insertions(+)
diff --git a/meta-tpm/lib/oeqa/runtime/cases/swtpm.py b/meta-tpm/lib/oeqa/runtime/cases/swtpm.py
index df47b35..0be5c59 100644
--- a/meta-tpm/lib/oeqa/runtime/cases/swtpm.py
+++ b/meta-tpm/lib/oeqa/runtime/cases/swtpm.py
@@ -8,11 +8,13 @@ from oeqa.core.decorator.data import skipIfNotFeature
class SwTpmTest(OERuntimeTestCase):
@classmethod
def setUpClass(cls):
+ cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
cls.tc.target.run('mkdir /tmp/myvtpm2')
cls.tc.target.run('chown tss:root /tmp/myvtpm2')
@classmethod
def tearDownClass(cls):
+ cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
cls.tc.target.run('rm -fr /tmp/myvtpm2')
@skipIfNotFeature('tpm2','Test tpm2_swtpm_socket requires tpm2 to be in DISTRO_FEATURES')
diff --git a/meta-tpm/lib/oeqa/runtime/cases/tpm2.py b/meta-tpm/lib/oeqa/runtime/cases/tpm2.py
index e64d19d..8e90dc9 100644
--- a/meta-tpm/lib/oeqa/runtime/cases/tpm2.py
+++ b/meta-tpm/lib/oeqa/runtime/cases/tpm2.py
@@ -8,10 +8,12 @@ from oeqa.core.decorator.data import skipIfNotFeature
class Tpm2Test(OERuntimeTestCase):
@classmethod
def setUpClass(cls):
+ cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
cls.tc.target.run('mkdir /tmp/myvtpm2')
@classmethod
def tearDownClass(cls):
+ cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
cls.tc.target.run('rm -fr /tmp/myvtpm2')
def check_endlines(self, results, expected_endlines):
--
2.37.3
next prev parent reply other threads:[~2023-02-01 13:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 13:26 [kirkstone][meta-tpm][PATCH 1/3] oeqa/swtpm: add swtpm runtime Armin Kuster
2023-02-01 13:26 ` [kirkstone][meta-tpm][PATCH 2/3] oeqa/tpm2: fix and cleanup tests Armin Kuster
2023-02-01 13:26 ` Armin Kuster [this message]
2023-02-01 15:19 ` [yocto] [kirkstone][meta-tpm][PATCH 1/3] oeqa/swtpm: add swtpm runtime Mikko Rapeli
2023-02-01 18:28 ` akuster808
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=20230201132614.2840970-3-akuster808@gmail.com \
--to=akuster808@gmail.com \
--cc=yocto@lists.yoctoproject.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