[meta-security,3/3] oeqa: shut done swtpm before and after testing

Message ID 20220620033504.994851-3-akuster808@gmail.com
State Accepted, archived
Delegated to: Armin Kuster
Headers show
Series [meta-security,1/3] oeqa/clamav drop depricated --list-mirror test | expand

Commit Message

akuster808 June 20, 2022, 3:35 a.m. UTC
fixes:
swtpm: Could not open TCP socket: Address already in use

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-parsec/lib/oeqa/runtime/cases/parsec.py | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta-parsec/lib/oeqa/runtime/cases/parsec.py b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
index d3d3f2e..11e5572 100644
--- a/meta-parsec/lib/oeqa/runtime/cases/parsec.py
+++ b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
@@ -12,8 +12,13 @@  from oeqa.core.decorator.data import skipIfNotFeature
 class ParsecTest(OERuntimeTestCase):
     @classmethod
     def setUpClass(cls):
+        cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
         cls.toml_file = '/etc/parsec/config.toml'
 
+    @classmethod
+    def tearDownClass(cls):
+        cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
+
     def setUp(self):
         super(ParsecTest, self).setUp()
         if 'systemd' in self.tc.td['DISTRO_FEATURES']: