mirror of
https://git.yoctoproject.org/meta-security
synced 2026-07-27 07:27:14 +00:00
oeqa: meta-tpm shut swtpm down before and after testing
fixes: swtpm: Could not open TCP socket: Address already in use Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
@@ -8,11 +8,13 @@ from oeqa.core.decorator.data import skipIfNotFeature
|
|||||||
class SwTpmTest(OERuntimeTestCase):
|
class SwTpmTest(OERuntimeTestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
|
||||||
cls.tc.target.run('mkdir /tmp/myvtpm2')
|
cls.tc.target.run('mkdir /tmp/myvtpm2')
|
||||||
cls.tc.target.run('chown tss:root /tmp/myvtpm2')
|
cls.tc.target.run('chown tss:root /tmp/myvtpm2')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
|
cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
|
||||||
cls.tc.target.run('rm -fr /tmp/myvtpm2')
|
cls.tc.target.run('rm -fr /tmp/myvtpm2')
|
||||||
|
|
||||||
@skipIfNotFeature('tpm2','Test tpm2_swtpm_socket requires tpm2 to be in DISTRO_FEATURES')
|
@skipIfNotFeature('tpm2','Test tpm2_swtpm_socket requires tpm2 to be in DISTRO_FEATURES')
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ from oeqa.core.decorator.data import skipIfNotFeature
|
|||||||
class Tpm2Test(OERuntimeTestCase):
|
class Tpm2Test(OERuntimeTestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
|
||||||
cls.tc.target.run('mkdir /tmp/myvtpm2')
|
cls.tc.target.run('mkdir /tmp/myvtpm2')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
|
cls.tc.target.run('swtpm_ioctl -s --tcp :2322')
|
||||||
cls.tc.target.run('rm -fr /tmp/myvtpm2')
|
cls.tc.target.run('rm -fr /tmp/myvtpm2')
|
||||||
|
|
||||||
def check_endlines(self, results, expected_endlines):
|
def check_endlines(self, results, expected_endlines):
|
||||||
|
|||||||
Reference in New Issue
Block a user