tests/migration-test: Turn kvm_hv message into a g_debug message
PATCH 1/1 tests/migration-test: Turn kvm_hv message into a g_debug message
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.
--- tests/migration-test.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
tests/migration-test.c +11 -9
@@ -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));
Signature · 1 line
1.8.3.1
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
Quoted 13 lines · Thomas Huth
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_hvnot available Skipping test:kvm_hvnot available Skipping test:kvm_hvnot available Skipping test:kvm_hvnot available GTESTER check-qtest-ppcemb
GTESTER check-qtest-ppc
GTESTER check-qtest-riscv32
GTESTER check-qtest-riscv64
[...]
Quoted 6 lines
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 ofg_print()here, like it is also done inufd_version_check()already.Signed-off-by Thomas Huth <[email protected]>