On 2018-10-30 22:47, Stefan Berger wrote: > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > If swtpm is not found in $PATH or --tpm2 isn't supported, we display > this in the test log. We cannot mark the test as skipped due to a bug in > certain versions of the gtester environment that interprets a skipped test > as failure. > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> > Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> > --- > tests/tpm-tests.c | 33 +++++++++++++++++++++------------ > tests/tpm-util.c | 8 +------- > tests/tpm-util.h | 2 ++ > 3 files changed, 24 insertions(+), 19 deletions(-) > > diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c > index 10c6592aac..93a5beba01 100644 > --- a/tests/tpm-tests.c > +++ b/tests/tpm-tests.c > @@ -18,6 +18,17 @@ > #include "libqtest.h" > #include "tpm-tests.h" > > +static bool > +tpm_test_swtpm_skip(void) > +{ > + if (!tpm_util_swtpm_has_tpm2()) { > + fprintf(stderr, "swtpm not in PATH or missing --tpm2 support; "); > + return true; > + }
I now get this ugly (4-times duplicated) output each time I run "make check": swtpm not in PATH or missing --tpm2 support; swtpm not in PATH or missing --tpm2 support; swtpm not in PATH or missing --tpm2 support; swtpm not in PATH or missing --tpm2 support; Could you please use g_test_message() here instead like we're doing it in most of the other tests already? Thanks, Thomas