diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2023-10-04 11:30:33 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2023-10-04 11:30:33 +0200 |
commit | 98dd6f7af6aa3dcce19f20c22e3f825676e6b184 (patch) | |
tree | 6cb4e5b5d11c1967cd3a1f2938639a958bead3b1 /tests | |
parent | agent: Fix agent_update_private_key. (diff) | |
download | gnupg2-98dd6f7af6aa3dcce19f20c22e3f825676e6b184.tar.xz gnupg2-98dd6f7af6aa3dcce19f20c22e3f825676e6b184.zip |
tests:tpm2dtests: Fix tests with SWTPM.
* configure.ac (TEST_LIBTSS): Fix the condition with SWTPM.
* tests/tpm2dtests/start_sw_tpm.sh: Use --daemon and --pid
to run SWTPM.
--
GnuPG-bug-id: 6052
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tpm2dtests/start_sw_tpm.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/tpm2dtests/start_sw_tpm.sh b/tests/tpm2dtests/start_sw_tpm.sh index 36e1a806e..fc86801e2 100755 --- a/tests/tpm2dtests/start_sw_tpm.sh +++ b/tests/tpm2dtests/start_sw_tpm.sh @@ -3,12 +3,15 @@ # remove any prior TPM contents rm -f NVChip h*.bin *.permall if [ -x "${SWTPM}" ]; then - ${SWTPM} socket --tpm2 --server type=tcp,port=2321 \ - --ctrl type=tcp,port=2322 --tpmstate dir=`pwd` & + ${SWTPM} socket --tpm2 --daemon \ + --pid file=swtpm.pid \ + --server type=tcp,port=2321 \ + --ctrl type=tcp,port=2322 --tpmstate dir=`pwd` + pid=$(cat swtpm.pid) else ${TPMSERVER} > /dev/null 2>&1 & + pid=$! fi -pid=$! ## # This powers on the tpm and starts it # then we derive the RSA version of the storage seed and |