]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/test-io-channel-tls.c
pseries: Enforce homogeneous threads-per-core
[mirror_qemu.git] / tests / test-io-channel-tls.c
index 3c361a7bef046e0a9fa0f0243304b170ce2f5152..8eaa208e1b9dfcd9c59673cd2afa59fe041d82c9 100644 (file)
@@ -27,6 +27,7 @@
 #include "io/channel-tls.h"
 #include "io/channel-socket.h"
 #include "io-channel-helpers.h"
+#include "crypto/init.h"
 #include "crypto/tlscredsx509.h"
 #include "qemu/acl.h"
 #include "qom/object_interfaces.h"
@@ -52,14 +53,13 @@ struct QIOChannelTLSHandshakeData {
     bool failed;
 };
 
-static void test_tls_handshake_done(Object *source,
-                                    Error *err,
+static void test_tls_handshake_done(QIOTask *task,
                                     gpointer opaque)
 {
     struct QIOChannelTLSHandshakeData *data = opaque;
 
     data->finished = true;
-    data->failed = err != NULL;
+    data->failed = qio_task_propagate_error(task, NULL);
 }
 
 
@@ -265,6 +265,8 @@ int main(int argc, char **argv)
 {
     int ret;
 
+    g_assert(qcrypto_init(NULL) == 0);
+
     module_call_init(MODULE_INIT_QOM);
     g_test_init(&argc, &argv, NULL);
     setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);