diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-11-29 18:45:30 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-01-11 13:57:25 +0100 |
commit | 4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab (patch) | |
tree | 5ecd1768a1221bb84138612014c806036410ffbb /tests/migration-test.c | |
parent | 4ac80866476cc84825f57d239d210effeddf7146 (diff) | |
download | qemu-4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab.zip qemu-4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab.tar.gz qemu-4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab.tar.bz2 |
test: execute g_test_run when tests are skipped
Sometimes a test's main() function recognizes that the environment
does not support the test, and therefore exits. In this case, we
still should run g_test_run() so that a TAP harness will print the
test plan ("1..0") and the test will be marked as skipped.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1543513531-1151-2-git-send-email-pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/migration-test.c')
-rw-r--r-- | tests/migration-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c index 06ca506..8352612 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -789,7 +789,7 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); if (!ufd_version_check()) { - return 0; + return g_test_run(); } /* @@ -800,7 +800,7 @@ int main(int argc, char **argv) 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; + return g_test_run(); } /* @@ -811,11 +811,11 @@ int main(int argc, char **argv) #if defined(HOST_S390X) if (access("/dev/kvm", R_OK | W_OK)) { g_test_message("Skipping test: kvm not available"); - return 0; + return g_test_run(); } #else g_test_message("Skipping test: Need s390x host to work properly"); - return 0; + return g_test_run(); #endif } |