* [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message
@ 2018-08-02 9:49 Thomas Huth
2018-08-02 9:52 ` Thomas Huth
2018-08-22 10:10 ` Juan Quintela
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2018-08-02 9:49 UTC (permalink / raw)
To: Juan Quintela, Dr. David Alan Gilbert; +Cc: qemu-devel
When running "make check" on a non-POWER host, there is currently an ugly
line in the output like this:
[...]
GTESTER check-qtest-nios2
GTESTER check-qtest-or1k
GTESTER check-qtest-ppc64
Skipping test: kvm_hv not available Skipping test: kvm_hv not available Skipping test: kvm_hv not available Skipping test: kvm_hv not available GTESTER check-qtest-ppcemb
GTESTER check-qtest-ppc
GTESTER check-qtest-riscv32
GTESTER check-qtest-riscv64
[...]
Move the check to the beginning of the main function instead, so that
we do not have to test the condition again and again for each test,
and better use g_test_message() instead of g_print() here, like it is
also done in ufd_version_check() already.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/migration-test.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tests/migration-test.c b/tests/migration-test.c
index e079e0b..cb795b2 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -445,15 +445,6 @@ static int test_migrate_start(QTestState **from, QTestState **to,
" -incoming %s",
accel, tmpfs, bootpath, uri);
} else if (strcmp(arch, "ppc64") == 0) {
-
- /* On ppc64, the test only works with kvm-hv, but not with kvm-pr
- * and TCG is touchy due to race conditions on dirty bits
- * (especially on PPC for some reason)
- */
- if (access("/sys/module/kvm_hv", F_OK)) {
- g_print("Skipping test: kvm_hv not available ");
- return -1;
- }
cmd_src = g_strdup_printf("-machine accel=%s -m 256M"
" -name source,debug-threads=on"
" -serial file:%s/src_serial"
@@ -769,6 +760,17 @@ int main(int argc, char **argv)
return 0;
}
+ /*
+ * On ppc64, the test only works with kvm-hv, but not with kvm-pr and TCG
+ * is touchy due to race conditions on dirty bits (especially on PPC for
+ * some reason)
+ */
+ if (g_str_equal(qtest_get_arch(), "ppc64") &&
+ access("/sys/module/kvm_hv", F_OK)) {
+ g_test_message("Skipping test: kvm_hv not available");
+ return 0;
+ }
+
tmpfs = mkdtemp(template);
if (!tmpfs) {
g_test_message("mkdtemp on path (%s): %s\n", template, strerror(errno));
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message
2018-08-02 9:49 [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message Thomas Huth
@ 2018-08-02 9:52 ` Thomas Huth
2018-08-22 10:10 ` Juan Quintela
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2018-08-02 9:52 UTC (permalink / raw)
To: qemu-devel, Juan Quintela, Dr. David Alan Gilbert
Sorry, I forgot to update the patch subject, it should be:
"tests/migration-test: Silence the kvm_hv message by default"
Could you fix it up when picking up the patch, please? (or shall I resend?)
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message
2018-08-02 9:49 [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message Thomas Huth
2018-08-02 9:52 ` Thomas Huth
@ 2018-08-22 10:10 ` Juan Quintela
1 sibling, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2018-08-22 10:10 UTC (permalink / raw)
To: Thomas Huth; +Cc: Dr. David Alan Gilbert, qemu-devel
Thomas Huth <thuth@redhat.com> wrote:
> When running "make check" on a non-POWER host, there is currently an ugly
> line in the output like this:
>
> [...]
> GTESTER check-qtest-nios2
> GTESTER check-qtest-or1k
> GTESTER check-qtest-ppc64
> Skipping test: kvm_hv not available Skipping test: kvm_hv not available Skipping test: kvm_hv not available Skipping test: kvm_hv not available GTESTER check-qtest-ppcemb
> GTESTER check-qtest-ppc
> GTESTER check-qtest-riscv32
> GTESTER check-qtest-riscv64
> [...]
>
> Move the check to the beginning of the main function instead, so that
> we do not have to test the condition again and again for each test,
> and better use g_test_message() instead of g_print() here, like it is
> also done in ufd_version_check() already.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-22 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 9:49 [Qemu-devel] [PATCH] tests/migration-test: Turn kvm_hv message into a g_debug message Thomas Huth
2018-08-02 9:52 ` Thomas Huth
2018-08-22 10:10 ` Juan Quintela
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).