]> git.proxmox.com Git - swtpm.git/blob - tests/test_getcap
tests: Support filenames with spaces in some functions
[swtpm.git] / tests / test_getcap
1 #!/usr/bin/env bash
2
3 TESTDIR=${abs_top_testdir:-$(dirname "$0")}
4 ROOT=${abs_top_builddir:-$(dirname "$0")/..}
5 source ${TESTDIR}/common
6 skip_test_no_tpm12 "${SWTPM_EXE}"
7
8 cd "$(dirname "$0")"
9
10 export SWTPM_IOCTL_BUFFERSIZE=100
11 export SWTPM_INTERFACE=cuse
12 bash _test_getcap
13 ret=$?
14 [ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
15
16 export SWTPM_IOCTL_BUFFERSIZE=4096
17 export SWTPM_INTERFACE=cuse
18 bash _test_getcap
19 ret=$?
20 [ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
21
22 export SWTPM_INTERFACE=socket+socket
23 export SWTPM_SERVER_NAME=localhost
24 export SWTPM_SERVER_PORT=65402
25 export SWTPM_CTRL_PORT=65403
26 bash _test_getcap
27 ret=$?
28 [ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
29
30 export SWTPM_INTERFACE=socket+unix
31 export SWTPM_SERVER_NAME=localhost
32 export SWTPM_SERVER_PORT=65402
33 bash _test_getcap
34 ret=$?
35 [ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
36
37 export SWTPM_INTERFACE=unix+unix
38 bash _test_getcap
39 ret=$?
40 [ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
41
42 exit 0