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/ivshmem-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/ivshmem-test.c')
-rw-r--r-- | tests/ivshmem-test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c index 089e268..fe5eb30 100644 --- a/tests/ivshmem-test.c +++ b/tests/ivshmem-test.c @@ -492,7 +492,7 @@ int main(int argc, char **argv) /* shm */ tmpshm = mktempshm(TMPSHMSIZE, &fd); if (!tmpshm) { - return 0; + goto out; } tmpshmem = mmap(0, TMPSHMSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); g_assert(tmpshmem != MAP_FAILED); @@ -514,9 +514,8 @@ int main(int argc, char **argv) } } +out: ret = g_test_run(); - cleanup(); - return ret; } |