[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 22/35] test: execute g_test_run when tests are skippe
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 22/35] test: execute g_test_run when tests are skipped |
Date: |
Tue, 18 Dec 2018 00:16:47 +0100 |
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/cdrom-test.c | 2 +-
tests/migration-test.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index 9b43dc9ab4..14bd981336 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
if (exec_genisoimg(genisocheck)) {
/* genisoimage not available - so can't run tests */
- return 0;
+ return g_test_run();
}
ret = prepare_image(arch, isoimage);
diff --git a/tests/migration-test.c b/tests/migration-test.c
index 06ca5068d8..8352612364 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
}
--
2.20.1
- [Qemu-devel] [PULL 13/35] block/iscsi: take iscsilun->mutex in iscsi_timed_check_events(), (continued)
- [Qemu-devel] [PULL 13/35] block/iscsi: take iscsilun->mutex in iscsi_timed_check_events(), Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 12/35] block/iscsi: drop unused IscsiAIOCB->buf field, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 15/35] block/iscsi: cancel libiscsi task when ABORT TASK TMF completes, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 16/35] esp-pci: Fix status register write erase control, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 14/35] block/iscsi: fix ioctl cancel use-after-free, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 17/35] scsi: esp: Defer command completion until previous interrupts have been handled, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 18/35] build-sys: don't include windows.h, osdep.h does it, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 19/35] build-sys: move windows defines in osdep.h header, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 20/35] build-sys: build with Vista API by default, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 21/35] qga: drop < Vista compatibility, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 22/35] test: execute g_test_run when tests are skipped,
Paolo Bonzini <=
- [Qemu-devel] [PULL 24/35] qemu/queue.h: do not access tqe_prev directly, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 23/35] test: replace gtester with a TAP driver, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 25/35] vfio: make vfio_address_spaces static, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 26/35] qemu/queue.h: leave head structs anonymous unless necessary, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 27/35] qemu/queue.h: typedef QTAILQ heads, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 31/35] checkpatch: warn about qemu/queue.h head structs that are not typedef-ed, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 28/35] qemu/queue.h: remove Q_TAILQ_{HEAD, ENTRY}, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 29/35] qemu/queue.h: reimplement QTAILQ without pointer-to-pointers, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 32/35] hw/watchdog/wdt_i6300esb: remove a unnecessary comment, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 33/35] scripts: add script to convert multiline comments into 4-line format, Paolo Bonzini, 2018/12/17