swtpm/tests/test_wrongorder
Stefan Berger 01aa2ed3af tests: Run tests also on socket interfaces
Refactor the tests so that they all run on socket interfaces as well.

Use socket ports in the range of 65400-65499 for TPM 1.2 tests.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-07-11 14:04:40 -04:00

38 lines
823 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
export SWTPM_IOCTL_BUFFERSIZE=100
export SWTPM_INTERFACE=cuse
bash _test_wrongorder
ret=$?
[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
export SWTPM_IOCTL_BUFFERSIZE=4096
export SWTPM_INTERFACE=cuse
bash _test_wrongorder
ret=$?
[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
export SWTPM_INTERFACE=socket+socket
export SWTPM_SERVER_NAME=localhost
export SWTPM_SERVER_PORT=65422
export SWTPM_CTRL_PORT=65423
bash _test_wrongorder
ret=$?
[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
export SWTPM_INTERFACE=socket+unix
export SWTPM_SERVER_NAME=localhost
export SWTPM_SERVER_PORT=65422
bash _test_wrongorder
ret=$?
[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
export SWTPM_INTERFACE=unix+unix
bash _test_wrongorder
ret=$?
[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
exit 0