[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/74] tests/migration-test: Silence the kvm_hv messa
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 10/74] tests/migration-test: Silence the kvm_hv message by default |
Date: |
Tue, 21 Aug 2018 19:01:42 +0200 |
From: Thomas Huth <address@hidden>
When running "make check" on a non-POWER host, the output is quite
distorted 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.
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
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 eb58d0a..0e687b7 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -438,15 +438,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"
@@ -750,6 +741,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
- [Qemu-devel] [PULL 00/74] Misc patches for 2018-08-21, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 03/74] es1370: simplify MemoryRegionOps, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 10/74] tests/migration-test: Silence the kvm_hv message by default,
Paolo Bonzini <=
- [Qemu-devel] [PULL 04/74] fix "Missing break in switch" coverity reports, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 06/74] qemu-pr-helper: Fix build on CentOS 7, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 02/74] scsi: mptsas: Mark as storage device, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 05/74] checkpatch: fix filename detection when using -f, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 01/74] tests: virtio: separate ccw tests from libqos, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 09/74] MAINTAINERS: add maintainers for qtest, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 11/74] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 08/74] megasas: fix sglist leak, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 12/74] hw/timer/mc146818rtc: White space clean-up, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 07/74] chardev/char-fe: Fix typos, Paolo Bonzini, 2018/08/21