Commit Graph

9 Commits

Author SHA1 Message Date
Stefan Berger
930c7ba16e tests: Allow seccomp override w/ SWTPM_TEST_SECCOMP_OPT env var
The Ubuntu (PPA) build system executes the build on an environment that
has problems with seccomp profiles. It does not allow us to run the test
suite with swtpm applying its seccomp profile since it fails with a
'bad system call' error. To work around this we introduce the env. variable
SWTPM_TEST_SECCOMP_OPT that we can set to "--seccomp action=none" to avoid
having swtpm apply it seccomp profile.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-01-15 15:49:51 -05:00
Stefan Berger
b4372fe50f tests: Use python3 rather than python for the test programs
Fedora policy seems to be to use python3 explicitly for the hashbang
rather than python, which could be either python2 or python3. So convert
it to python3. Also adapt configure.ac to require python3 executable.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-09-25 08:35:45 -04:00
Stefan Berger
610cd51e5b tests: Make python test code independent of python 2 or 3
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-07 12:19:47 -04:00
Stefan Berger
2b8a668dbb swtpm: Implement CMD_GETINFO to retrieve TPM specification info
We quetry the swtpm for TPM specification info that goes into the
certificate for the EK.

Update the test cases that now see more capabilties being returned
by the swtpm.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-04-23 10:00:26 -04:00
Stefan Berger
688c8e2400 swtpm: Implemented support for PTM_SET_BUFFERSIZE command
Implement a command for setting and querying the buffer size the
TPM implementation (libtpms) is using. The setting of the
buffersize allows to reduce the size of the buffer to a size
that the interface can support so that these two sizes match
and the TPM will not produce larger responses than what the
interface can support.

Extend swtpm_ioctl with an option to set the buffersize.

Adapt the existing tests to reflect the newly supported command.
Implement a new test for getting/setting of the buffer size.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-11-05 14:53:00 -05:00
Stefan Berger
8d4d320b9c tests: reformat .py code to have pep8 pass without errors
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-09-29 13:55:56 -04:00
Amarnath Valluri
1fb8bb790f Support added to receive data socket over control socket
As objected by QEMU upstream developers to use two different sockets for
starting/using of swtpm, This commit adds support for passing unix domain
socket over control channel.

The summary of the changes include:
 - Defined new control command CMD_SET_DATAFD, using this clients can send data
   socket.
 - set mlp.fd and mlp.flags outside of the mainloop
 - updated the testcases

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
2017-09-29 13:11:01 -04:00
Stefan Berger
dd96bd5417 swtpm: add missing PTM_CAP_GET_CONFIG to returned flags
Add the missing PTM_CAP_GET_CONFIG to the returned flags.

Fix the order of the flags on the way.

Fix the test cases that test for the flags.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-09-27 07:11:32 -04:00
Amarnath Valluri
93edca48a2 swtpm: Added support for passing control channel client fd.
New option '--ctrl clientfd=<fd>' is added to the control socket parameters.
The passed 'fd' is used as control channel client-fd and treated as single
client mode.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
2017-03-31 08:15:51 -04:00