]> git.proxmox.com Git - swtpm.git/blame - tests/test_save_load_state
packaging: track dbgsym package for swtpm-libs and swtpm-tools
[swtpm.git] / tests / test_save_load_state
CommitLineData
8f0f381f 1#!/usr/bin/env bash
198ebab3 2
f1adde9f
SB
3TESTDIR=${abs_top_testdir:-$(dirname "$0")}
4ROOT=${abs_top_builddir:-$(dirname "$0")/..}
5source ${TESTDIR}/common
6skip_test_no_tpm12 "${SWTPM_EXE}"
7
01aa2ed3
SB
8cd "$(dirname "$0")"
9
10export SWTPM_IOCTL_BUFFERSIZE=100
11export SWTPM_INTERFACE=cuse
12bash _test_save_load_state
13ret=$?
14[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
15
16export SWTPM_IOCTL_BUFFERSIZE=4096
17export SWTPM_INTERFACE=cuse
18bash _test_save_load_state
19ret=$?
20[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
21
22export SWTPM_INTERFACE=socket+socket
23export SWTPM_SERVER_NAME=localhost
24export SWTPM_SERVER_PORT=65418
25export SWTPM_CTRL_PORT=65419
26bash _test_save_load_state
27ret=$?
28[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
29
30export SWTPM_INTERFACE=socket+unix
31export SWTPM_SERVER_NAME=localhost
32export SWTPM_SERVER_PORT=65418
33bash _test_save_load_state
34ret=$?
35[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
36
37export SWTPM_INTERFACE=unix+unix
38bash _test_save_load_state
39ret=$?
40[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
198ebab3 41
7bc7b33b
SR
42echo "=== Testing with linear file backend ==="
43
44export SWTPM_INTERFACE=socket+socket
45export SWTPM_SERVER_NAME=localhost
46export SWTPM_SERVER_PORT=65418
47export SWTPM_CTRL_PORT=65419
48export SWTPM_TEST_LINEAR_FILE=1
49bash _test_save_load_state
50ret=$?
51[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
52
198ebab3 53exit 0