aboutsummaryrefslogtreecommitdiff
path: root/tests/test-crypto-pbkdf.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-11-29 18:45:30 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-01-11 13:57:25 +0100
commit4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab (patch)
tree5ecd1768a1221bb84138612014c806036410ffbb /tests/test-crypto-pbkdf.c
parent4ac80866476cc84825f57d239d210effeddf7146 (diff)
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/test-crypto-pbkdf.c')
-rw-r--r--tests/test-crypto-pbkdf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-crypto-pbkdf.c b/tests/test-crypto-pbkdf.c
index d937aff6b2..85ed1f9b33 100644
--- a/tests/test-crypto-pbkdf.c
+++ b/tests/test-crypto-pbkdf.c
@@ -440,6 +440,7 @@ int main(int argc, char **argv)
#else
int main(int argc, char **argv)
{
- return 0;
+ g_test_init(&argc, &argv, NULL);
+ return g_test_run();
}
#endif