swtpm/tests/test_tpm2_save_load_state
Stefan Berger 950523c996 tests: Assign unique ports 65452/65453 to test_tpm2_save_load_state
Assign the unique port 65452/65354 to test_tpm2_save_load_state to
avoid conflict with test_tpm_probe also using

SWTPM_SERVER_PORT=65526
SWTPM_CTRL_PORT=65527

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-08-06 15:37:10 -04:00

38 lines
881 B
Bash
Executable File

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