swtpm/tests/test_tpm2_setbuffersize
Stefan Berger 978d60fed0 tests: Assign unique ports 65448/65449 to test_tpm2_setbuffersize
Assign unique ports 65448/65449 to test_tpm2_setbuffersize to avoid clash
with test_samples_create_tpmca using TCSD_LISTEN_PORT=65436.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-08-06 17:22:41 -04:00

38 lines
871 B
Bash
Executable File

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