Switch to SOCK_STREAM for the CMD_SET_DATAFD socketpair where the one
end is passed to swtpm to test that this type of socket will cause
automatic termination of swtpm when the connection is lost. This is also
the socket type that QEMU uses.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
exit 1
fi
+if wait_process_gone ${PID} 4; then
+ echo "Error: TPM should not be running anymore."
+ exit 1
+fi
+
echo "OK"
exit 0
def test_SetDatafd():
- fd, _fd = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM)
+ fd, _fd = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
sock_path = os.getenv('SOCK_PATH')
cmd_set_data_fd = bytearray([0x00, 0x00, 0x00, 0x10])
expected_res = bytearray([0x00, 0x00, 0x00, 0x00])