blob: 4800d63a0f3ab4c72b0639105a660ff691eaab9b [file] [log] [blame]
Stefan Berger8f0f3812018-09-10 16:48:04 +00001#!/usr/bin/env bash
Stefan Berger30088742016-12-21 17:01:19 -05002
Marc-André Lureauc48dd1e2021-08-07 13:36:42 -04003TESTDIR=${abs_top_testdir:-$(dirname "$0")}
4ROOT=${abs_top_builddir:-$(dirname "$0")/..}
Stefan Bergerfd7a8122023-01-12 13:19:55 -05005source "${TESTDIR}/common"
Marc-André Lureauc48dd1e2021-08-07 13:36:42 -04006skip_test_no_tpm20 "${SWTPM_EXE}"
7
Stefan Berger5b51dc62023-01-13 17:08:01 -05008cd "$(dirname "$0")" || exit 1
Stefan Berger30088742016-12-21 17:01:19 -05009
10export SWTPM_IOCTL_BUFFERSIZE=100
11export SWTPM_INTERFACE=cuse
12bash _test_tpm2_hashing3
13ret=$?
14[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
15
16export SWTPM_IOCTL_BUFFERSIZE=4096
17export SWTPM_INTERFACE=cuse
18bash _test_tpm2_hashing3
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=65518
25export SWTPM_CTRL_PORT=65519
26bash _test_tpm2_hashing3
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=65518
33bash _test_tpm2_hashing3
34ret=$?
35[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
36
37export SWTPM_INTERFACE=unix+unix
38bash _test_tpm2_hashing3
39ret=$?
40[ $ret -ne 0 ] && [ $ret -ne 77 ] && exit $ret
41
42exit 0