All of lore.kernel.org
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH 12/16] tests: do not print benchmark output to stdout
Date: Fri, 28 Aug 2020 15:07:30 +0400	[thread overview]
Message-ID: <20200828110734.1638685-13-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20200828110734.1638685-1-marcandre.lureau@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

As this makes the TAP output invalid. Use g_test_message().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/benchmark-crypto-cipher.c | 8 ++++----
 tests/benchmark-crypto-hash.c   | 2 +-
 tests/benchmark-crypto-hmac.c   | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tests/benchmark-crypto-cipher.c b/tests/benchmark-crypto-cipher.c
index 53032334ec..1936aa4ae0 100644
--- a/tests/benchmark-crypto-cipher.c
+++ b/tests/benchmark-crypto-cipher.c
@@ -70,8 +70,8 @@ static void test_cipher_speed(size_t chunk_size,
     }
     g_test_timer_elapsed();
 
-    g_print("Enc chunk %zu bytes ", chunk_size);
-    g_print("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
+    g_test_message("Enc chunk %zu bytes ", chunk_size);
+    g_test_message("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
 
     g_test_timer_start();
     remain = total;
@@ -85,8 +85,8 @@ static void test_cipher_speed(size_t chunk_size,
     }
     g_test_timer_elapsed();
 
-    g_print("Dec chunk %zu bytes ", chunk_size);
-    g_print("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
+    g_test_message("Dec chunk %zu bytes ", chunk_size);
+    g_test_message("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
 
     qcrypto_cipher_free(cipher);
     g_free(plaintext);
diff --git a/tests/benchmark-crypto-hash.c b/tests/benchmark-crypto-hash.c
index d16837d00a..598111e75a 100644
--- a/tests/benchmark-crypto-hash.c
+++ b/tests/benchmark-crypto-hash.c
@@ -48,7 +48,7 @@ static void test_hash_speed(const void *opaque)
     }
     g_test_timer_elapsed();
 
-    g_print("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
+    g_test_message("%.2f MB/sec ", (double)total / MiB / g_test_timer_last());
 
     g_free(out);
     g_free(in);
diff --git a/tests/benchmark-crypto-hmac.c b/tests/benchmark-crypto-hmac.c
index f1dfa240cb..f9fa22df95 100644
--- a/tests/benchmark-crypto-hmac.c
+++ b/tests/benchmark-crypto-hmac.c
@@ -55,10 +55,10 @@ static void test_hmac_speed(const void *opaque)
     } while (g_test_timer_elapsed() < 5.0);
 
     total /= MiB;
-    g_print("hmac(sha256): ");
-    g_print("Testing chunk_size %zu bytes ", chunk_size);
-    g_print("done: %.2f MB in %.2f secs: ", total, g_test_timer_last());
-    g_print("%.2f MB/sec\n", total / g_test_timer_last());
+    g_test_message("hmac(sha256): ");
+    g_test_message("Testing chunk_size %zu bytes ", chunk_size);
+    g_test_message("done: %.2f MB in %.2f secs: ", total, g_test_timer_last());
+    g_test_message("%.2f MB/sec\n", total / g_test_timer_last());
 
     g_free(out);
     g_free(in);
-- 
2.26.2



  parent reply	other threads:[~2020-08-28 11:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 11:07 [PATCH 00/16] meson: convert unit tests in tests/Makefile.include marcandre.lureau
2020-08-28 11:07 ` [PATCH 01/16] meson: build qapi tests library marcandre.lureau
2020-08-28 11:07 ` [PATCH 02/16] meson: declare tasn1 dependency marcandre.lureau
2020-08-28 11:07 ` [PATCH 03/16] meson: declare keyutils dependency marcandre.lureau
2020-08-28 11:07 ` [PATCH 04/16] meson: convert qht-bench marcandre.lureau
2020-08-28 11:07 ` [PATCH 05/16] tests: qga has virtio-serial by default when host has it marcandre.lureau
2020-08-28 12:54   ` Thomas Huth
2020-08-28 13:47     ` Marc-André Lureau
2020-08-28 11:07 ` [PATCH 06/16] meson: convert the unit tests marcandre.lureau
2020-08-28 11:07 ` [PATCH 07/16] meson: move keyutils dependency check marcandre.lureau
2020-08-28 11:07 ` [PATCH 08/16] meson: remove old socket_scm_helper rule marcandre.lureau
2020-08-28 11:07 ` [PATCH 09/16] meson: convert vhost-user-bridge marcandre.lureau
2020-08-28 11:07 ` [PATCH 10/16] meson: convert atomic*-bench marcandre.lureau
2020-08-28 11:07 ` [PATCH 11/16] tests/Makefile.include: update check-build marcandre.lureau
2020-08-28 11:07 ` marcandre.lureau [this message]
2020-08-31 17:43   ` [PATCH 12/16] tests: do not print benchmark output to stdout Philippe Mathieu-Daudé
2020-08-28 11:07 ` [PATCH 13/16] meson: convert the speed tests marcandre.lureau
2020-08-28 11:07 ` [PATCH 14/16] tests/migration/stress: remove unused exit_success marcandre.lureau
2020-08-28 11:07 ` [PATCH 15/16] meson: fix migration/stress compilation with glib>=2.30 marcandre.lureau
2020-08-28 11:07 ` [PATCH 16/16] meson: convert migration/initrd-stress marcandre.lureau
2020-08-28 12:56 ` [PATCH 00/16] meson: convert unit tests in tests/Makefile.include Thomas Huth
2020-08-28 12:59   ` Marc-André Lureau
2020-08-28 13:25     ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200828110734.1638685-13-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.