[PATCH gnupg 0/2] Small fixes for running the tpm2dtests.
The following two patches fix two small issues with the build system
caused by the newly added TPM code and specifically the corresponding
The first one is that the test files are not properly distributed in the
generated tarball, causing `make distcheck` to fail if it is run on a
system where the tests *can* be run (e.g. if a software TPM is
The second is that the tpm2d tests requires tools from the IBM TSS,
which may not be present on the system even if a software TPM is
available (this was the case on my system, where I initially only had
the tools from the Intel TSS). The quick fix proposed here is to detect
the IBM TSS tools and only run the tpm2d tests if they are present. I
guess a better fix would be to adapt the start_sw_tpm.sh script to make
it usable with either the IBM TSS tools or the Intel TSS tools, but I do
not know either TSS well enough to do that (e.g. what is the equivalent
of tssstartup in the Intel TSS?).
Damien Goutte-Gattat (2):
build: Fix distcheck when tpm2dtests are run.
build: Check for the IBM TSS tools to run the tpm2d tests.
diff --git a/tests/tpm2dtests/Makefile.am b/tests/tpm2dtests/Makefile.am
index ced4a1f49..eeae39906 100644
@@ -61,14 +61,15 @@ xcheck: tpm_server_found
@if [ -z "$(TPMSERVER)" -a -z "$(SWTPM)" -a -z "$(FORCE)" ]; then echo "ERROR: No Software TPM has been found, cannot run TPM tests. Set FORCE=1 to force using the physical TPM"; exit 1; fi
* configure.ac (TEST_LIBTSS): Make that conditional depend on the
detection of tssstartup.
While the tpm2d daemon can use either the Intel TSS or the IBM TSS,
the test code (specifically, the start_sw_tpm.sh script) requires
some tools from the IBM TSS (tssstartup and tsspowerup).
If a software TPM is detected at configure time but the IBM TSS
tools are absent (e.g. because only the Intel TSS is available on
the system), `make check` will attempt to run the tpm2d tests and
those will fail when the start_sw_tpm.sh script is launched.
This patch makes running the tpm2d tests dependent not only on
the detection of a software TPM, but also on the detection of
tssstartup (it is probably safe to assume that if tssstartup is
present, then tsspowerup is available as well).
diff --git a/configure.ac b/configure.ac
index 82e3e670c..59374491f 100644
@@ -1638,6 +1638,7 @@ if test "$build_tpm2d" = "yes"; then
+ AC_PATH_PROG(TSSSTARTUP, tssstartup,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
if test "$have_libtss" = no; then
@@ -1646,7 +1647,7 @@ fi
AM_CONDITIONAL(HAVE_LIBTSS, test "$have_libtss" != no)
-AM_CONDITIONAL(TEST_LIBTSS, test -n "$TPMSERVER" -o -n "$SWTPM")
+AM_CONDITIONAL(TEST_LIBTSS, test -n "$TPMSERVER" || test -n "$SWTPM" && test -n "$TSSSTARTUP")