Commit Graph

5 Commits

Author SHA1 Message Date
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
c2ca9afc2c tests: use send1msg() in place of sendmsg() for older twisted versions
Use the send1msg() ot the twisted sendmsg package since sendmsg()
is only supported in more recent versions of twisted.

Following this we also don't need to install a recent version of twisted
via pip on Travis, which runs Ubuntu 14.04.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-09-29 20:03:14 -04:00
Stefan Berger
5c7f8386ce tests: Use python twisted for sendmsg on python 2
Rather than sending two separate messages with the bare python 2
API, use the python twisted package to send the control and data
in one sendmsg() call. This avoids occasional test failures in
the ctrlchannel test case that is currently sending the data and
control part of the message in 2 steps, which can lead to the
recpient not seeing the whole message.

Add python-twisted as a build dependency to the rpm and Debian
builds and the .travis.yml.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-09-29 14:15:26 -04: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