qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH 21/39] tests: do not print benchmark output to stdout
Date: Wed,  2 Sep 2020 08:58:59 -0400	[thread overview]
Message-ID: <20200902125917.26021-22-pbonzini@redhat.com> (raw)
In-Reply-To: <20200902125917.26021-1-pbonzini@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>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200828110734.1638685-13-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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-09-02 13:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 12:58 [PATCH 00/39] Next round of Meson fixes and cleanups Paolo Bonzini
2020-09-02 12:58 ` [PATCH 01/39] configure: Add system = 'linux' for meson when cross-compiling Paolo Bonzini
2020-09-02 14:47   ` Alex Bennée
2020-09-02 12:58 ` [PATCH 02/39] mtest2make: split environment from test command Paolo Bonzini
2020-09-02 12:58 ` [PATCH 03/39] mtest2make: split working directory " Paolo Bonzini
2020-09-02 12:58 ` [PATCH 04/39] mtest2make: hide output of successful tests Paolo Bonzini
2020-09-02 12:58 ` [PATCH 05/39] mtest2make: unify tests that appear in multiple suites Paolo Bonzini
2020-09-02 12:58 ` [PATCH 06/39] meson: remove b_lundef option Paolo Bonzini
2020-09-02 12:58 ` [PATCH 07/39] configure: do not include absolute paths in -I and -L paths Paolo Bonzini
2020-09-02 12:58 ` [PATCH 08/39] configure: include cross sdl2-config in meson cross file Paolo Bonzini
2020-09-02 12:58 ` [PATCH 09/39] ninjatool: use constant names for stamp files Paolo Bonzini
2020-09-02 12:58 ` [PATCH 10/39] meson: fix libqos linking Paolo Bonzini
2020-09-02 12:58 ` [PATCH 11/39] meson: build qapi tests library Paolo Bonzini
2020-09-02 12:58 ` [PATCH 12/39] meson: declare tasn1 dependency Paolo Bonzini
2020-09-02 12:58 ` [PATCH 13/39] meson: declare keyutils dependency Paolo Bonzini
2020-09-02 12:58 ` [PATCH 14/39] meson: convert qht-bench Paolo Bonzini
2020-09-02 12:58 ` [PATCH 15/39] tests: qga has virtio-serial by default when host has it Paolo Bonzini
2020-09-02 12:58 ` [PATCH 16/39] meson: convert the unit tests Paolo Bonzini
2020-09-02 12:58 ` [PATCH 17/39] meson: move keyutils dependency check Paolo Bonzini
2020-09-02 12:58 ` [PATCH 18/39] meson: remove old socket_scm_helper rule Paolo Bonzini
2020-09-02 12:58 ` [PATCH 19/39] meson: convert vhost-user-bridge Paolo Bonzini
2020-09-02 12:58 ` [PATCH 20/39] meson: convert atomic*-bench Paolo Bonzini
2020-09-02 12:58 ` Paolo Bonzini [this message]
2020-09-02 12:59 ` [PATCH 22/39] meson: convert the speed tests Paolo Bonzini
2020-09-02 12:59 ` [PATCH 23/39] tests/migration/stress: remove unused exit_success Paolo Bonzini
2020-09-02 12:59 ` [PATCH 24/39] meson: fix migration/stress compilation with glibc>=2.30 Paolo Bonzini
2020-09-02 12:59 ` [PATCH 25/39] meson: convert migration/initrd-stress Paolo Bonzini
2020-09-02 12:59 ` [PATCH 26/39] configure: remove dead code for in-tree builds Paolo Bonzini
2020-09-02 12:59 ` [PATCH 27/39] meson: compute config_all_devices directly Paolo Bonzini
2020-09-02 12:59 ` [PATCH 28/39] Makefile: remove dead variables and includes Paolo Bonzini
2020-09-02 12:59 ` [PATCH 29/39] Makefile: inline the relevant parts of rules.mak Paolo Bonzini
2020-09-02 12:59 ` [PATCH 30/39] configure: move disassembler configuration to meson Paolo Bonzini
2020-09-02 12:59 ` [PATCH 31/39] configure: move C++ compiler handling " Paolo Bonzini
2020-09-02 12:59 ` [PATCH 32/39] meson: keep all compiler flags detection together Paolo Bonzini
2020-09-02 12:59 ` [PATCH 33/39] configure: move -ldl test to meson Paolo Bonzini
2020-09-02 12:59 ` [PATCH 34/39] configure: remove unnecessary libm test Paolo Bonzini
2020-09-02 12:59 ` [PATCH 35/39] configure: do not look for install(1) Paolo Bonzini
2020-09-02 12:59 ` [PATCH 36/39] meson: get glib compilation flags from GLIB_CFLAGS Paolo Bonzini
2020-09-02 12:59 ` [PATCH 37/39] configure: do not include dependency flags in QEMU_CFLAGS and LIBS Paolo Bonzini
2020-09-02 12:59 ` [PATCH 38/39] configure: drop dead variables Paolo Bonzini
2020-09-02 12:59 ` [PATCH 39/39] docs: suggest Meson replacements for various configure functions Paolo Bonzini
2020-09-02 13:14 ` [PATCH 00/39] Next round of Meson fixes and cleanups Marc-André Lureau
2020-09-02 13:46   ` Paolo Bonzini

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=20200902125917.26021-22-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=marcandre.lureau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).