[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/46] tests: do not print benchmark output to stdout
From: |
Paolo Bonzini |
Subject: |
[PULL 22/46] tests: do not print benchmark output to stdout |
Date: |
Fri, 4 Sep 2020 07:40:58 -0400 |
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
- [PULL 10/46] configure: include cross sdl2-config in meson cross file, (continued)
- [PULL 10/46] configure: include cross sdl2-config in meson cross file, Paolo Bonzini, 2020/09/04
- [PULL 17/46] meson: convert the unit tests, Paolo Bonzini, 2020/09/04
- [PULL 20/46] meson: convert vhost-user-bridge, Paolo Bonzini, 2020/09/04
- [PULL 15/46] meson: declare keyutils dependency, Paolo Bonzini, 2020/09/04
- [PULL 05/46] mtest2make: split working directory from test command, Paolo Bonzini, 2020/09/04
- [PULL 03/46] tests: handling signal on win32 properly, Paolo Bonzini, 2020/09/04
- [PULL 11/46] ninjatool: use constant names for stamp files, Paolo Bonzini, 2020/09/04
- [PULL 18/46] meson: move keyutils dependency check, Paolo Bonzini, 2020/09/04
- [PULL 19/46] meson: remove old socket_scm_helper rule, Paolo Bonzini, 2020/09/04
- [PULL 21/46] meson: convert atomic*-bench, Paolo Bonzini, 2020/09/04
- [PULL 22/46] tests: do not print benchmark output to stdout,
Paolo Bonzini <=
- [PULL 24/46] tests/migration/stress: remove unused exit_success, Paolo Bonzini, 2020/09/04
- [PULL 23/46] meson: convert the speed tests, Paolo Bonzini, 2020/09/04
- [PULL 25/46] meson: fix migration/stress compilation with glibc>=2.30, Paolo Bonzini, 2020/09/04
- [PULL 26/46] meson: convert migration/initrd-stress, Paolo Bonzini, 2020/09/04
- [PULL 27/46] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/04
- [PULL 28/46] meson: compute config_all_devices directly, Paolo Bonzini, 2020/09/04
- [PULL 29/46] Makefile: remove dead variables and includes, Paolo Bonzini, 2020/09/04
- [PULL 31/46] configure: move disassembler configuration to meson, Paolo Bonzini, 2020/09/04
- [PULL 32/46] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/04
- [PULL 33/46] meson: keep all compiler flags detection together, Paolo Bonzini, 2020/09/04