File: test_init

package info (click to toggle)
swtpm 0.10.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,008 kB
  • sloc: ansic: 20,787; sh: 14,667; makefile: 760; python: 173
file content (42 lines) | stat: -rwxr-xr-x 962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash

TESTDIR=${abs_top_testdir:-$(dirname "$0")}
ROOT=${abs_top_builddir:-$(dirname "$0")/..}
source "${TESTDIR}/common"
skip_test_no_tpm12 "${SWTPM_EXE}"

cd "$(dirname "$0")" || exit 1

export SWTPM_IOCTL_BUFFERSIZE=100
export SWTPM_INTERFACE=cuse
bash _test_init
ret=$?
[ $ret -ne 0  ] && [ $ret -ne 77 ] && exit $ret

export SWTPM_IOCTL_BUFFERSIZE=4096
export SWTPM_INTERFACE=cuse
bash _test_init
ret=$?
[ $ret -ne 0  ] && [ $ret -ne 77 ] && exit $ret

export SWTPM_INTERFACE=socket+socket
export SWTPM_SERVER_NAME=localhost
export SWTPM_SERVER_PORT=65408
export SWTPM_CTRL_PORT=65409
bash _test_init
ret=$?
[ $ret -ne 0  ] && [ $ret -ne 77 ] && exit $ret

export SWTPM_INTERFACE=socket+unix
export SWTPM_SERVER_NAME=localhost
export SWTPM_SERVER_PORT=65408
bash _test_init
ret=$?
[ $ret -ne 0  ] && [ $ret -ne 77 ] && exit $ret

export SWTPM_INTERFACE=unix+unix
bash _test_init
ret=$?
[ $ret -ne 0  ] && [ $ret -ne 77 ] && exit $ret

exit 0