All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf
@ 2018-11-06 15:13 Stefan Berger
  2018-11-06 15:21 ` Thomas Huth
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2018-11-06 15:13 UTC (permalink / raw)
  To: thuth, marcandre.lureau; +Cc: qemu-devel, Stefan Berger, Stefan Berger

Display a message during the test using g_test_message rather
than fprintf.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 tests/tpm-tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c
index 93a5beba01..5f217a2d92 100644
--- a/tests/tpm-tests.c
+++ b/tests/tpm-tests.c
@@ -22,7 +22,7 @@ static bool
 tpm_test_swtpm_skip(void)
 {
     if (!tpm_util_swtpm_has_tpm2()) {
-        fprintf(stderr, "swtpm not in PATH or missing --tpm2 support; ");
+        g_test_message("swtpm not in PATH or missing --tpm2 support; ");
         return true;
     }
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf
  2018-11-06 15:13 [Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf Stefan Berger
@ 2018-11-06 15:21 ` Thomas Huth
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Huth @ 2018-11-06 15:21 UTC (permalink / raw)
  To: Stefan Berger, marcandre.lureau; +Cc: qemu-devel, Stefan Berger

On 2018-11-06 16:13, Stefan Berger wrote:
> Display a message during the test using g_test_message rather
> than fprintf.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
>  tests/tpm-tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c
> index 93a5beba01..5f217a2d92 100644
> --- a/tests/tpm-tests.c
> +++ b/tests/tpm-tests.c
> @@ -22,7 +22,7 @@ static bool
>  tpm_test_swtpm_skip(void)
>  {
>      if (!tpm_util_swtpm_has_tpm2()) {
> -        fprintf(stderr, "swtpm not in PATH or missing --tpm2 support; ");
> +        g_test_message("swtpm not in PATH or missing --tpm2 support; ");
>          return true;
>      }

I think I'd rather remove the semicolon at the end now. Anyway:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-06 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 15:13 [Qemu-devel] [PATCH] tests: tpm: Use g_test_message rather than fprintf Stefan Berger
2018-11-06 15:21 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.